diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-05-04 15:48:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-05 14:46:24 -0400 |
commit | f2c98382fee41848265c9bee1754b483045a740e (patch) | |
tree | b8120e67c1c5cf5a9e1eb24cf9bfc87aeb804f56 /drivers/net/wireless/rtl818x | |
parent | c693bf90cf968204f46edb820269ed380d9b7bba (diff) |
rtl8187: use SET_IEEE80211_PERM_ADDR
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_dev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 0fb850e0c656..ef66a5e60802 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -1332,6 +1332,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, | |||
1332 | u16 txpwr, reg; | 1332 | u16 txpwr, reg; |
1333 | u16 product_id = le16_to_cpu(udev->descriptor.idProduct); | 1333 | u16 product_id = le16_to_cpu(udev->descriptor.idProduct); |
1334 | int err, i; | 1334 | int err, i; |
1335 | u8 mac_addr[ETH_ALEN]; | ||
1335 | 1336 | ||
1336 | dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); | 1337 | dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); |
1337 | if (!dev) { | 1338 | if (!dev) { |
@@ -1389,12 +1390,13 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, | |||
1389 | udelay(10); | 1390 | udelay(10); |
1390 | 1391 | ||
1391 | eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR, | 1392 | eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR, |
1392 | (__le16 __force *)dev->wiphy->perm_addr, 3); | 1393 | (__le16 __force *)mac_addr, 3); |
1393 | if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { | 1394 | if (!is_valid_ether_addr(mac_addr)) { |
1394 | printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly " | 1395 | printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly " |
1395 | "generated MAC address\n"); | 1396 | "generated MAC address\n"); |
1396 | random_ether_addr(dev->wiphy->perm_addr); | 1397 | random_ether_addr(mac_addr); |
1397 | } | 1398 | } |
1399 | SET_IEEE80211_PERM_ADDR(dev, mac_addr); | ||
1398 | 1400 | ||
1399 | channel = priv->channels; | 1401 | channel = priv->channels; |
1400 | for (i = 0; i < 3; i++) { | 1402 | for (i = 0; i < 3; i++) { |
@@ -1525,7 +1527,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, | |||
1525 | skb_queue_head_init(&priv->b_tx_status.queue); | 1527 | skb_queue_head_init(&priv->b_tx_status.queue); |
1526 | 1528 | ||
1527 | printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", | 1529 | printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", |
1528 | wiphy_name(dev->wiphy), dev->wiphy->perm_addr, | 1530 | wiphy_name(dev->wiphy), mac_addr, |
1529 | chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); | 1531 | chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); |
1530 | 1532 | ||
1531 | #ifdef CONFIG_RTL8187_LEDS | 1533 | #ifdef CONFIG_RTL8187_LEDS |