aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x/rtl8180_dev.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-05-05 16:14:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-05 16:14:16 -0400
commit83163244f845c296a118ce85c653872dbff6abfe (patch)
treece2eac695a1c198f23d537e20ed86c16ece21f7e /drivers/net/wireless/rtl818x/rtl8180_dev.c
parent0a12761bcd5646691c5d16dd93df84d1b8849285 (diff)
parentadfba3c7c026a6a5560d2a43fefc9b198cb74462 (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/rtl8180_dev.c')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c13
1 files changed, 8 insertions, 5 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;