Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC - Software
Commits
aa711f0e
Commit
aa711f0e
authored
Sep 12, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/wr_nic/endpoint.c: use MAC address set by lm32
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
e39597a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
endpoint.c
kernel/wr_nic/endpoint.c
+10
-2
No files found.
kernel/wr_nic/endpoint.c
View file @
aa711f0e
...
...
@@ -233,8 +233,16 @@ int wrn_endpoint_probe(struct net_device *dev)
return
err
==
-
ENODEV
?
-
EIO
:
err
;
}
/* randomize a MAC address, so lazy users can avoid ifconfig */
random_ether_addr
(
dev
->
dev_addr
);
if
(
0
)
{
/* randomize a MAC address, so lazy users can avoid ifconfig */
random_ether_addr
(
dev
->
dev_addr
);
}
else
{
/* on the SPEC the lm32 already configured the mac address */
val
=
readl
(
&
ep
->
ep_regs
->
MACH
);
put_unaligned_be16
(
val
,
dev
->
dev_addr
);
val
=
readl
(
&
ep
->
ep_regs
->
MACL
);
put_unaligned_be32
(
val
,
dev
->
dev_addr
+
2
);
}
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment