aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-05-04 15:46:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-04 15:46:15 -0400
commitc693bf90cf968204f46edb820269ed380d9b7bba (patch)
tree512f37f0fbccf2c0e7b8d80facab2f72636c0d8d /drivers/net/wireless/rtl818x
parentdf624ca5413d84b3082246de384823fbe8fed6e4 (diff)
rtl8180: use SET_IEEE80211_PERM_ADDR
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index 4907fef011ad..093b93d62cc2 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -827,6 +827,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
827 const char *chip_name, *rf_name = NULL; 827 const char *chip_name, *rf_name = NULL;
828 u32 reg; 828 u32 reg;
829 u16 eeprom_val; 829 u16 eeprom_val;
830 u8 mac_addr[ETH_ALEN];
830 831
831 err = pci_enable_device(pdev); 832 err = pci_enable_device(pdev);
832 if (err) { 833 if (err) {
@@ -987,12 +988,13 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
987 eeprom_93cx6_read(&eeprom, 0x19, &priv->rfparam); 988 eeprom_93cx6_read(&eeprom, 0x19, &priv->rfparam);
988 } 989 }
989 990
990 eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)dev->wiphy->perm_addr, 3); 991 eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)mac_addr, 3);
991 if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { 992 if (!is_valid_ether_addr(mac_addr)) {
992 printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using" 993 printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using"
993 " randomly generated MAC addr\n", pci_name(pdev)); 994 " randomly generated MAC addr\n", pci_name(pdev));
994 random_ether_addr(dev->wiphy->perm_addr); 995 random_ether_addr(mac_addr);
995 } 996 }
997 SET_IEEE80211_PERM_ADDR(dev, mac_addr);
996 998
997 /* CCK TX power */ 999 /* CCK TX power */
998 for (i = 0; i < 14; i += 2) { 1000 for (i = 0; i < 14; i += 2) {
@@ -1024,7 +1026,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
1024 } 1026 }
1025 1027
1026 printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n", 1028 printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n",
1027 wiphy_name(dev->wiphy), dev->wiphy->perm_addr, 1029 wiphy_name(dev->wiphy), mac_addr,
1028 chip_name, priv->rf->name); 1030 chip_name, priv->rf->name);
1029 1031
1030 return 0; 1032 return 0;