aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS2
-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
-rw-r--r--include/linux/usb/usbnet.h1
-rw-r--r--net/core/dev.c6
-rw-r--r--net/dsa/Kconfig4
-rw-r--r--net/dsa/mv88e6131.c26
-rw-r--r--net/ipv4/devinet.c2
-rw-r--r--net/ipv4/fib_trie.c3
-rw-r--r--net/ipv4/ip_fragment.c31
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/esp6.c2
-rw-r--r--net/unix/af_unix.c16
-rw-r--r--net/xfrm/xfrm_replay.c2
-rw-r--r--net/xfrm/xfrm_user.c3
28 files changed, 170 insertions, 66 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 17c0917a26ea..e653a99ddc4c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6551,7 +6551,7 @@ S: Maintained
6551F: drivers/usb/host/uhci* 6551F: drivers/usb/host/uhci*
6552 6552
6553USB "USBNET" DRIVER FRAMEWORK 6553USB "USBNET" DRIVER FRAMEWORK
6554M: David Brownell <dbrownell@users.sourceforge.net> 6554M: Oliver Neukum <oneukum@suse.de>
6555L: netdev@vger.kernel.org 6555L: netdev@vger.kernel.org
6556W: http://www.linux-usb.org/usbnet 6556W: http://www.linux-usb.org/usbnet
6557S: Maintained 6557S: Maintained
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);
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 0e1855079fbb..605b0aa8d852 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -68,6 +68,7 @@ struct usbnet {
68# define EVENT_RX_PAUSED 5 68# define EVENT_RX_PAUSED 5
69# define EVENT_DEV_WAKING 6 69# define EVENT_DEV_WAKING 6
70# define EVENT_DEV_ASLEEP 7 70# define EVENT_DEV_ASLEEP 7
71# define EVENT_DEV_OPEN 8
71}; 72};
72 73
73static inline struct usb_driver *driver_of(struct usb_interface *intf) 74static inline struct usb_driver *driver_of(struct usb_interface *intf)
diff --git a/net/core/dev.c b/net/core/dev.c
index 3b79bad3d02d..44ef8f8998ca 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4783,7 +4783,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm
4783 * is never reached 4783 * is never reached
4784 */ 4784 */
4785 WARN_ON(1); 4785 WARN_ON(1);
4786 err = -EINVAL; 4786 err = -ENOTTY;
4787 break; 4787 break;
4788 4788
4789 } 4789 }
@@ -5051,7 +5051,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
5051 /* Set the per device memory buffer space. 5051 /* Set the per device memory buffer space.
5052 * Not applicable in our case */ 5052 * Not applicable in our case */
5053 case SIOCSIFLINK: 5053 case SIOCSIFLINK:
5054 return -EINVAL; 5054 return -ENOTTY;
5055 5055
5056 /* 5056 /*
5057 * Unknown or private ioctl. 5057 * Unknown or private ioctl.
@@ -5072,7 +5072,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
5072 /* Take care of Wireless Extensions */ 5072 /* Take care of Wireless Extensions */
5073 if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) 5073 if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST)
5074 return wext_handle_ioctl(net, &ifr, cmd, arg); 5074 return wext_handle_ioctl(net, &ifr, cmd, arg);
5075 return -EINVAL; 5075 return -ENOTTY;
5076 } 5076 }
5077} 5077}
5078 5078
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index 87bb5f4de0e8..c53ded2a98df 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -41,12 +41,12 @@ config NET_DSA_MV88E6XXX_NEED_PPU
41 default n 41 default n
42 42
43config NET_DSA_MV88E6131 43config NET_DSA_MV88E6131
44 bool "Marvell 88E6095/6095F/6131 ethernet switch chip support" 44 bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
45 select NET_DSA_MV88E6XXX 45 select NET_DSA_MV88E6XXX
46 select NET_DSA_MV88E6XXX_NEED_PPU 46 select NET_DSA_MV88E6XXX_NEED_PPU
47 select NET_DSA_TAG_DSA 47 select NET_DSA_TAG_DSA
48 ---help--- 48 ---help---
49 This enables support for the Marvell 88E6095/6095F/6131 49 This enables support for the Marvell 88E6085/6095/6095F/6131
50 ethernet switch chips. 50 ethernet switch chips.
51 51
52config NET_DSA_MV88E6123_61_65 52config NET_DSA_MV88E6123_61_65
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 3da418894efc..45f7411e90ba 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -207,8 +207,15 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
207 * mode, but do not enable forwarding of unknown unicasts. 207 * mode, but do not enable forwarding of unknown unicasts.
208 */ 208 */
209 val = 0x0433; 209 val = 0x0433;
210 if (p == dsa_upstream_port(ds)) 210 if (p == dsa_upstream_port(ds)) {
211 val |= 0x0104; 211 val |= 0x0104;
212 /*
213 * On 6085, unknown multicast forward is controlled
214 * here rather than in Port Control 2 register.
215 */
216 if (ps->id == ID_6085)
217 val |= 0x0008;
218 }
212 if (ds->dsa_port_mask & (1 << p)) 219 if (ds->dsa_port_mask & (1 << p))
213 val |= 0x0100; 220 val |= 0x0100;
214 REG_WRITE(addr, 0x04, val); 221 REG_WRITE(addr, 0x04, val);
@@ -251,10 +258,19 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
251 * If this is the upstream port for this switch, enable 258 * If this is the upstream port for this switch, enable
252 * forwarding of unknown multicast addresses. 259 * forwarding of unknown multicast addresses.
253 */ 260 */
254 val = 0x0080 | dsa_upstream_port(ds); 261 if (ps->id == ID_6085)
255 if (p == dsa_upstream_port(ds)) 262 /*
256 val |= 0x0040; 263 * on 6085, bits 3:0 are reserved, bit 6 control ARP
257 REG_WRITE(addr, 0x08, val); 264 * mirroring, and multicast forward is handled in
265 * Port Control register.
266 */
267 REG_WRITE(addr, 0x08, 0x0080);
268 else {
269 val = 0x0080 | dsa_upstream_port(ds);
270 if (p == dsa_upstream_port(ds))
271 val |= 0x0040;
272 REG_WRITE(addr, 0x08, val);
273 }
258 274
259 /* 275 /*
260 * Rate Control: disable ingress rate limiting. 276 * Rate Control: disable ingress rate limiting.
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 5345b0bee6df..cd9ca0811cfa 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1680,7 +1680,7 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)
1680 return; 1680 return;
1681 1681
1682 cnf->sysctl = NULL; 1682 cnf->sysctl = NULL;
1683 unregister_sysctl_table(t->sysctl_header); 1683 unregister_net_sysctl_table(t->sysctl_header);
1684 kfree(t->dev_name); 1684 kfree(t->dev_name);
1685 kfree(t); 1685 kfree(t);
1686} 1686}
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 9ac481a10d37..6375c1c5f642 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1998,9 +1998,6 @@ struct fib_table *fib_trie_table(u32 id)
1998 t = (struct trie *) tb->tb_data; 1998 t = (struct trie *) tb->tb_data;
1999 memset(t, 0, sizeof(*t)); 1999 memset(t, 0, sizeof(*t));
2000 2000
2001 if (id == RT_TABLE_LOCAL)
2002 pr_info("IPv4 FIB: Using LC-trie version %s\n", VERSION);
2003
2004 return tb; 2001 return tb;
2005} 2002}
2006 2003
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index a1151b8adf3c..b1d282f11be7 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -223,31 +223,30 @@ static void ip_expire(unsigned long arg)
223 223
224 if ((qp->q.last_in & INET_FRAG_FIRST_IN) && qp->q.fragments != NULL) { 224 if ((qp->q.last_in & INET_FRAG_FIRST_IN) && qp->q.fragments != NULL) {
225 struct sk_buff *head = qp->q.fragments; 225 struct sk_buff *head = qp->q.fragments;
226 const struct iphdr *iph;
227 int err;
226 228
227 rcu_read_lock(); 229 rcu_read_lock();
228 head->dev = dev_get_by_index_rcu(net, qp->iif); 230 head->dev = dev_get_by_index_rcu(net, qp->iif);
229 if (!head->dev) 231 if (!head->dev)
230 goto out_rcu_unlock; 232 goto out_rcu_unlock;
231 233
234 /* skb dst is stale, drop it, and perform route lookup again */
235 skb_dst_drop(head);
236 iph = ip_hdr(head);
237 err = ip_route_input_noref(head, iph->daddr, iph->saddr,
238 iph->tos, head->dev);
239 if (err)
240 goto out_rcu_unlock;
241
232 /* 242 /*
233 * Only search router table for the head fragment, 243 * Only an end host needs to send an ICMP
234 * when defraging timeout at PRE_ROUTING HOOK. 244 * "Fragment Reassembly Timeout" message, per RFC792.
235 */ 245 */
236 if (qp->user == IP_DEFRAG_CONNTRACK_IN && !skb_dst(head)) { 246 if (qp->user == IP_DEFRAG_CONNTRACK_IN &&
237 const struct iphdr *iph = ip_hdr(head); 247 skb_rtable(head)->rt_type != RTN_LOCAL)
238 int err = ip_route_input(head, iph->daddr, iph->saddr, 248 goto out_rcu_unlock;
239 iph->tos, head->dev);
240 if (unlikely(err))
241 goto out_rcu_unlock;
242
243 /*
244 * Only an end host needs to send an ICMP
245 * "Fragment Reassembly Timeout" message, per RFC792.
246 */
247 if (skb_rtable(head)->rt_type != RTN_LOCAL)
248 goto out_rcu_unlock;
249 249
250 }
251 250
252 /* Send an ICMP "Fragment Reassembly Timeout" message. */ 251 /* Send an ICMP "Fragment Reassembly Timeout" message. */
253 icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0); 252 icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c663a3b70924..f2f9b2e3cfe9 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4539,7 +4539,7 @@ static void __addrconf_sysctl_unregister(struct ipv6_devconf *p)
4539 4539
4540 t = p->sysctl; 4540 t = p->sysctl;
4541 p->sysctl = NULL; 4541 p->sysctl = NULL;
4542 unregister_sysctl_table(t->sysctl_header); 4542 unregister_net_sysctl_table(t->sysctl_header);
4543 kfree(t->dev_name); 4543 kfree(t->dev_name);
4544 kfree(t); 4544 kfree(t);
4545} 4545}
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index e97b4b7ca2f2..1ac7938dd9ec 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -371,7 +371,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
371 iv = esp_tmp_iv(aead, tmp, seqhilen); 371 iv = esp_tmp_iv(aead, tmp, seqhilen);
372 req = esp_tmp_req(aead, iv); 372 req = esp_tmp_req(aead, iv);
373 asg = esp_req_sg(aead, req); 373 asg = esp_req_sg(aead, req);
374 sg = asg + 1; 374 sg = asg + sglists;
375 375
376 skb->ip_summed = CHECKSUM_NONE; 376 skb->ip_summed = CHECKSUM_NONE;
377 377
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 3a43a8304768..b1d75beb7e20 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -524,6 +524,8 @@ static int unix_dgram_connect(struct socket *, struct sockaddr *,
524 int, int); 524 int, int);
525static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, 525static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *,
526 struct msghdr *, size_t); 526 struct msghdr *, size_t);
527static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *,
528 struct msghdr *, size_t, int);
527 529
528static const struct proto_ops unix_stream_ops = { 530static const struct proto_ops unix_stream_ops = {
529 .family = PF_UNIX, 531 .family = PF_UNIX,
@@ -583,7 +585,7 @@ static const struct proto_ops unix_seqpacket_ops = {
583 .setsockopt = sock_no_setsockopt, 585 .setsockopt = sock_no_setsockopt,
584 .getsockopt = sock_no_getsockopt, 586 .getsockopt = sock_no_getsockopt,
585 .sendmsg = unix_seqpacket_sendmsg, 587 .sendmsg = unix_seqpacket_sendmsg,
586 .recvmsg = unix_dgram_recvmsg, 588 .recvmsg = unix_seqpacket_recvmsg,
587 .mmap = sock_no_mmap, 589 .mmap = sock_no_mmap,
588 .sendpage = sock_no_sendpage, 590 .sendpage = sock_no_sendpage,
589}; 591};
@@ -1699,6 +1701,18 @@ static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
1699 return unix_dgram_sendmsg(kiocb, sock, msg, len); 1701 return unix_dgram_sendmsg(kiocb, sock, msg, len);
1700} 1702}
1701 1703
1704static int unix_seqpacket_recvmsg(struct kiocb *iocb, struct socket *sock,
1705 struct msghdr *msg, size_t size,
1706 int flags)
1707{
1708 struct sock *sk = sock->sk;
1709
1710 if (sk->sk_state != TCP_ESTABLISHED)
1711 return -ENOTCONN;
1712
1713 return unix_dgram_recvmsg(iocb, sock, msg, size, flags);
1714}
1715
1702static void unix_copy_addr(struct msghdr *msg, struct sock *sk) 1716static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
1703{ 1717{
1704 struct unix_sock *u = unix_sk(sk); 1718 struct unix_sock *u = unix_sk(sk);
diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c
index f218385950ca..e8a781422feb 100644
--- a/net/xfrm/xfrm_replay.c
+++ b/net/xfrm/xfrm_replay.c
@@ -532,7 +532,7 @@ int xfrm_init_replay(struct xfrm_state *x)
532 532
533 if (replay_esn) { 533 if (replay_esn) {
534 if (replay_esn->replay_window > 534 if (replay_esn->replay_window >
535 replay_esn->bmp_len * sizeof(__u32)) 535 replay_esn->bmp_len * sizeof(__u32) * 8)
536 return -EINVAL; 536 return -EINVAL;
537 537
538 if ((x->props.flags & XFRM_STATE_ESN) && x->replay_esn) 538 if ((x->props.flags & XFRM_STATE_ESN) && x->replay_esn)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 5d1d60d3ca83..c658cb3bc7c3 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -124,6 +124,9 @@ static inline int verify_replay(struct xfrm_usersa_info *p,
124{ 124{
125 struct nlattr *rt = attrs[XFRMA_REPLAY_ESN_VAL]; 125 struct nlattr *rt = attrs[XFRMA_REPLAY_ESN_VAL];
126 126
127 if ((p->flags & XFRM_STATE_ESN) && !rt)
128 return -EINVAL;
129
127 if (!rt) 130 if (!rt)
128 return 0; 131 return 0;
129 132