提交 f2c98382 编写于 作者: J John W. Linville

rtl8187: use SET_IEEE80211_PERM_ADDR

Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Acked-by: NHin-Tak Leung <htl10@users.sourceforge.net>
上级 c693bf90
...@@ -1332,6 +1332,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, ...@@ -1332,6 +1332,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
u16 txpwr, reg; u16 txpwr, reg;
u16 product_id = le16_to_cpu(udev->descriptor.idProduct); u16 product_id = le16_to_cpu(udev->descriptor.idProduct);
int err, i; int err, i;
u8 mac_addr[ETH_ALEN];
dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops);
if (!dev) { if (!dev) {
...@@ -1389,12 +1390,13 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, ...@@ -1389,12 +1390,13 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
udelay(10); udelay(10);
eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR, eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR,
(__le16 __force *)dev->wiphy->perm_addr, 3); (__le16 __force *)mac_addr, 3);
if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly " printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly "
"generated MAC address\n"); "generated MAC address\n");
random_ether_addr(dev->wiphy->perm_addr); random_ether_addr(mac_addr);
} }
SET_IEEE80211_PERM_ADDR(dev, mac_addr);
channel = priv->channels; channel = priv->channels;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
...@@ -1525,7 +1527,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, ...@@ -1525,7 +1527,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
skb_queue_head_init(&priv->b_tx_status.queue); skb_queue_head_init(&priv->b_tx_status.queue);
printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n",
wiphy_name(dev->wiphy), dev->wiphy->perm_addr, wiphy_name(dev->wiphy), mac_addr,
chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask);
#ifdef CONFIG_RTL8187_LEDS #ifdef CONFIG_RTL8187_LEDS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册