aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-07-09 23:18:24 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-09 23:18:24 -0400
commite5a8a896f5180f2950695d2d0b79db348d200ca4 (patch)
tree04adc57ae51a6d30a89ffae970770b81ee81fc23 /drivers/net
parentbff38771e1065c7fc3de87e47ba366151eea573c (diff)
parente594e96e8a14101a6decabf6746bd5186287debc (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c3
-rw-r--r--drivers/net/davinci_emac.c12
-rw-r--r--drivers/net/fec.h12
-rw-r--r--drivers/net/igb/e1000_82575.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c6
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c19
-rw-r--r--drivers/net/r6040.c9
-rw-r--r--drivers/net/tun.c4
-rw-r--r--drivers/net/wireless/ath/Kconfig1
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c9
-rw-r--r--drivers/net/wireless/b43/b43.h1
-rw-r--r--drivers/net/wireless/b43/main.c7
-rw-r--r--drivers/net/wireless/b43/pcmcia.c1
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h1
-rw-r--r--drivers/net/wireless/b43legacy/main.c7
-rw-r--r--drivers/net/wireless/iwmc3200wifi/Kconfig9
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c1
-rw-r--r--drivers/net/wireless/p54/p54common.c51
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c3
19 files changed, 111 insertions, 49 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 8c381c696a3d..ec05149a9065 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -670,8 +670,7 @@ static int setup_sge_qsets(struct adapter *adap)
670 struct port_info *pi = netdev_priv(dev); 670 struct port_info *pi = netdev_priv(dev);
671 671
672 pi->qs = &adap->sge.qs[pi->first_qset]; 672 pi->qs = &adap->sge.qs[pi->first_qset];
673 for (j = pi->first_qset; j < pi->first_qset + pi->nqsets; 673 for (j = 0; j < pi->nqsets; ++j, ++qset_idx) {
674 ++j, ++qset_idx) {
675 set_qset_lro(dev, qset_idx, pi->rx_offload & T3_LRO); 674 set_qset_lro(dev, qset_idx, pi->rx_offload & T3_LRO);
676 err = t3_sge_alloc_qset(adap, qset_idx, 1, 675 err = t3_sge_alloc_qset(adap, qset_idx, 1,
677 (adap->flags & USING_MSIX) ? qset_idx + 1 : 676 (adap->flags & USING_MSIX) ? qset_idx + 1 :
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 2df8fb0af701..12fd446f9895 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -1820,11 +1820,19 @@ static int emac_dev_setmac_addr(struct net_device *ndev, void *addr)
1820 struct device *emac_dev = &priv->ndev->dev; 1820 struct device *emac_dev = &priv->ndev->dev;
1821 struct sockaddr *sa = addr; 1821 struct sockaddr *sa = addr;
1822 1822
1823 if (!is_valid_ether_addr(sa->sa_data))
1824 return -EINVAL;
1825
1823 /* Store mac addr in priv and rx channel and set it in EMAC hw */ 1826 /* Store mac addr in priv and rx channel and set it in EMAC hw */
1824 memcpy(priv->mac_addr, sa->sa_data, ndev->addr_len); 1827 memcpy(priv->mac_addr, sa->sa_data, ndev->addr_len);
1825 memcpy(rxch->mac_addr, sa->sa_data, ndev->addr_len);
1826 memcpy(ndev->dev_addr, sa->sa_data, ndev->addr_len); 1828 memcpy(ndev->dev_addr, sa->sa_data, ndev->addr_len);
1827 emac_setmac(priv, EMAC_DEF_RX_CH, rxch->mac_addr); 1829
1830 /* If the interface is down - rxch is NULL. */
1831 /* MAC address is configured only after the interface is enabled. */
1832 if (netif_running(ndev)) {
1833 memcpy(rxch->mac_addr, sa->sa_data, ndev->addr_len);
1834 emac_setmac(priv, EMAC_DEF_RX_CH, rxch->mac_addr);
1835 }
1828 1836
1829 if (netif_msg_drv(priv)) 1837 if (netif_msg_drv(priv))
1830 dev_notice(emac_dev, "DaVinci EMAC: emac_dev_setmac_addr %pM\n", 1838 dev_notice(emac_dev, "DaVinci EMAC: emac_dev_setmac_addr %pM\n",
diff --git a/drivers/net/fec.h b/drivers/net/fec.h
index 30b7dd671336..cc47f3f057c7 100644
--- a/drivers/net/fec.h
+++ b/drivers/net/fec.h
@@ -46,12 +46,12 @@
46 46
47#else 47#else
48 48
49#define FEC_ECNTRL; 0x000 /* Ethernet control reg */ 49#define FEC_ECNTRL 0x000 /* Ethernet control reg */
50#define FEC_IEVENT; 0x004 /* Interrupt even reg */ 50#define FEC_IEVENT 0x004 /* Interrupt even reg */
51#define FEC_IMASK; 0x008 /* Interrupt mask reg */ 51#define FEC_IMASK 0x008 /* Interrupt mask reg */
52#define FEC_IVEC; 0x00c /* Interrupt vec status reg */ 52#define FEC_IVEC 0x00c /* Interrupt vec status reg */
53#define FEC_R_DES_ACTIVE; 0x010 /* Receive descriptor reg */ 53#define FEC_R_DES_ACTIVE 0x010 /* Receive descriptor reg */
54#define FEC_X_DES_ACTIVE; 0x01c /* Transmit descriptor reg */ 54#define FEC_X_DES_ACTIVE 0x014 /* Transmit descriptor reg */
55#define FEC_MII_DATA 0x040 /* MII manage frame reg */ 55#define FEC_MII_DATA 0x040 /* MII manage frame reg */
56#define FEC_MII_SPEED 0x044 /* MII speed control reg */ 56#define FEC_MII_SPEED 0x044 /* MII speed control reg */
57#define FEC_R_BOUND 0x08c /* FIFO receive bound reg */ 57#define FEC_R_BOUND 0x08c /* FIFO receive bound reg */
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index efd9be214885..ac28dd5a4fd1 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -190,6 +190,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
190 phy->ops.write_reg = igb_write_phy_reg_igp; 190 phy->ops.write_reg = igb_write_phy_reg_igp;
191 } 191 }
192 192
193 /* set lan id */
194 hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
195 E1000_STATUS_FUNC_SHIFT;
196
193 /* Set phy->phy_addr and phy->id. */ 197 /* Set phy->phy_addr and phy->id. */
194 ret_val = igb_get_phy_id_82575(hw); 198 ret_val = igb_get_phy_id_82575(hw);
195 if (ret_val) 199 if (ret_val)
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index d56890f5c9d5..7c5978ad929a 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -138,6 +138,10 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
138 adapter->hw.fc.requested_mode = ixgbe_fc_none; 138 adapter->hw.fc.requested_mode = ixgbe_fc_none;
139 } 139 }
140 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED; 140 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
141 if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
142 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
143 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
144 }
141 adapter->flags |= IXGBE_FLAG_DCB_ENABLED; 145 adapter->flags |= IXGBE_FLAG_DCB_ENABLED;
142 ixgbe_init_interrupt_scheme(adapter); 146 ixgbe_init_interrupt_scheme(adapter);
143 if (netif_running(netdev)) 147 if (netif_running(netdev))
@@ -154,6 +158,8 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
154 adapter->dcb_cfg.pfc_mode_enable = false; 158 adapter->dcb_cfg.pfc_mode_enable = false;
155 adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; 159 adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
156 adapter->flags |= IXGBE_FLAG_RSS_ENABLED; 160 adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
161 if (adapter->hw.mac.type == ixgbe_mac_82599EB)
162 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
157 ixgbe_init_interrupt_scheme(adapter); 163 ixgbe_init_interrupt_scheme(adapter);
158 if (netif_running(netdev)) 164 if (netif_running(netdev))
159 netdev->netdev_ops->ndo_open(netdev); 165 netdev->netdev_ops->ndo_open(netdev);
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a3061aacffd8..e3442f47f932 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3130,7 +3130,11 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
3130#endif 3130#endif
3131 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 3131 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
3132 DPRINTK(PROBE, INFO, "FCOE enabled with RSS \n"); 3132 DPRINTK(PROBE, INFO, "FCOE enabled with RSS \n");
3133 ixgbe_set_rss_queues(adapter); 3133 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
3134 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
3135 ixgbe_set_fdir_queues(adapter);
3136 else
3137 ixgbe_set_rss_queues(adapter);
3134 } 3138 }
3135 /* adding FCoE rx rings to the end */ 3139 /* adding FCoE rx rings to the end */
3136 f->mask = adapter->num_rx_queues; 3140 f->mask = adapter->num_rx_queues;
@@ -3388,7 +3392,12 @@ static inline bool ixgbe_cache_ring_fcoe(struct ixgbe_adapter *adapter)
3388 } 3392 }
3389#endif /* CONFIG_IXGBE_DCB */ 3393#endif /* CONFIG_IXGBE_DCB */
3390 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 3394 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
3391 ixgbe_cache_ring_rss(adapter); 3395 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
3396 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
3397 ixgbe_cache_ring_fdir(adapter);
3398 else
3399 ixgbe_cache_ring_rss(adapter);
3400
3392 fcoe_i = f->mask; 3401 fcoe_i = f->mask;
3393 } 3402 }
3394 for (i = 0; i < f->indices; i++, fcoe_i++) 3403 for (i = 0; i < f->indices; i++, fcoe_i++)
@@ -5578,12 +5587,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5578 netdev->features |= NETIF_F_FCOE_CRC; 5587 netdev->features |= NETIF_F_FCOE_CRC;
5579 netdev->features |= NETIF_F_FSO; 5588 netdev->features |= NETIF_F_FSO;
5580 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; 5589 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
5581 DPRINTK(DRV, INFO, "FCoE enabled, "
5582 "disabling Flow Director\n");
5583 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
5584 adapter->flags &=
5585 ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
5586 adapter->atr_sample_rate = 0;
5587 } else { 5590 } else {
5588 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED; 5591 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
5589 } 5592 }
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index b3197e96f323..840677f5ee82 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -49,8 +49,8 @@
49#include <asm/processor.h> 49#include <asm/processor.h>
50 50
51#define DRV_NAME "r6040" 51#define DRV_NAME "r6040"
52#define DRV_VERSION "0.23" 52#define DRV_VERSION "0.24"
53#define DRV_RELDATE "05May2009" 53#define DRV_RELDATE "08Jul2009"
54 54
55/* PHY CHIP Address */ 55/* PHY CHIP Address */
56#define PHY1_ADDR 1 /* For MAC1 */ 56#define PHY1_ADDR 1 /* For MAC1 */
@@ -704,8 +704,11 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
704 /* Read MISR status and clear */ 704 /* Read MISR status and clear */
705 status = ioread16(ioaddr + MISR); 705 status = ioread16(ioaddr + MISR);
706 706
707 if (status == 0x0000 || status == 0xffff) 707 if (status == 0x0000 || status == 0xffff) {
708 /* Restore RDC MAC interrupt */
709 iowrite16(misr, ioaddr + MIER);
708 return IRQ_NONE; 710 return IRQ_NONE;
711 }
709 712
710 /* RX interrupt request */ 713 /* RX interrupt request */
711 if (status & RX_INTS) { 714 if (status & RX_INTS) {
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 92ffd11a7195..dfc1054e4cbd 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -486,12 +486,14 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
486{ 486{
487 struct tun_file *tfile = file->private_data; 487 struct tun_file *tfile = file->private_data;
488 struct tun_struct *tun = __tun_get(tfile); 488 struct tun_struct *tun = __tun_get(tfile);
489 struct sock *sk = tun->sk; 489 struct sock *sk;
490 unsigned int mask = 0; 490 unsigned int mask = 0;
491 491
492 if (!tun) 492 if (!tun)
493 return POLLERR; 493 return POLLERR;
494 494
495 sk = tun->sk;
496
495 DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name); 497 DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
496 498
497 poll_wait(file, &tun->socket.wait, wait); 499 poll_wait(file, &tun->socket.wait, wait);
diff --git a/drivers/net/wireless/ath/Kconfig b/drivers/net/wireless/ath/Kconfig
index d26e7b485315..eb0337c49546 100644
--- a/drivers/net/wireless/ath/Kconfig
+++ b/drivers/net/wireless/ath/Kconfig
@@ -1,5 +1,6 @@
1config ATH_COMMON 1config ATH_COMMON
2 tristate "Atheros Wireless Cards" 2 tristate "Atheros Wireless Cards"
3 depends on WLAN_80211
3 depends on ATH5K || ATH9K || AR9170_USB 4 depends on ATH5K || ATH9K || AR9170_USB
4 5
5source "drivers/net/wireless/ath/ath5k/Kconfig" 6source "drivers/net/wireless/ath/ath5k/Kconfig"
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index b61a071788a5..4ccf48e396df 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -355,7 +355,14 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
355 } 355 }
356 356
357 if (bf_next == NULL) { 357 if (bf_next == NULL) {
358 INIT_LIST_HEAD(&bf_head); 358 /*
359 * Make sure the last desc is reclaimed if it
360 * not a holding desc.
361 */
362 if (!bf_last->bf_stale)
363 list_move_tail(&bf->list, &bf_head);
364 else
365 INIT_LIST_HEAD(&bf_head);
359 } else { 366 } else {
360 ASSERT(!list_empty(bf_q)); 367 ASSERT(!list_empty(bf_q));
361 list_move_tail(&bf->list, &bf_head); 368 list_move_tail(&bf->list, &bf_head);
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index f580c2812d91..40448067e4cc 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -648,6 +648,7 @@ struct b43_wl {
648 u8 nr_devs; 648 u8 nr_devs;
649 649
650 bool radiotap_enabled; 650 bool radiotap_enabled;
651 bool radio_enabled;
651 652
652 /* The beacon we are currently using (AP or IBSS mode). 653 /* The beacon we are currently using (AP or IBSS mode).
653 * This beacon stuff is protected by the irq_lock. */ 654 * This beacon stuff is protected by the irq_lock. */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 6456afebdba1..e71c8d9cd706 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3497,8 +3497,8 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
3497 if (phy->ops->set_rx_antenna) 3497 if (phy->ops->set_rx_antenna)
3498 phy->ops->set_rx_antenna(dev, antenna); 3498 phy->ops->set_rx_antenna(dev, antenna);
3499 3499
3500 if (!!conf->radio_enabled != phy->radio_on) { 3500 if (wl->radio_enabled != phy->radio_on) {
3501 if (conf->radio_enabled) { 3501 if (wl->radio_enabled) {
3502 b43_software_rfkill(dev, false); 3502 b43_software_rfkill(dev, false);
3503 b43info(dev->wl, "Radio turned on by software\n"); 3503 b43info(dev->wl, "Radio turned on by software\n");
3504 if (!dev->radio_hw_enable) { 3504 if (!dev->radio_hw_enable) {
@@ -4339,6 +4339,7 @@ static int b43_op_start(struct ieee80211_hw *hw)
4339 wl->beacon0_uploaded = 0; 4339 wl->beacon0_uploaded = 0;
4340 wl->beacon1_uploaded = 0; 4340 wl->beacon1_uploaded = 0;
4341 wl->beacon_templates_virgin = 1; 4341 wl->beacon_templates_virgin = 1;
4342 wl->radio_enabled = 1;
4342 4343
4343 mutex_lock(&wl->mutex); 4344 mutex_lock(&wl->mutex);
4344 4345
@@ -4378,6 +4379,7 @@ static void b43_op_stop(struct ieee80211_hw *hw)
4378 if (b43_status(dev) >= B43_STAT_STARTED) 4379 if (b43_status(dev) >= B43_STAT_STARTED)
4379 b43_wireless_core_stop(dev); 4380 b43_wireless_core_stop(dev);
4380 b43_wireless_core_exit(dev); 4381 b43_wireless_core_exit(dev);
4382 wl->radio_enabled = 0;
4381 mutex_unlock(&wl->mutex); 4383 mutex_unlock(&wl->mutex);
4382 4384
4383 cancel_work_sync(&(wl->txpower_adjust_work)); 4385 cancel_work_sync(&(wl->txpower_adjust_work));
@@ -4560,6 +4562,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
4560 B43_WARN_ON(1); 4562 B43_WARN_ON(1);
4561 4563
4562 dev->phy.gmode = have_2ghz_phy; 4564 dev->phy.gmode = have_2ghz_phy;
4565 dev->phy.radio_on = 1;
4563 tmp = dev->phy.gmode ? B43_TMSLOW_GMODE : 0; 4566 tmp = dev->phy.gmode ? B43_TMSLOW_GMODE : 0;
4564 b43_wireless_core_reset(dev, tmp); 4567 b43_wireless_core_reset(dev, tmp);
4565 4568
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 3cfc30307a27..6c3a74964ab8 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -35,6 +35,7 @@
35 35
36static /*const */ struct pcmcia_device_id b43_pcmcia_tbl[] = { 36static /*const */ struct pcmcia_device_id b43_pcmcia_tbl[] = {
37 PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448), 37 PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448),
38 PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x476),
38 PCMCIA_DEVICE_NULL, 39 PCMCIA_DEVICE_NULL,
39}; 40};
40 41
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index 77fda148ac46..038baa8869e2 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -607,6 +607,7 @@ struct b43legacy_wl {
607 u8 nr_devs; 607 u8 nr_devs;
608 608
609 bool radiotap_enabled; 609 bool radiotap_enabled;
610 bool radio_enabled;
610 611
611 /* The beacon we are currently using (AP or IBSS mode). 612 /* The beacon we are currently using (AP or IBSS mode).
612 * This beacon stuff is protected by the irq_lock. */ 613 * This beacon stuff is protected by the irq_lock. */
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index e5136fb65ddd..c4973c1942bf 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2689,8 +2689,8 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
2689 /* Antennas for RX and management frame TX. */ 2689 /* Antennas for RX and management frame TX. */
2690 b43legacy_mgmtframe_txantenna(dev, antenna_tx); 2690 b43legacy_mgmtframe_txantenna(dev, antenna_tx);
2691 2691
2692 if (!!conf->radio_enabled != phy->radio_on) { 2692 if (wl->radio_enabled != phy->radio_on) {
2693 if (conf->radio_enabled) { 2693 if (wl->radio_enabled) {
2694 b43legacy_radio_turn_on(dev); 2694 b43legacy_radio_turn_on(dev);
2695 b43legacyinfo(dev->wl, "Radio turned on by software\n"); 2695 b43legacyinfo(dev->wl, "Radio turned on by software\n");
2696 if (!dev->radio_hw_enable) 2696 if (!dev->radio_hw_enable)
@@ -3441,6 +3441,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
3441 wl->beacon0_uploaded = 0; 3441 wl->beacon0_uploaded = 0;
3442 wl->beacon1_uploaded = 0; 3442 wl->beacon1_uploaded = 0;
3443 wl->beacon_templates_virgin = 1; 3443 wl->beacon_templates_virgin = 1;
3444 wl->radio_enabled = 1;
3444 3445
3445 mutex_lock(&wl->mutex); 3446 mutex_lock(&wl->mutex);
3446 3447
@@ -3479,6 +3480,7 @@ static void b43legacy_op_stop(struct ieee80211_hw *hw)
3479 if (b43legacy_status(dev) >= B43legacy_STAT_STARTED) 3480 if (b43legacy_status(dev) >= B43legacy_STAT_STARTED)
3480 b43legacy_wireless_core_stop(dev); 3481 b43legacy_wireless_core_stop(dev);
3481 b43legacy_wireless_core_exit(dev); 3482 b43legacy_wireless_core_exit(dev);
3483 wl->radio_enabled = 0;
3482 mutex_unlock(&wl->mutex); 3484 mutex_unlock(&wl->mutex);
3483} 3485}
3484 3486
@@ -3620,6 +3622,7 @@ static int b43legacy_wireless_core_attach(struct b43legacy_wldev *dev)
3620 have_bphy = 1; 3622 have_bphy = 1;
3621 3623
3622 dev->phy.gmode = (have_gphy || have_bphy); 3624 dev->phy.gmode = (have_gphy || have_bphy);
3625 dev->phy.radio_on = 1;
3623 tmp = dev->phy.gmode ? B43legacy_TMSLOW_GMODE : 0; 3626 tmp = dev->phy.gmode ? B43legacy_TMSLOW_GMODE : 0;
3624 b43legacy_wireless_core_reset(dev, tmp); 3627 b43legacy_wireless_core_reset(dev, tmp);
3625 3628
diff --git a/drivers/net/wireless/iwmc3200wifi/Kconfig b/drivers/net/wireless/iwmc3200wifi/Kconfig
index 1eccb6df46dd..030401d367d3 100644
--- a/drivers/net/wireless/iwmc3200wifi/Kconfig
+++ b/drivers/net/wireless/iwmc3200wifi/Kconfig
@@ -4,6 +4,15 @@ config IWM
4 depends on CFG80211 4 depends on CFG80211
5 select WIRELESS_EXT 5 select WIRELESS_EXT
6 select FW_LOADER 6 select FW_LOADER
7 help
8 The Intel Wireless Multicomm 3200 hardware is a combo
9 card with GPS, Bluetooth, WiMax and 802.11 radios. It
10 runs over SDIO and is typically found on Moorestown
11 based platform. This driver takes care of the 802.11
12 part, which is a fullmac one.
13
14 If you choose to build it as a module, it'll be called
15 iwmc3200wifi.ko.
7 16
8config IWM_DEBUG 17config IWM_DEBUG
9 bool "Enable full debugging output in iwmc3200wifi" 18 bool "Enable full debugging output in iwmc3200wifi"
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 55f77ad85304..c47ef48f31c5 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -418,6 +418,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
418 continue; 418 continue;
419 419
420 if (!data2->started || !hwsim_ps_rx_ok(data2, skb) || 420 if (!data2->started || !hwsim_ps_rx_ok(data2, skb) ||
421 !data->channel || !data2->channel ||
421 data->channel->center_freq != data2->channel->center_freq || 422 data->channel->center_freq != data2->channel->center_freq ||
422 !(data->group & data2->group)) 423 !(data->group & data2->group))
423 continue; 424 continue;
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index b618bd14583f..22ca122bd798 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -823,30 +823,30 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
823 struct p54_tx_info *range; 823 struct p54_tx_info *range;
824 unsigned long flags; 824 unsigned long flags;
825 825
826 if (unlikely(!skb || !dev || skb_queue_empty(&priv->tx_queue))) 826 if (unlikely(!skb || !dev || !skb_queue_len(&priv->tx_queue)))
827 return; 827 return;
828 828
829 /* There used to be a check here to see if the SKB was on the 829 /*
830 * TX queue or not. This can never happen because all SKBs we 830 * don't try to free an already unlinked skb
831 * see here successfully went through p54_assign_address()
832 * which means the SKB is on the ->tx_queue.
833 */ 831 */
832 if (unlikely((!skb->next) || (!skb->prev)))
833 return;
834 834
835 spin_lock_irqsave(&priv->tx_queue.lock, flags); 835 spin_lock_irqsave(&priv->tx_queue.lock, flags);
836 info = IEEE80211_SKB_CB(skb); 836 info = IEEE80211_SKB_CB(skb);
837 range = (void *)info->rate_driver_data; 837 range = (void *)info->rate_driver_data;
838 if (!skb_queue_is_first(&priv->tx_queue, skb)) { 838 if (skb->prev != (struct sk_buff *)&priv->tx_queue) {
839 struct ieee80211_tx_info *ni; 839 struct ieee80211_tx_info *ni;
840 struct p54_tx_info *mr; 840 struct p54_tx_info *mr;
841 841
842 ni = IEEE80211_SKB_CB(skb_queue_prev(&priv->tx_queue, skb)); 842 ni = IEEE80211_SKB_CB(skb->prev);
843 mr = (struct p54_tx_info *)ni->rate_driver_data; 843 mr = (struct p54_tx_info *)ni->rate_driver_data;
844 } 844 }
845 if (!skb_queue_is_last(&priv->tx_queue, skb)) { 845 if (skb->next != (struct sk_buff *)&priv->tx_queue) {
846 struct ieee80211_tx_info *ni; 846 struct ieee80211_tx_info *ni;
847 struct p54_tx_info *mr; 847 struct p54_tx_info *mr;
848 848
849 ni = IEEE80211_SKB_CB(skb_queue_next(&priv->tx_queue, skb)); 849 ni = IEEE80211_SKB_CB(skb->next);
850 mr = (struct p54_tx_info *)ni->rate_driver_data; 850 mr = (struct p54_tx_info *)ni->rate_driver_data;
851 } 851 }
852 __skb_unlink(skb, &priv->tx_queue); 852 __skb_unlink(skb, &priv->tx_queue);
@@ -864,13 +864,15 @@ static struct sk_buff *p54_find_tx_entry(struct ieee80211_hw *dev,
864 unsigned long flags; 864 unsigned long flags;
865 865
866 spin_lock_irqsave(&priv->tx_queue.lock, flags); 866 spin_lock_irqsave(&priv->tx_queue.lock, flags);
867 skb_queue_walk(&priv->tx_queue, entry) { 867 entry = priv->tx_queue.next;
868 while (entry != (struct sk_buff *)&priv->tx_queue) {
868 struct p54_hdr *hdr = (struct p54_hdr *) entry->data; 869 struct p54_hdr *hdr = (struct p54_hdr *) entry->data;
869 870
870 if (hdr->req_id == req_id) { 871 if (hdr->req_id == req_id) {
871 spin_unlock_irqrestore(&priv->tx_queue.lock, flags); 872 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
872 return entry; 873 return entry;
873 } 874 }
875 entry = entry->next;
874 } 876 }
875 spin_unlock_irqrestore(&priv->tx_queue.lock, flags); 877 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
876 return NULL; 878 return NULL;
@@ -888,33 +890,36 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
888 int count, idx; 890 int count, idx;
889 891
890 spin_lock_irqsave(&priv->tx_queue.lock, flags); 892 spin_lock_irqsave(&priv->tx_queue.lock, flags);
891 skb_queue_walk(&priv->tx_queue, entry) { 893 entry = (struct sk_buff *) priv->tx_queue.next;
894 while (entry != (struct sk_buff *)&priv->tx_queue) {
892 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); 895 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
893 struct p54_hdr *entry_hdr; 896 struct p54_hdr *entry_hdr;
894 struct p54_tx_data *entry_data; 897 struct p54_tx_data *entry_data;
895 unsigned int pad = 0, frame_len; 898 unsigned int pad = 0, frame_len;
896 899
897 range = (void *)info->rate_driver_data; 900 range = (void *)info->rate_driver_data;
898 if (range->start_addr != addr) 901 if (range->start_addr != addr) {
902 entry = entry->next;
899 continue; 903 continue;
904 }
900 905
901 if (!skb_queue_is_last(&priv->tx_queue, entry)) { 906 if (entry->next != (struct sk_buff *)&priv->tx_queue) {
902 struct ieee80211_tx_info *ni; 907 struct ieee80211_tx_info *ni;
903 struct p54_tx_info *mr; 908 struct p54_tx_info *mr;
904 909
905 ni = IEEE80211_SKB_CB(skb_queue_next(&priv->tx_queue, 910 ni = IEEE80211_SKB_CB(entry->next);
906 entry));
907 mr = (struct p54_tx_info *)ni->rate_driver_data; 911 mr = (struct p54_tx_info *)ni->rate_driver_data;
908 } 912 }
909 913
910 __skb_unlink(entry, &priv->tx_queue); 914 __skb_unlink(entry, &priv->tx_queue);
911 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
912 915
913 frame_len = entry->len; 916 frame_len = entry->len;
914 entry_hdr = (struct p54_hdr *) entry->data; 917 entry_hdr = (struct p54_hdr *) entry->data;
915 entry_data = (struct p54_tx_data *) entry_hdr->data; 918 entry_data = (struct p54_tx_data *) entry_hdr->data;
916 priv->tx_stats[entry_data->hw_queue].len--; 919 if (priv->tx_stats[entry_data->hw_queue].len)
920 priv->tx_stats[entry_data->hw_queue].len--;
917 priv->stats.dot11ACKFailureCount += payload->tries - 1; 921 priv->stats.dot11ACKFailureCount += payload->tries - 1;
922 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
918 923
919 /* 924 /*
920 * Frames in P54_QUEUE_FWSCAN and P54_QUEUE_BEACON are 925 * Frames in P54_QUEUE_FWSCAN and P54_QUEUE_BEACON are
@@ -1164,21 +1169,23 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
1164 } 1169 }
1165 } 1170 }
1166 1171
1167 skb_queue_walk(&priv->tx_queue, entry) { 1172 entry = priv->tx_queue.next;
1173 while (left--) {
1168 u32 hole_size; 1174 u32 hole_size;
1169 info = IEEE80211_SKB_CB(entry); 1175 info = IEEE80211_SKB_CB(entry);
1170 range = (void *)info->rate_driver_data; 1176 range = (void *)info->rate_driver_data;
1171 hole_size = range->start_addr - last_addr; 1177 hole_size = range->start_addr - last_addr;
1172 if (!target_skb && hole_size >= len) { 1178 if (!target_skb && hole_size >= len) {
1173 target_skb = skb_queue_prev(&priv->tx_queue, entry); 1179 target_skb = entry->prev;
1174 hole_size -= len; 1180 hole_size -= len;
1175 target_addr = last_addr; 1181 target_addr = last_addr;
1176 } 1182 }
1177 largest_hole = max(largest_hole, hole_size); 1183 largest_hole = max(largest_hole, hole_size);
1178 last_addr = range->end_addr; 1184 last_addr = range->end_addr;
1185 entry = entry->next;
1179 } 1186 }
1180 if (!target_skb && priv->rx_end - last_addr >= len) { 1187 if (!target_skb && priv->rx_end - last_addr >= len) {
1181 target_skb = skb_peek_tail(&priv->tx_queue); 1188 target_skb = priv->tx_queue.prev;
1182 largest_hole = max(largest_hole, priv->rx_end - last_addr - len); 1189 largest_hole = max(largest_hole, priv->rx_end - last_addr - len);
1183 if (!skb_queue_empty(&priv->tx_queue)) { 1190 if (!skb_queue_empty(&priv->tx_queue)) {
1184 info = IEEE80211_SKB_CB(target_skb); 1191 info = IEEE80211_SKB_CB(target_skb);
@@ -2084,6 +2091,7 @@ out:
2084static void p54_stop(struct ieee80211_hw *dev) 2091static void p54_stop(struct ieee80211_hw *dev)
2085{ 2092{
2086 struct p54_common *priv = dev->priv; 2093 struct p54_common *priv = dev->priv;
2094 struct sk_buff *skb;
2087 2095
2088 mutex_lock(&priv->conf_mutex); 2096 mutex_lock(&priv->conf_mutex);
2089 priv->mode = NL80211_IFTYPE_UNSPECIFIED; 2097 priv->mode = NL80211_IFTYPE_UNSPECIFIED;
@@ -2098,7 +2106,8 @@ static void p54_stop(struct ieee80211_hw *dev)
2098 p54_tx_cancel(dev, priv->cached_beacon); 2106 p54_tx_cancel(dev, priv->cached_beacon);
2099 2107
2100 priv->stop(dev); 2108 priv->stop(dev);
2101 skb_queue_purge(&priv->tx_queue); 2109 while ((skb = skb_dequeue(&priv->tx_queue)))
2110 kfree_skb(skb);
2102 priv->cached_beacon = NULL; 2111 priv->cached_beacon = NULL;
2103 priv->tsf_high32 = priv->tsf_low32 = 0; 2112 priv->tsf_high32 = priv->tsf_low32 = 0;
2104 mutex_unlock(&priv->conf_mutex); 2113 mutex_unlock(&priv->conf_mutex);
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 14a19baff214..0e6e44689cc6 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -38,7 +38,6 @@ static struct usb_device_id usb_ids[] = {
38 /* ZD1211 */ 38 /* ZD1211 */
39 { USB_DEVICE(0x0ace, 0x1211), .driver_info = DEVICE_ZD1211 }, 39 { USB_DEVICE(0x0ace, 0x1211), .driver_info = DEVICE_ZD1211 },
40 { USB_DEVICE(0x0ace, 0xa211), .driver_info = DEVICE_ZD1211 }, 40 { USB_DEVICE(0x0ace, 0xa211), .driver_info = DEVICE_ZD1211 },
41 { USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 },
42 { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 }, 41 { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 },
43 { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, 42 { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
44 { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 }, 43 { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 },
@@ -61,6 +60,7 @@ static struct usb_device_id usb_ids[] = {
61 { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 }, 60 { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 },
62 { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, 61 { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 },
63 /* ZD1211B */ 62 /* ZD1211B */
63 { USB_DEVICE(0x054c, 0x0257), .driver_info = DEVICE_ZD1211B },
64 { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, 64 { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B },
65 { USB_DEVICE(0x0ace, 0xb215), .driver_info = DEVICE_ZD1211B }, 65 { USB_DEVICE(0x0ace, 0xb215), .driver_info = DEVICE_ZD1211B },
66 { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, 66 { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
@@ -87,6 +87,7 @@ static struct usb_device_id usb_ids[] = {
87 { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B }, 87 { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B },
88 { USB_DEVICE(0x07fa, 0x1196), .driver_info = DEVICE_ZD1211B }, 88 { USB_DEVICE(0x07fa, 0x1196), .driver_info = DEVICE_ZD1211B },
89 { USB_DEVICE(0x0df6, 0x0036), .driver_info = DEVICE_ZD1211B }, 89 { USB_DEVICE(0x0df6, 0x0036), .driver_info = DEVICE_ZD1211B },
90 { USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211B },
90 /* "Driverless" devices that need ejecting */ 91 /* "Driverless" devices that need ejecting */
91 { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, 92 { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
92 { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER }, 93 { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },