aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x/rtl8187_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c10
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 738921fda02..891b8490e34 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -1333,6 +1333,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1333 u16 txpwr, reg; 1333 u16 txpwr, reg;
1334 u16 product_id = le16_to_cpu(udev->descriptor.idProduct); 1334 u16 product_id = le16_to_cpu(udev->descriptor.idProduct);
1335 int err, i; 1335 int err, i;
1336 u8 mac_addr[ETH_ALEN];
1336 1337
1337 dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); 1338 dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops);
1338 if (!dev) { 1339 if (!dev) {
@@ -1390,12 +1391,13 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1390 udelay(10); 1391 udelay(10);
1391 1392
1392 eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR, 1393 eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR,
1393 (__le16 __force *)dev->wiphy->perm_addr, 3); 1394 (__le16 __force *)mac_addr, 3);
1394 if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { 1395 if (!is_valid_ether_addr(mac_addr)) {
1395 printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly " 1396 printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly "
1396 "generated MAC address\n"); 1397 "generated MAC address\n");
1397 random_ether_addr(dev->wiphy->perm_addr); 1398 random_ether_addr(mac_addr);
1398 } 1399 }
1400 SET_IEEE80211_PERM_ADDR(dev, mac_addr);
1399 1401
1400 channel = priv->channels; 1402 channel = priv->channels;
1401 for (i = 0; i < 3; i++) { 1403 for (i = 0; i < 3; i++) {
@@ -1526,7 +1528,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1526 skb_queue_head_init(&priv->b_tx_status.queue); 1528 skb_queue_head_init(&priv->b_tx_status.queue);
1527 1529
1528 printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", 1530 printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n",
1529 wiphy_name(dev->wiphy), dev->wiphy->perm_addr, 1531 wiphy_name(dev->wiphy), mac_addr,
1530 chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); 1532 chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask);
1531 1533
1532#ifdef CONFIG_RTL8187_LEDS 1534#ifdef CONFIG_RTL8187_LEDS