Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c693bf90
Commit
c693bf90
authored
May 04, 2010
by
John W. Linville
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtl8180: use SET_IEEE80211_PERM_ADDR
Signed-off-by:
John W. Linville
<
linville@tuxdriver.com
>
parent
df624ca5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
drivers/net/wireless/rtl818x/rtl8180_dev.c
drivers/net/wireless/rtl818x/rtl8180_dev.c
+6
-4
No files found.
drivers/net/wireless/rtl818x/rtl8180_dev.c
View file @
c693bf90
...
...
@@ -827,6 +827,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
const
char
*
chip_name
,
*
rf_name
=
NULL
;
u32
reg
;
u16
eeprom_val
;
u8
mac_addr
[
ETH_ALEN
];
err
=
pci_enable_device
(
pdev
);
if
(
err
)
{
...
...
@@ -987,12 +988,13 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
eeprom_93cx6_read
(
&
eeprom
,
0x19
,
&
priv
->
rfparam
);
}
eeprom_93cx6_multiread
(
&
eeprom
,
0x7
,
(
__le16
*
)
dev
->
wiphy
->
perm
_addr
,
3
);
if
(
!
is_valid_ether_addr
(
dev
->
wiphy
->
perm
_addr
))
{
eeprom_93cx6_multiread
(
&
eeprom
,
0x7
,
(
__le16
*
)
mac
_addr
,
3
);
if
(
!
is_valid_ether_addr
(
mac
_addr
))
{
printk
(
KERN_WARNING
"%s (rtl8180): Invalid hwaddr! Using"
" randomly generated MAC addr
\n
"
,
pci_name
(
pdev
));
random_ether_addr
(
dev
->
wiphy
->
perm
_addr
);
random_ether_addr
(
mac
_addr
);
}
SET_IEEE80211_PERM_ADDR
(
dev
,
mac_addr
);
/* CCK TX power */
for
(
i
=
0
;
i
<
14
;
i
+=
2
)
{
...
...
@@ -1024,7 +1026,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
}
printk
(
KERN_INFO
"%s: hwaddr %pM, %s + %s
\n
"
,
wiphy_name
(
dev
->
wiphy
),
dev
->
wiphy
->
perm
_addr
,
wiphy_name
(
dev
->
wiphy
),
mac
_addr
,
chip_name
,
priv
->
rf
->
name
);
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