diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-05-05 16:14:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-05 16:14:16 -0400 |
commit | 83163244f845c296a118ce85c653872dbff6abfe (patch) | |
tree | ce2eac695a1c198f23d537e20ed86c16ece21f7e /drivers/net/wireless/rtl818x | |
parent | 0a12761bcd5646691c5d16dd93df84d1b8849285 (diff) | |
parent | adfba3c7c026a6a5560d2a43fefc9b198cb74462 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/libertas_tf/cmd.c
drivers/net/wireless/libertas_tf/main.c
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8180_dev.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_dev.c | 10 |
2 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c index 6b46329b732f..21307f2412b8 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c | |||
@@ -188,6 +188,7 @@ static void rtl8180_handle_tx(struct ieee80211_hw *dev, unsigned int prio) | |||
188 | info->flags |= IEEE80211_TX_STAT_ACK; | 188 | info->flags |= IEEE80211_TX_STAT_ACK; |
189 | 189 | ||
190 | info->status.rates[0].count = (flags & 0xFF) + 1; | 190 | info->status.rates[0].count = (flags & 0xFF) + 1; |
191 | info->status.rates[1].idx = -1; | ||
191 | 192 | ||
192 | ieee80211_tx_status_irqsafe(dev, skb); | 193 | ieee80211_tx_status_irqsafe(dev, skb); |
193 | if (ring->entries - skb_queue_len(&ring->queue) == 2) | 194 | if (ring->entries - skb_queue_len(&ring->queue) == 2) |
@@ -297,7 +298,7 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
297 | entry->flags = cpu_to_le32(tx_flags); | 298 | entry->flags = cpu_to_le32(tx_flags); |
298 | __skb_queue_tail(&ring->queue, skb); | 299 | __skb_queue_tail(&ring->queue, skb); |
299 | if (ring->entries - skb_queue_len(&ring->queue) < 2) | 300 | if (ring->entries - skb_queue_len(&ring->queue) < 2) |
300 | ieee80211_stop_queue(dev, skb_get_queue_mapping(skb)); | 301 | ieee80211_stop_queue(dev, prio); |
301 | spin_unlock_irqrestore(&priv->lock, flags); | 302 | spin_unlock_irqrestore(&priv->lock, flags); |
302 | 303 | ||
303 | rtl818x_iowrite8(priv, &priv->map->TX_DMA_POLLING, (1 << (prio + 4))); | 304 | rtl818x_iowrite8(priv, &priv->map->TX_DMA_POLLING, (1 << (prio + 4))); |
@@ -827,6 +828,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev, | |||
827 | const char *chip_name, *rf_name = NULL; | 828 | const char *chip_name, *rf_name = NULL; |
828 | u32 reg; | 829 | u32 reg; |
829 | u16 eeprom_val; | 830 | u16 eeprom_val; |
831 | u8 mac_addr[ETH_ALEN]; | ||
830 | 832 | ||
831 | err = pci_enable_device(pdev); | 833 | err = pci_enable_device(pdev); |
832 | if (err) { | 834 | if (err) { |
@@ -987,12 +989,13 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev, | |||
987 | eeprom_93cx6_read(&eeprom, 0x19, &priv->rfparam); | 989 | eeprom_93cx6_read(&eeprom, 0x19, &priv->rfparam); |
988 | } | 990 | } |
989 | 991 | ||
990 | eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)dev->wiphy->perm_addr, 3); | 992 | eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)mac_addr, 3); |
991 | if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { | 993 | if (!is_valid_ether_addr(mac_addr)) { |
992 | printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using" | 994 | printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using" |
993 | " randomly generated MAC addr\n", pci_name(pdev)); | 995 | " randomly generated MAC addr\n", pci_name(pdev)); |
994 | random_ether_addr(dev->wiphy->perm_addr); | 996 | random_ether_addr(mac_addr); |
995 | } | 997 | } |
998 | SET_IEEE80211_PERM_ADDR(dev, mac_addr); | ||
996 | 999 | ||
997 | /* CCK TX power */ | 1000 | /* CCK TX power */ |
998 | for (i = 0; i < 14; i += 2) { | 1001 | for (i = 0; i < 14; i += 2) { |
@@ -1024,7 +1027,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev, | |||
1024 | } | 1027 | } |
1025 | 1028 | ||
1026 | printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n", | 1029 | printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n", |
1027 | wiphy_name(dev->wiphy), dev->wiphy->perm_addr, | 1030 | wiphy_name(dev->wiphy), mac_addr, |
1028 | chip_name, priv->rf->name); | 1031 | chip_name, priv->rf->name); |
1029 | 1032 | ||
1030 | return 0; | 1033 | return 0; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 738921fda027..891b8490e349 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 |