aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-05 17:59:02 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-05 17:59:02 -0400
commit7143b7d41218d4fc2ea33e6056c73609527ae687 (patch)
tree9a842daee1deb57a2c8084bc5d300f6d8428fe34 /drivers
parent90864fbc7639d7a2300c67a18c9fb9fbcf7d51d2 (diff)
parent87e9af6cc67d842cd92b52b81f3f14e665e7ab05 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/tg3.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/amd8111e.c2
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/can/sja1000/sja1000.c2
-rw-r--r--drivers/net/ftmac100.c8
-rw-r--r--drivers/net/mii.c4
-rw-r--r--drivers/net/tg3.c8
-rw-r--r--drivers/net/usb/cdc_ether.c14
-rw-r--r--drivers/net/usb/smsc95xx.c2
-rw-r--r--drivers/net/usb/usbnet.c18
-rw-r--r--drivers/net/veth.c12
-rw-r--r--drivers/net/wireless/b43/main.c1
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965-tx.c18
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-led.c20
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c17
15 files changed, 105 insertions, 31 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index 88495c48a81d..241b185e6569 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -106,7 +106,7 @@ MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version "M
106MODULE_LICENSE("GPL"); 106MODULE_LICENSE("GPL");
107MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl); 107MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
108module_param_array(speed_duplex, int, NULL, 0); 108module_param_array(speed_duplex, int, NULL, 0);
109MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex"); 109MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotiate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
110module_param_array(coalesce, bool, NULL, 0); 110module_param_array(coalesce, bool, NULL, 0);
111MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable"); 111MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable");
112module_param_array(dynamic_ipg, bool, NULL, 0); 112module_param_array(dynamic_ipg, bool, NULL, 0);
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 1bebdfb9679f..57d3293c65bd 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -8357,6 +8357,8 @@ bnx2_remove_one(struct pci_dev *pdev)
8357 8357
8358 unregister_netdev(dev); 8358 unregister_netdev(dev);
8359 8359
8360 del_timer_sync(&bp->timer);
8361
8360 if (bp->mips_firmware) 8362 if (bp->mips_firmware)
8361 release_firmware(bp->mips_firmware); 8363 release_firmware(bp->mips_firmware);
8362 if (bp->rv2p_firmware) 8364 if (bp->rv2p_firmware)
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index a358ea9445a2..f501bba1fc6f 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -346,10 +346,10 @@ static void sja1000_rx(struct net_device *dev)
346 | (priv->read_reg(priv, REG_ID2) >> 5); 346 | (priv->read_reg(priv, REG_ID2) >> 5);
347 } 347 }
348 348
349 cf->can_dlc = get_can_dlc(fi & 0x0F);
349 if (fi & FI_RTR) { 350 if (fi & FI_RTR) {
350 id |= CAN_RTR_FLAG; 351 id |= CAN_RTR_FLAG;
351 } else { 352 } else {
352 cf->can_dlc = get_can_dlc(fi & 0x0F);
353 for (i = 0; i < cf->can_dlc; i++) 353 for (i = 0; i < cf->can_dlc; i++)
354 cf->data[i] = priv->read_reg(priv, dreg++); 354 cf->data[i] = priv->read_reg(priv, dreg++);
355 } 355 }
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index a31661948c42..9bd7746cbfcf 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
139 * that hardware reset completed (what the f*ck). 139 * that hardware reset completed (what the f*ck).
140 * We still need to wait for a while. 140 * We still need to wait for a while.
141 */ 141 */
142 usleep_range(500, 1000); 142 udelay(500);
143 return 0; 143 return 0;
144 } 144 }
145 145
146 usleep_range(1000, 10000); 146 udelay(1000);
147 } 147 }
148 148
149 netdev_err(netdev, "software reset failed\n"); 149 netdev_err(netdev, "software reset failed\n");
@@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg)
772 if ((phycr & FTMAC100_PHYCR_MIIRD) == 0) 772 if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
773 return phycr & FTMAC100_PHYCR_MIIRDATA; 773 return phycr & FTMAC100_PHYCR_MIIRDATA;
774 774
775 usleep_range(100, 1000); 775 udelay(100);
776 } 776 }
777 777
778 netdev_err(netdev, "mdio read timed out\n"); 778 netdev_err(netdev, "mdio read timed out\n");
@@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg,
801 if ((phycr & FTMAC100_PHYCR_MIIWR) == 0) 801 if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
802 return; 802 return;
803 803
804 usleep_range(100, 1000); 804 udelay(100);
805 } 805 }
806 806
807 netdev_err(netdev, "mdio write timed out\n"); 807 netdev_err(netdev, "mdio write timed out\n");
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index 4fbc816efee2..c62e7816d548 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -49,6 +49,10 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
49 result |= ADVERTISED_100baseT_Half; 49 result |= ADVERTISED_100baseT_Half;
50 if (advert & ADVERTISE_100FULL) 50 if (advert & ADVERTISE_100FULL)
51 result |= ADVERTISED_100baseT_Full; 51 result |= ADVERTISED_100baseT_Full;
52 if (advert & ADVERTISE_PAUSE_CAP)
53 result |= ADVERTISED_Pause;
54 if (advert & ADVERTISE_PAUSE_ASYM)
55 result |= ADVERTISED_Asym_Pause;
52 56
53 return result; 57 return result;
54} 58}
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 7c7c9a897c09..ec1953043102 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -12747,8 +12747,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
12747 if (val & VCPU_CFGSHDW_ASPM_DBNC) 12747 if (val & VCPU_CFGSHDW_ASPM_DBNC)
12748 tg3_flag_set(tp, ASPM_WORKAROUND); 12748 tg3_flag_set(tp, ASPM_WORKAROUND);
12749 if ((val & VCPU_CFGSHDW_WOL_ENABLE) && 12749 if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
12750 (val & VCPU_CFGSHDW_WOL_MAGPKT)) 12750 (val & VCPU_CFGSHDW_WOL_MAGPKT)) {
12751 tg3_flag_set(tp, WOL_ENABLE); 12751 tg3_flag_set(tp, WOL_ENABLE);
12752 device_set_wakeup_enable(&tp->pdev->dev, true);
12753 }
12752 goto done; 12754 goto done;
12753 } 12755 }
12754 12756
@@ -12881,8 +12883,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
12881 tg3_flag_clear(tp, WOL_CAP); 12883 tg3_flag_clear(tp, WOL_CAP);
12882 12884
12883 if (tg3_flag(tp, WOL_CAP) && 12885 if (tg3_flag(tp, WOL_CAP) &&
12884 (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) 12886 (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) {
12885 tg3_flag_set(tp, WOL_ENABLE); 12887 tg3_flag_set(tp, WOL_ENABLE);
12888 device_set_wakeup_enable(&tp->pdev->dev, true);
12889 }
12886 12890
12887 if (cfg2 & (1 << 17)) 12891 if (cfg2 & (1 << 17))
12888 tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING; 12892 tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING;
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 341f7056a800..a301479ecc60 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -460,7 +460,7 @@ static const struct driver_info cdc_info = {
460 .manage_power = cdc_manage_power, 460 .manage_power = cdc_manage_power,
461}; 461};
462 462
463static const struct driver_info mbm_info = { 463static const struct driver_info wwan_info = {
464 .description = "Mobile Broadband Network Device", 464 .description = "Mobile Broadband Network Device",
465 .flags = FLAG_WWAN, 465 .flags = FLAG_WWAN,
466 .bind = usbnet_cdc_bind, 466 .bind = usbnet_cdc_bind,
@@ -471,6 +471,7 @@ static const struct driver_info mbm_info = {
471 471
472/*-------------------------------------------------------------------------*/ 472/*-------------------------------------------------------------------------*/
473 473
474#define HUAWEI_VENDOR_ID 0x12D1
474 475
475static const struct usb_device_id products [] = { 476static const struct usb_device_id products [] = {
476/* 477/*
@@ -587,8 +588,17 @@ static const struct usb_device_id products [] = {
587}, { 588}, {
588 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, 589 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
589 USB_CDC_PROTO_NONE), 590 USB_CDC_PROTO_NONE),
590 .driver_info = (unsigned long)&mbm_info, 591 .driver_info = (unsigned long)&wwan_info,
591 592
593}, {
594 /* Various Huawei modems with a network port like the UMG1831 */
595 .match_flags = USB_DEVICE_ID_MATCH_VENDOR
596 | USB_DEVICE_ID_MATCH_INT_INFO,
597 .idVendor = HUAWEI_VENDOR_ID,
598 .bInterfaceClass = USB_CLASS_COMM,
599 .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET,
600 .bInterfaceProtocol = 255,
601 .driver_info = (unsigned long)&wwan_info,
592}, 602},
593 { }, // END 603 { }, // END
594}; 604};
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index b374a9997908..f74f3ce71526 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -690,7 +690,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
690 msleep(10); 690 msleep(10);
691 bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); 691 bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
692 timeout++; 692 timeout++;
693 } while ((bmcr & MII_BMCR) && (timeout < 100)); 693 } while ((bmcr & BMCR_RESET) && (timeout < 100));
694 694
695 if (timeout >= 100) { 695 if (timeout >= 100) {
696 netdev_warn(dev->net, "timeout on PHY Reset"); 696 netdev_warn(dev->net, "timeout on PHY Reset");
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 7bc9852bd57c..e6dd24466965 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net)
645 struct driver_info *info = dev->driver_info; 645 struct driver_info *info = dev->driver_info;
646 int retval; 646 int retval;
647 647
648 clear_bit(EVENT_DEV_OPEN, &dev->flags);
648 netif_stop_queue (net); 649 netif_stop_queue (net);
649 650
650 netif_info(dev, ifdown, dev->net, 651 netif_info(dev, ifdown, dev->net,
@@ -736,6 +737,7 @@ int usbnet_open (struct net_device *net)
736 } 737 }
737 } 738 }
738 739
740 set_bit(EVENT_DEV_OPEN, &dev->flags);
739 netif_start_queue (net); 741 netif_start_queue (net);
740 netif_info(dev, ifup, dev->net, 742 netif_info(dev, ifup, dev->net,
741 "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", 743 "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
@@ -1259,6 +1261,9 @@ void usbnet_disconnect (struct usb_interface *intf)
1259 if (dev->driver_info->unbind) 1261 if (dev->driver_info->unbind)
1260 dev->driver_info->unbind (dev, intf); 1262 dev->driver_info->unbind (dev, intf);
1261 1263
1264 usb_kill_urb(dev->interrupt);
1265 usb_free_urb(dev->interrupt);
1266
1262 free_netdev(net); 1267 free_netdev(net);
1263 usb_put_dev (xdev); 1268 usb_put_dev (xdev);
1264} 1269}
@@ -1498,6 +1503,10 @@ int usbnet_resume (struct usb_interface *intf)
1498 int retval; 1503 int retval;
1499 1504
1500 if (!--dev->suspend_count) { 1505 if (!--dev->suspend_count) {
1506 /* resume interrupt URBs */
1507 if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
1508 usb_submit_urb(dev->interrupt, GFP_NOIO);
1509
1501 spin_lock_irq(&dev->txq.lock); 1510 spin_lock_irq(&dev->txq.lock);
1502 while ((res = usb_get_from_anchor(&dev->deferred))) { 1511 while ((res = usb_get_from_anchor(&dev->deferred))) {
1503 1512
@@ -1516,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf)
1516 smp_mb(); 1525 smp_mb();
1517 clear_bit(EVENT_DEV_ASLEEP, &dev->flags); 1526 clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
1518 spin_unlock_irq(&dev->txq.lock); 1527 spin_unlock_irq(&dev->txq.lock);
1519 if (!(dev->txq.qlen >= TX_QLEN(dev))) 1528
1520 netif_start_queue(dev->net); 1529 if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
1521 tasklet_schedule (&dev->bh); 1530 if (!(dev->txq.qlen >= TX_QLEN(dev)))
1531 netif_start_queue(dev->net);
1532 tasklet_schedule (&dev->bh);
1533 }
1522 } 1534 }
1523 return 0; 1535 return 0;
1524} 1536}
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index cbe953a5bf5a..3b0151a2a31b 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -368,6 +368,17 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
368 if (tb[IFLA_ADDRESS] == NULL) 368 if (tb[IFLA_ADDRESS] == NULL)
369 random_ether_addr(dev->dev_addr); 369 random_ether_addr(dev->dev_addr);
370 370
371 if (tb[IFLA_IFNAME])
372 nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
373 else
374 snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d");
375
376 if (strchr(dev->name, '%')) {
377 err = dev_alloc_name(dev, dev->name);
378 if (err < 0)
379 goto err_alloc_name;
380 }
381
371 err = register_netdevice(dev); 382 err = register_netdevice(dev);
372 if (err < 0) 383 if (err < 0)
373 goto err_register_dev; 384 goto err_register_dev;
@@ -387,6 +398,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
387 398
388err_register_dev: 399err_register_dev:
389 /* nothing to do */ 400 /* nothing to do */
401err_alloc_name:
390err_configure_peer: 402err_configure_peer:
391 unregister_netdevice(peer); 403 unregister_netdevice(peer);
392 return err; 404 return err;
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index d59b0168c14a..5af40d9170a0 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -72,6 +72,7 @@ MODULE_FIRMWARE("b43/ucode11.fw");
72MODULE_FIRMWARE("b43/ucode13.fw"); 72MODULE_FIRMWARE("b43/ucode13.fw");
73MODULE_FIRMWARE("b43/ucode14.fw"); 73MODULE_FIRMWARE("b43/ucode14.fw");
74MODULE_FIRMWARE("b43/ucode15.fw"); 74MODULE_FIRMWARE("b43/ucode15.fw");
75MODULE_FIRMWARE("b43/ucode16_mimo.fw");
75MODULE_FIRMWARE("b43/ucode5.fw"); 76MODULE_FIRMWARE("b43/ucode5.fw");
76MODULE_FIRMWARE("b43/ucode9.fw"); 77MODULE_FIRMWARE("b43/ucode9.fw");
77 78
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
index fbec88d48f1b..79ac081832fb 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
@@ -316,12 +316,18 @@ int iwl4965_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
316 316
317 hdr_len = ieee80211_hdrlen(fc); 317 hdr_len = ieee80211_hdrlen(fc);
318 318
319 /* Find index into station table for destination station */ 319 /* For management frames use broadcast id to do not break aggregation */
320 sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta); 320 if (!ieee80211_is_data(fc))
321 if (sta_id == IWL_INVALID_STATION) { 321 sta_id = ctx->bcast_sta_id;
322 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", 322 else {
323 hdr->addr1); 323 /* Find index into station table for destination station */
324 goto drop_unlock; 324 sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta);
325
326 if (sta_id == IWL_INVALID_STATION) {
327 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
328 hdr->addr1);
329 goto drop_unlock;
330 }
325 } 331 }
326 332
327 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); 333 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c
index 15eb8b707157..bda0d61b2c0d 100644
--- a/drivers/net/wireless/iwlegacy/iwl-led.c
+++ b/drivers/net/wireless/iwlegacy/iwl-led.c
@@ -48,8 +48,21 @@ module_param(led_mode, int, S_IRUGO);
48MODULE_PARM_DESC(led_mode, "0=system default, " 48MODULE_PARM_DESC(led_mode, "0=system default, "
49 "1=On(RF On)/Off(RF Off), 2=blinking"); 49 "1=On(RF On)/Off(RF Off), 2=blinking");
50 50
51/* Throughput OFF time(ms) ON time (ms)
52 * >300 25 25
53 * >200 to 300 40 40
54 * >100 to 200 55 55
55 * >70 to 100 65 65
56 * >50 to 70 75 75
57 * >20 to 50 85 85
58 * >10 to 20 95 95
59 * >5 to 10 110 110
60 * >1 to 5 130 130
61 * >0 to 1 167 167
62 * <=0 SOLID ON
63 */
51static const struct ieee80211_tpt_blink iwl_blink[] = { 64static const struct ieee80211_tpt_blink iwl_blink[] = {
52 { .throughput = 0 * 1024 - 1, .blink_time = 334 }, 65 { .throughput = 0, .blink_time = 334 },
53 { .throughput = 1 * 1024 - 1, .blink_time = 260 }, 66 { .throughput = 1 * 1024 - 1, .blink_time = 260 },
54 { .throughput = 5 * 1024 - 1, .blink_time = 220 }, 67 { .throughput = 5 * 1024 - 1, .blink_time = 220 },
55 { .throughput = 10 * 1024 - 1, .blink_time = 190 }, 68 { .throughput = 10 * 1024 - 1, .blink_time = 190 },
@@ -101,6 +114,11 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv,
101 if (priv->blink_on == on && priv->blink_off == off) 114 if (priv->blink_on == on && priv->blink_off == off)
102 return 0; 115 return 0;
103 116
117 if (off == 0) {
118 /* led is SOLID_ON */
119 on = IWL_LED_SOLID;
120 }
121
104 IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", 122 IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n",
105 priv->cfg->base_params->led_compensation); 123 priv->cfg->base_params->led_compensation);
106 led_cmd.on = iwl_legacy_blink_compensation(priv, on, 124 led_cmd.on = iwl_legacy_blink_compensation(priv, on,
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index f781b7e225b4..af2ae22fcfd3 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -2992,15 +2992,15 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
2992 struct iwl_priv *priv = container_of(work, struct iwl_priv, 2992 struct iwl_priv *priv = container_of(work, struct iwl_priv,
2993 txpower_work); 2993 txpower_work);
2994 2994
2995 mutex_lock(&priv->mutex);
2996
2995 /* If a scan happened to start before we got here 2997 /* If a scan happened to start before we got here
2996 * then just return; the statistics notification will 2998 * then just return; the statistics notification will
2997 * kick off another scheduled work to compensate for 2999 * kick off another scheduled work to compensate for
2998 * any temperature delta we missed here. */ 3000 * any temperature delta we missed here. */
2999 if (test_bit(STATUS_EXIT_PENDING, &priv->status) || 3001 if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
3000 test_bit(STATUS_SCANNING, &priv->status)) 3002 test_bit(STATUS_SCANNING, &priv->status))
3001 return; 3003 goto out;
3002
3003 mutex_lock(&priv->mutex);
3004 3004
3005 /* Regardless of if we are associated, we must reconfigure the 3005 /* Regardless of if we are associated, we must reconfigure the
3006 * TX power since frames can be sent on non-radar channels while 3006 * TX power since frames can be sent on non-radar channels while
@@ -3010,7 +3010,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
3010 /* Update last_temperature to keep is_calib_needed from running 3010 /* Update last_temperature to keep is_calib_needed from running
3011 * when it isn't needed... */ 3011 * when it isn't needed... */
3012 priv->last_temperature = priv->temperature; 3012 priv->last_temperature = priv->temperature;
3013 3013out:
3014 mutex_unlock(&priv->mutex); 3014 mutex_unlock(&priv->mutex);
3015} 3015}
3016 3016
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 494de0e59cb4..4afae1446582 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -582,12 +582,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
582 582
583 hdr_len = ieee80211_hdrlen(fc); 583 hdr_len = ieee80211_hdrlen(fc);
584 584
585 /* Find index into station table for destination station */ 585 /* For management frames use broadcast id to do not break aggregation */
586 sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta); 586 if (!ieee80211_is_data(fc))
587 if (sta_id == IWL_INVALID_STATION) { 587 sta_id = ctx->bcast_sta_id;
588 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", 588 else {
589 hdr->addr1); 589 /* Find index into station table for destination station */
590 goto drop_unlock; 590 sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta);
591 if (sta_id == IWL_INVALID_STATION) {
592 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
593 hdr->addr1);
594 goto drop_unlock;
595 }
591 } 596 }
592 597
593 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); 598 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);