Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194762
b: refs/heads/master
c: c693bf9
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed May 4, 2010
1 parent 7edc935 commit 64aeac6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df624ca5413d84b3082246de384823fbe8fed6e4
refs/heads/master: c693bf90cf968204f46edb820269ed380d9b7bba
10 changes: 6 additions & 4 deletions trunk/drivers/net/wireless/rtl818x/rtl8180_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 64aeac6

Please sign in to comment.