diff options
42 files changed, 247 insertions, 120 deletions
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt index 4164f5c02e4b..f310edec8a77 100644 --- a/Documentation/networking/netdev-features.txt +++ b/Documentation/networking/netdev-features.txt | |||
| @@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet. | |||
| 164 | This requests that the NIC receive all possible frames, including errored | 164 | This requests that the NIC receive all possible frames, including errored |
| 165 | frames (such as bad FCS, etc). This can be helpful when sniffing a link with | 165 | frames (such as bad FCS, etc). This can be helpful when sniffing a link with |
| 166 | bad packets on it. Some NICs may receive more packets if also put into normal | 166 | bad packets on it. Some NICs may receive more packets if also put into normal |
| 167 | PROMISC mdoe. | 167 | PROMISC mode. |
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index fc2de5528dcc..b00000e8aef6 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
| @@ -67,6 +67,7 @@ static struct usb_device_id ath3k_table[] = { | |||
| 67 | { USB_DEVICE(0x13d3, 0x3304) }, | 67 | { USB_DEVICE(0x13d3, 0x3304) }, |
| 68 | { USB_DEVICE(0x0930, 0x0215) }, | 68 | { USB_DEVICE(0x0930, 0x0215) }, |
| 69 | { USB_DEVICE(0x0489, 0xE03D) }, | 69 | { USB_DEVICE(0x0489, 0xE03D) }, |
| 70 | { USB_DEVICE(0x0489, 0xE027) }, | ||
| 70 | 71 | ||
| 71 | /* Atheros AR9285 Malbec with sflash firmware */ | 72 | /* Atheros AR9285 Malbec with sflash firmware */ |
| 72 | { USB_DEVICE(0x03F0, 0x311D) }, | 73 | { USB_DEVICE(0x03F0, 0x311D) }, |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index debda27df9b0..ee82f2fb65f0 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
| @@ -124,6 +124,7 @@ static struct usb_device_id blacklist_table[] = { | |||
| 124 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, | 124 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, |
| 125 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, | 125 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, |
| 126 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, | 126 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, |
| 127 | { USB_DEVICE(0x0489, 0xe027), .driver_info = BTUSB_IGNORE }, | ||
| 127 | 128 | ||
| 128 | /* Atheros AR9285 Malbec with sflash firmware */ | 129 | /* Atheros AR9285 Malbec with sflash firmware */ |
| 129 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, | 130 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 92317e9c0f73..60ac46f4ac08 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
| @@ -1860,10 +1860,14 @@ jme_open(struct net_device *netdev) | |||
| 1860 | jme_clear_pm(jme); | 1860 | jme_clear_pm(jme); |
| 1861 | JME_NAPI_ENABLE(jme); | 1861 | JME_NAPI_ENABLE(jme); |
| 1862 | 1862 | ||
| 1863 | tasklet_enable(&jme->linkch_task); | 1863 | tasklet_init(&jme->linkch_task, jme_link_change_tasklet, |
| 1864 | tasklet_enable(&jme->txclean_task); | 1864 | (unsigned long) jme); |
| 1865 | tasklet_hi_enable(&jme->rxclean_task); | 1865 | tasklet_init(&jme->txclean_task, jme_tx_clean_tasklet, |
| 1866 | tasklet_hi_enable(&jme->rxempty_task); | 1866 | (unsigned long) jme); |
| 1867 | tasklet_init(&jme->rxclean_task, jme_rx_clean_tasklet, | ||
| 1868 | (unsigned long) jme); | ||
| 1869 | tasklet_init(&jme->rxempty_task, jme_rx_empty_tasklet, | ||
| 1870 | (unsigned long) jme); | ||
| 1867 | 1871 | ||
| 1868 | rc = jme_request_irq(jme); | 1872 | rc = jme_request_irq(jme); |
| 1869 | if (rc) | 1873 | if (rc) |
| @@ -3079,22 +3083,6 @@ jme_init_one(struct pci_dev *pdev, | |||
| 3079 | tasklet_init(&jme->pcc_task, | 3083 | tasklet_init(&jme->pcc_task, |
| 3080 | jme_pcc_tasklet, | 3084 | jme_pcc_tasklet, |
| 3081 | (unsigned long) jme); | 3085 | (unsigned long) jme); |
| 3082 | tasklet_init(&jme->linkch_task, | ||
| 3083 | jme_link_change_tasklet, | ||
| 3084 | (unsigned long) jme); | ||
| 3085 | tasklet_init(&jme->txclean_task, | ||
| 3086 | jme_tx_clean_tasklet, | ||
| 3087 | (unsigned long) jme); | ||
| 3088 | tasklet_init(&jme->rxclean_task, | ||
| 3089 | jme_rx_clean_tasklet, | ||
| 3090 | (unsigned long) jme); | ||
| 3091 | tasklet_init(&jme->rxempty_task, | ||
| 3092 | jme_rx_empty_tasklet, | ||
| 3093 | (unsigned long) jme); | ||
| 3094 | tasklet_disable_nosync(&jme->linkch_task); | ||
| 3095 | tasklet_disable_nosync(&jme->txclean_task); | ||
| 3096 | tasklet_disable_nosync(&jme->rxclean_task); | ||
| 3097 | tasklet_disable_nosync(&jme->rxempty_task); | ||
| 3098 | jme->dpi.cur = PCC_P1; | 3086 | jme->dpi.cur = PCC_P1; |
| 3099 | 3087 | ||
| 3100 | jme->reg_ghc = 0; | 3088 | jme->reg_ghc = 0; |
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index e558edd1cb6c..69e01977a1dd 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c | |||
| @@ -5459,8 +5459,10 @@ static int prepare_hardware(struct net_device *dev) | |||
| 5459 | rc = request_irq(dev->irq, netdev_intr, IRQF_SHARED, dev->name, dev); | 5459 | rc = request_irq(dev->irq, netdev_intr, IRQF_SHARED, dev->name, dev); |
| 5460 | if (rc) | 5460 | if (rc) |
| 5461 | return rc; | 5461 | return rc; |
| 5462 | tasklet_enable(&hw_priv->rx_tasklet); | 5462 | tasklet_init(&hw_priv->rx_tasklet, rx_proc_task, |
| 5463 | tasklet_enable(&hw_priv->tx_tasklet); | 5463 | (unsigned long) hw_priv); |
| 5464 | tasklet_init(&hw_priv->tx_tasklet, tx_proc_task, | ||
| 5465 | (unsigned long) hw_priv); | ||
| 5464 | 5466 | ||
| 5465 | hw->promiscuous = 0; | 5467 | hw->promiscuous = 0; |
| 5466 | hw->all_multi = 0; | 5468 | hw->all_multi = 0; |
| @@ -7033,16 +7035,6 @@ static int __devinit pcidev_init(struct pci_dev *pdev, | |||
| 7033 | spin_lock_init(&hw_priv->hwlock); | 7035 | spin_lock_init(&hw_priv->hwlock); |
| 7034 | mutex_init(&hw_priv->lock); | 7036 | mutex_init(&hw_priv->lock); |
| 7035 | 7037 | ||
| 7036 | /* tasklet is enabled. */ | ||
| 7037 | tasklet_init(&hw_priv->rx_tasklet, rx_proc_task, | ||
| 7038 | (unsigned long) hw_priv); | ||
| 7039 | tasklet_init(&hw_priv->tx_tasklet, tx_proc_task, | ||
| 7040 | (unsigned long) hw_priv); | ||
| 7041 | |||
| 7042 | /* tasklet_enable will decrement the atomic counter. */ | ||
| 7043 | tasklet_disable(&hw_priv->rx_tasklet); | ||
| 7044 | tasklet_disable(&hw_priv->tx_tasklet); | ||
| 7045 | |||
| 7046 | for (i = 0; i < TOTAL_PORT_NUM; i++) | 7038 | for (i = 0; i < TOTAL_PORT_NUM; i++) |
| 7047 | init_waitqueue_head(&hw_priv->counter[i].counter); | 7039 | init_waitqueue_head(&hw_priv->counter[i].counter); |
| 7048 | 7040 | ||
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 62d1baf111ea..c53c0f4e2ce3 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
| @@ -2110,7 +2110,7 @@ static void __devinit smsc911x_read_mac_address(struct net_device *dev) | |||
| 2110 | static int __devinit smsc911x_init(struct net_device *dev) | 2110 | static int __devinit smsc911x_init(struct net_device *dev) |
| 2111 | { | 2111 | { |
| 2112 | struct smsc911x_data *pdata = netdev_priv(dev); | 2112 | struct smsc911x_data *pdata = netdev_priv(dev); |
| 2113 | unsigned int byte_test; | 2113 | unsigned int byte_test, mask; |
| 2114 | unsigned int to = 100; | 2114 | unsigned int to = 100; |
| 2115 | 2115 | ||
| 2116 | SMSC_TRACE(pdata, probe, "Driver Parameters:"); | 2116 | SMSC_TRACE(pdata, probe, "Driver Parameters:"); |
| @@ -2130,9 +2130,22 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
| 2130 | /* | 2130 | /* |
| 2131 | * poll the READY bit in PMT_CTRL. Any other access to the device is | 2131 | * poll the READY bit in PMT_CTRL. Any other access to the device is |
| 2132 | * forbidden while this bit isn't set. Try for 100ms | 2132 | * forbidden while this bit isn't set. Try for 100ms |
| 2133 | * | ||
| 2134 | * Note that this test is done before the WORD_SWAP register is | ||
| 2135 | * programmed. So in some configurations the READY bit is at 16 before | ||
| 2136 | * WORD_SWAP is written to. This issue is worked around by waiting | ||
| 2137 | * until either bit 0 or bit 16 gets set in PMT_CTRL. | ||
| 2138 | * | ||
| 2139 | * SMSC has confirmed that checking bit 16 (marked as reserved in | ||
| 2140 | * the datasheet) is fine since these bits "will either never be set | ||
| 2141 | * or can only go high after READY does (so also indicate the device | ||
| 2142 | * is ready)". | ||
| 2133 | */ | 2143 | */ |
| 2134 | while (!(smsc911x_reg_read(pdata, PMT_CTRL) & PMT_CTRL_READY_) && --to) | 2144 | |
| 2145 | mask = PMT_CTRL_READY_ | swahw32(PMT_CTRL_READY_); | ||
| 2146 | while (!(smsc911x_reg_read(pdata, PMT_CTRL) & mask) && --to) | ||
| 2135 | udelay(1000); | 2147 | udelay(1000); |
| 2148 | |||
| 2136 | if (to == 0) { | 2149 | if (to == 0) { |
| 2137 | pr_err("Device not READY in 100ms aborting\n"); | 2150 | pr_err("Device not READY in 100ms aborting\n"); |
| 2138 | return -ENODEV; | 2151 | return -ENODEV; |
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 4e9810013850..66e025ad5df1 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
| @@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev) | |||
| 917 | ingress_irq = rc; | 917 | ingress_irq = rc; |
| 918 | tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU); | 918 | tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU); |
| 919 | rc = request_irq(ingress_irq, tile_net_handle_ingress_irq, | 919 | rc = request_irq(ingress_irq, tile_net_handle_ingress_irq, |
| 920 | 0, NULL, NULL); | 920 | 0, "tile_net", NULL); |
| 921 | if (rc != 0) { | 921 | if (rc != 0) { |
| 922 | netdev_err(dev, "request_irq failed: %d\n", rc); | 922 | netdev_err(dev, "request_irq failed: %d\n", rc); |
| 923 | destroy_irq(ingress_irq); | 923 | destroy_irq(ingress_irq); |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 1d04754a6637..77e6db9dcfed 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
| @@ -942,6 +942,10 @@ static int axienet_open(struct net_device *ndev) | |||
| 942 | phy_start(lp->phy_dev); | 942 | phy_start(lp->phy_dev); |
| 943 | } | 943 | } |
| 944 | 944 | ||
| 945 | /* Enable tasklets for Axi DMA error handling */ | ||
| 946 | tasklet_init(&lp->dma_err_tasklet, axienet_dma_err_handler, | ||
| 947 | (unsigned long) lp); | ||
| 948 | |||
| 945 | /* Enable interrupts for Axi DMA Tx */ | 949 | /* Enable interrupts for Axi DMA Tx */ |
| 946 | ret = request_irq(lp->tx_irq, axienet_tx_irq, 0, ndev->name, ndev); | 950 | ret = request_irq(lp->tx_irq, axienet_tx_irq, 0, ndev->name, ndev); |
| 947 | if (ret) | 951 | if (ret) |
| @@ -950,8 +954,7 @@ static int axienet_open(struct net_device *ndev) | |||
| 950 | ret = request_irq(lp->rx_irq, axienet_rx_irq, 0, ndev->name, ndev); | 954 | ret = request_irq(lp->rx_irq, axienet_rx_irq, 0, ndev->name, ndev); |
| 951 | if (ret) | 955 | if (ret) |
| 952 | goto err_rx_irq; | 956 | goto err_rx_irq; |
| 953 | /* Enable tasklets for Axi DMA error handling */ | 957 | |
| 954 | tasklet_enable(&lp->dma_err_tasklet); | ||
| 955 | return 0; | 958 | return 0; |
| 956 | 959 | ||
| 957 | err_rx_irq: | 960 | err_rx_irq: |
| @@ -960,6 +963,7 @@ err_tx_irq: | |||
| 960 | if (lp->phy_dev) | 963 | if (lp->phy_dev) |
| 961 | phy_disconnect(lp->phy_dev); | 964 | phy_disconnect(lp->phy_dev); |
| 962 | lp->phy_dev = NULL; | 965 | lp->phy_dev = NULL; |
| 966 | tasklet_kill(&lp->dma_err_tasklet); | ||
| 963 | dev_err(lp->dev, "request_irq() failed\n"); | 967 | dev_err(lp->dev, "request_irq() failed\n"); |
| 964 | return ret; | 968 | return ret; |
| 965 | } | 969 | } |
| @@ -1613,10 +1617,6 @@ static int __devinit axienet_of_probe(struct platform_device *op) | |||
| 1613 | goto err_iounmap_2; | 1617 | goto err_iounmap_2; |
| 1614 | } | 1618 | } |
| 1615 | 1619 | ||
| 1616 | tasklet_init(&lp->dma_err_tasklet, axienet_dma_err_handler, | ||
| 1617 | (unsigned long) lp); | ||
| 1618 | tasklet_disable(&lp->dma_err_tasklet); | ||
| 1619 | |||
| 1620 | return 0; | 1620 | return 0; |
| 1621 | 1621 | ||
| 1622 | err_iounmap_2: | 1622 | err_iounmap_2: |
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index 6428fcbbdd4b..daec9b05d168 100644 --- a/drivers/net/phy/mdio-bitbang.c +++ b/drivers/net/phy/mdio-bitbang.c | |||
| @@ -234,7 +234,6 @@ void free_mdio_bitbang(struct mii_bus *bus) | |||
| 234 | struct mdiobb_ctrl *ctrl = bus->priv; | 234 | struct mdiobb_ctrl *ctrl = bus->priv; |
| 235 | 235 | ||
| 236 | module_put(ctrl->ops->owner); | 236 | module_put(ctrl->ops->owner); |
| 237 | mdiobus_unregister(bus); | ||
| 238 | mdiobus_free(bus); | 237 | mdiobus_free(bus); |
| 239 | } | 238 | } |
| 240 | EXPORT_SYMBOL(free_mdio_bitbang); | 239 | EXPORT_SYMBOL(free_mdio_bitbang); |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 4cd582a4f625..74fab1a40156 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
| @@ -540,10 +540,12 @@ advance: | |||
| 540 | (ctx->ether_desc == NULL) || (ctx->control != intf)) | 540 | (ctx->ether_desc == NULL) || (ctx->control != intf)) |
| 541 | goto error; | 541 | goto error; |
| 542 | 542 | ||
| 543 | /* claim interfaces, if any */ | 543 | /* claim data interface, if different from control */ |
| 544 | temp = usb_driver_claim_interface(driver, ctx->data, dev); | 544 | if (ctx->data != ctx->control) { |
| 545 | if (temp) | 545 | temp = usb_driver_claim_interface(driver, ctx->data, dev); |
| 546 | goto error; | 546 | if (temp) |
| 547 | goto error; | ||
| 548 | } | ||
| 547 | 549 | ||
| 548 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; | 550 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; |
| 549 | 551 | ||
| @@ -623,6 +625,10 @@ static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf) | |||
| 623 | 625 | ||
| 624 | tasklet_kill(&ctx->bh); | 626 | tasklet_kill(&ctx->bh); |
| 625 | 627 | ||
| 628 | /* handle devices with combined control and data interface */ | ||
| 629 | if (ctx->control == ctx->data) | ||
| 630 | ctx->data = NULL; | ||
| 631 | |||
| 626 | /* disconnect master --> disconnect slave */ | 632 | /* disconnect master --> disconnect slave */ |
| 627 | if (intf == ctx->control && ctx->data) { | 633 | if (intf == ctx->control && ctx->data) { |
| 628 | usb_set_intfdata(ctx->data, NULL); | 634 | usb_set_intfdata(ctx->data, NULL); |
| @@ -1245,6 +1251,14 @@ static const struct usb_device_id cdc_devs[] = { | |||
| 1245 | .driver_info = (unsigned long) &wwan_info, | 1251 | .driver_info = (unsigned long) &wwan_info, |
| 1246 | }, | 1252 | }, |
| 1247 | 1253 | ||
| 1254 | /* Huawei NCM devices disguised as vendor specific */ | ||
| 1255 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16), | ||
| 1256 | .driver_info = (unsigned long)&wwan_info, | ||
| 1257 | }, | ||
| 1258 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46), | ||
| 1259 | .driver_info = (unsigned long)&wwan_info, | ||
| 1260 | }, | ||
| 1261 | |||
| 1248 | /* Generic CDC-NCM devices */ | 1262 | /* Generic CDC-NCM devices */ |
| 1249 | { USB_INTERFACE_INFO(USB_CLASS_COMM, | 1263 | { USB_INTERFACE_INFO(USB_CLASS_COMM, |
| 1250 | USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), | 1264 | USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 3286166415b4..362cb8cfeb92 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
| @@ -184,7 +184,7 @@ static int smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx) | |||
| 184 | /* set the address, index & direction (read from PHY) */ | 184 | /* set the address, index & direction (read from PHY) */ |
| 185 | phy_id &= dev->mii.phy_id_mask; | 185 | phy_id &= dev->mii.phy_id_mask; |
| 186 | idx &= dev->mii.reg_num_mask; | 186 | idx &= dev->mii.reg_num_mask; |
| 187 | addr = (phy_id << 11) | (idx << 6) | MII_READ_; | 187 | addr = (phy_id << 11) | (idx << 6) | MII_READ_ | MII_BUSY_; |
| 188 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); | 188 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); |
| 189 | check_warn_goto_done(ret, "Error writing MII_ADDR"); | 189 | check_warn_goto_done(ret, "Error writing MII_ADDR"); |
| 190 | 190 | ||
| @@ -221,7 +221,7 @@ static void smsc95xx_mdio_write(struct net_device *netdev, int phy_id, int idx, | |||
| 221 | /* set the address, index & direction (write to PHY) */ | 221 | /* set the address, index & direction (write to PHY) */ |
| 222 | phy_id &= dev->mii.phy_id_mask; | 222 | phy_id &= dev->mii.phy_id_mask; |
| 223 | idx &= dev->mii.reg_num_mask; | 223 | idx &= dev->mii.reg_num_mask; |
| 224 | addr = (phy_id << 11) | (idx << 6) | MII_WRITE_; | 224 | addr = (phy_id << 11) | (idx << 6) | MII_WRITE_ | MII_BUSY_; |
| 225 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); | 225 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); |
| 226 | check_warn_goto_done(ret, "Error writing MII_ADDR"); | 226 | check_warn_goto_done(ret, "Error writing MII_ADDR"); |
| 227 | 227 | ||
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 7b4adde93c01..8b5c61917076 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * VXLAN: Virtual eXtensiable Local Area Network | 2 | * VXLAN: Virtual eXtensible Local Area Network |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2012 Vyatta Inc. | 4 | * Copyright (c) 2012 Vyatta Inc. |
| 5 | * | 5 | * |
| @@ -50,8 +50,8 @@ | |||
| 50 | 50 | ||
| 51 | #define VXLAN_N_VID (1u << 24) | 51 | #define VXLAN_N_VID (1u << 24) |
| 52 | #define VXLAN_VID_MASK (VXLAN_N_VID - 1) | 52 | #define VXLAN_VID_MASK (VXLAN_N_VID - 1) |
| 53 | /* VLAN + IP header + UDP + VXLAN */ | 53 | /* IP header + UDP + VXLAN + Ethernet header */ |
| 54 | #define VXLAN_HEADROOM (4 + 20 + 8 + 8) | 54 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) |
| 55 | 55 | ||
| 56 | #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ | 56 | #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ |
| 57 | 57 | ||
| @@ -1102,6 +1102,10 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, | |||
| 1102 | 1102 | ||
| 1103 | if (!tb[IFLA_MTU]) | 1103 | if (!tb[IFLA_MTU]) |
| 1104 | dev->mtu = lowerdev->mtu - VXLAN_HEADROOM; | 1104 | dev->mtu = lowerdev->mtu - VXLAN_HEADROOM; |
| 1105 | |||
| 1106 | /* update header length based on lower device */ | ||
| 1107 | dev->hard_header_len = lowerdev->hard_header_len + | ||
| 1108 | VXLAN_HEADROOM; | ||
| 1105 | } | 1109 | } |
| 1106 | 1110 | ||
| 1107 | if (data[IFLA_VXLAN_TOS]) | 1111 | if (data[IFLA_VXLAN_TOS]) |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index a6f1e8166008..481345c23ded 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
| @@ -4401,7 +4401,7 @@ static s32 brcmf_mode_to_nl80211_iftype(s32 mode) | |||
| 4401 | 4401 | ||
| 4402 | static void brcmf_wiphy_pno_params(struct wiphy *wiphy) | 4402 | static void brcmf_wiphy_pno_params(struct wiphy *wiphy) |
| 4403 | { | 4403 | { |
| 4404 | #ifndef CONFIG_BRCMFISCAN | 4404 | #ifndef CONFIG_BRCMISCAN |
| 4405 | /* scheduled scan settings */ | 4405 | /* scheduled scan settings */ |
| 4406 | wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT; | 4406 | wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT; |
| 4407 | wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT; | 4407 | wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index ff8162d4c454..fa4d1b8cd9f6 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c | |||
| @@ -521,7 +521,7 @@ static void iwlagn_mac_tx(struct ieee80211_hw *hw, | |||
| 521 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 521 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
| 522 | 522 | ||
| 523 | if (iwlagn_tx_skb(priv, control->sta, skb)) | 523 | if (iwlagn_tx_skb(priv, control->sta, skb)) |
| 524 | dev_kfree_skb_any(skb); | 524 | ieee80211_free_txskb(hw, skb); |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw, | 527 | static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 7ff3f1430678..408132cf83c1 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c | |||
| @@ -2114,7 +2114,7 @@ static void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) | |||
| 2114 | 2114 | ||
| 2115 | info = IEEE80211_SKB_CB(skb); | 2115 | info = IEEE80211_SKB_CB(skb); |
| 2116 | iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); | 2116 | iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); |
| 2117 | dev_kfree_skb_any(skb); | 2117 | ieee80211_free_txskb(priv->hw, skb); |
| 2118 | } | 2118 | } |
| 2119 | 2119 | ||
| 2120 | static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | 2120 | static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 17c8e5d82681..bb69f8f90b3b 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
| @@ -321,6 +321,14 @@ static void iwl_rx_allocate(struct iwl_trans *trans, gfp_t priority) | |||
| 321 | dma_map_page(trans->dev, page, 0, | 321 | dma_map_page(trans->dev, page, 0, |
| 322 | PAGE_SIZE << trans_pcie->rx_page_order, | 322 | PAGE_SIZE << trans_pcie->rx_page_order, |
| 323 | DMA_FROM_DEVICE); | 323 | DMA_FROM_DEVICE); |
| 324 | if (dma_mapping_error(trans->dev, rxb->page_dma)) { | ||
| 325 | rxb->page = NULL; | ||
| 326 | spin_lock_irqsave(&rxq->lock, flags); | ||
| 327 | list_add(&rxb->list, &rxq->rx_used); | ||
| 328 | spin_unlock_irqrestore(&rxq->lock, flags); | ||
| 329 | __free_pages(page, trans_pcie->rx_page_order); | ||
| 330 | return; | ||
| 331 | } | ||
| 324 | /* dma address must be no more than 36 bits */ | 332 | /* dma address must be no more than 36 bits */ |
| 325 | BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); | 333 | BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); |
| 326 | /* and also 256 byte aligned! */ | 334 | /* and also 256 byte aligned! */ |
| @@ -488,8 +496,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, | |||
| 488 | dma_map_page(trans->dev, rxb->page, 0, | 496 | dma_map_page(trans->dev, rxb->page, 0, |
| 489 | PAGE_SIZE << trans_pcie->rx_page_order, | 497 | PAGE_SIZE << trans_pcie->rx_page_order, |
| 490 | DMA_FROM_DEVICE); | 498 | DMA_FROM_DEVICE); |
| 491 | list_add_tail(&rxb->list, &rxq->rx_free); | 499 | if (dma_mapping_error(trans->dev, rxb->page_dma)) { |
| 492 | rxq->free_count++; | 500 | /* |
| 501 | * free the page(s) as well to not break | ||
| 502 | * the invariant that the items on the used | ||
| 503 | * list have no page(s) | ||
| 504 | */ | ||
| 505 | __free_pages(rxb->page, trans_pcie->rx_page_order); | ||
| 506 | rxb->page = NULL; | ||
| 507 | list_add_tail(&rxb->list, &rxq->rx_used); | ||
| 508 | } else { | ||
| 509 | list_add_tail(&rxb->list, &rxq->rx_free); | ||
| 510 | rxq->free_count++; | ||
| 511 | } | ||
| 493 | } else | 512 | } else |
| 494 | list_add_tail(&rxb->list, &rxq->rx_used); | 513 | list_add_tail(&rxb->list, &rxq->rx_used); |
| 495 | spin_unlock_irqrestore(&rxq->lock, flags); | 514 | spin_unlock_irqrestore(&rxq->lock, flags); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 3e25d3150456..4d6ba00d0047 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
| @@ -2942,13 +2942,33 @@ static int qeth_query_ipassists_cb(struct qeth_card *card, | |||
| 2942 | QETH_DBF_TEXT(SETUP, 2, "qipasscb"); | 2942 | QETH_DBF_TEXT(SETUP, 2, "qipasscb"); |
| 2943 | 2943 | ||
| 2944 | cmd = (struct qeth_ipa_cmd *) data; | 2944 | cmd = (struct qeth_ipa_cmd *) data; |
| 2945 | |||
| 2946 | switch (cmd->hdr.return_code) { | ||
| 2947 | case IPA_RC_NOTSUPP: | ||
| 2948 | case IPA_RC_L2_UNSUPPORTED_CMD: | ||
| 2949 | QETH_DBF_TEXT(SETUP, 2, "ipaunsup"); | ||
| 2950 | card->options.ipa4.supported_funcs |= IPA_SETADAPTERPARMS; | ||
| 2951 | card->options.ipa6.supported_funcs |= IPA_SETADAPTERPARMS; | ||
| 2952 | return -0; | ||
| 2953 | default: | ||
| 2954 | if (cmd->hdr.return_code) { | ||
| 2955 | QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Unhandled " | ||
| 2956 | "rc=%d\n", | ||
| 2957 | dev_name(&card->gdev->dev), | ||
| 2958 | cmd->hdr.return_code); | ||
| 2959 | return 0; | ||
| 2960 | } | ||
| 2961 | } | ||
| 2962 | |||
| 2945 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { | 2963 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { |
| 2946 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; | 2964 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; |
| 2947 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; | 2965 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; |
| 2948 | } else { | 2966 | } else if (cmd->hdr.prot_version == QETH_PROT_IPV6) { |
| 2949 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; | 2967 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; |
| 2950 | card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; | 2968 | card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; |
| 2951 | } | 2969 | } else |
| 2970 | QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Flawed LIC detected" | ||
| 2971 | "\n", dev_name(&card->gdev->dev)); | ||
| 2952 | QETH_DBF_TEXT(SETUP, 2, "suppenbl"); | 2972 | QETH_DBF_TEXT(SETUP, 2, "suppenbl"); |
| 2953 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported); | 2973 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported); |
| 2954 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled); | 2974 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled); |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index e67e0258aec5..fddb62654b6a 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
| @@ -626,10 +626,13 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card) | |||
| 626 | QETH_DBF_TEXT(SETUP, 2, "doL2init"); | 626 | QETH_DBF_TEXT(SETUP, 2, "doL2init"); |
| 627 | QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card)); | 627 | QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card)); |
| 628 | 628 | ||
| 629 | rc = qeth_query_setadapterparms(card); | 629 | if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) { |
| 630 | if (rc) { | 630 | rc = qeth_query_setadapterparms(card); |
| 631 | QETH_DBF_MESSAGE(2, "could not query adapter parameters on " | 631 | if (rc) { |
| 632 | "device %s: x%x\n", CARD_BUS_ID(card), rc); | 632 | QETH_DBF_MESSAGE(2, "could not query adapter " |
| 633 | "parameters on device %s: x%x\n", | ||
| 634 | CARD_BUS_ID(card), rc); | ||
| 635 | } | ||
| 633 | } | 636 | } |
| 634 | 637 | ||
| 635 | if (card->info.type == QETH_CARD_TYPE_IQD || | 638 | if (card->info.type == QETH_CARD_TYPE_IQD || |
| @@ -676,7 +679,7 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p) | |||
| 676 | return -ERESTARTSYS; | 679 | return -ERESTARTSYS; |
| 677 | } | 680 | } |
| 678 | rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); | 681 | rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); |
| 679 | if (!rc) | 682 | if (!rc || (rc == IPA_RC_L2_MAC_NOT_FOUND)) |
| 680 | rc = qeth_l2_send_setmac(card, addr->sa_data); | 683 | rc = qeth_l2_send_setmac(card, addr->sa_data); |
| 681 | return rc ? -EINVAL : 0; | 684 | return rc ? -EINVAL : 0; |
| 682 | } | 685 | } |
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index b9a28d2dd3e8..ce0684a1fc83 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
| @@ -325,6 +325,12 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
| 325 | 325 | ||
| 326 | soft_iface->last_rx = jiffies; | 326 | soft_iface->last_rx = jiffies; |
| 327 | 327 | ||
| 328 | /* Let the bridge loop avoidance check the packet. If will | ||
| 329 | * not handle it, we can safely push it up. | ||
| 330 | */ | ||
| 331 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
| 332 | goto out; | ||
| 333 | |||
| 328 | if (orig_node) | 334 | if (orig_node) |
| 329 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, | 335 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, |
| 330 | ethhdr->h_source); | 336 | ethhdr->h_source); |
| @@ -332,12 +338,6 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
| 332 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) | 338 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) |
| 333 | goto dropped; | 339 | goto dropped; |
| 334 | 340 | ||
| 335 | /* Let the bridge loop avoidance check the packet. If will | ||
| 336 | * not handle it, we can safely push it up. | ||
| 337 | */ | ||
| 338 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
| 339 | goto out; | ||
| 340 | |||
| 341 | netif_rx(skb); | 341 | netif_rx(skb); |
| 342 | goto out; | 342 | goto out; |
| 343 | 343 | ||
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 112edd371b2f..baae71585804 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
| @@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv, | |||
| 769 | */ | 769 | */ |
| 770 | tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP; | 770 | tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP; |
| 771 | 771 | ||
| 772 | /* the change can carry possible "attribute" flags like the | ||
| 773 | * TT_CLIENT_WIFI, therefore they have to be copied in the | ||
| 774 | * client entry | ||
| 775 | */ | ||
| 776 | tt_global_entry->common.flags |= flags; | ||
| 777 | |||
| 772 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only | 778 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only |
| 773 | * one originator left in the list and we previously received a | 779 | * one originator left in the list and we previously received a |
| 774 | * delete + roaming change for this originator. | 780 | * delete + roaming change for this originator. |
| @@ -1496,7 +1502,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
| 1496 | 1502 | ||
| 1497 | memcpy(tt_change->addr, tt_common_entry->addr, | 1503 | memcpy(tt_change->addr, tt_common_entry->addr, |
| 1498 | ETH_ALEN); | 1504 | ETH_ALEN); |
| 1499 | tt_change->flags = BATADV_NO_FLAGS; | 1505 | tt_change->flags = tt_common_entry->flags; |
| 1500 | 1506 | ||
| 1501 | tt_count++; | 1507 | tt_count++; |
| 1502 | tt_change++; | 1508 | tt_change++; |
| @@ -2450,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, | |||
| 2450 | { | 2456 | { |
| 2451 | bool ret = false; | 2457 | bool ret = false; |
| 2452 | 2458 | ||
| 2459 | /* if the originator is a backbone node (meaning it belongs to the same | ||
| 2460 | * LAN of this node) the temporary client must not be added because to | ||
| 2461 | * reach such destination the node must use the LAN instead of the mesh | ||
| 2462 | */ | ||
| 2463 | if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig)) | ||
| 2464 | goto out; | ||
| 2465 | |||
| 2453 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, | 2466 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, |
| 2454 | BATADV_TT_CLIENT_TEMP, | 2467 | BATADV_TT_CLIENT_TEMP, |
| 2455 | atomic_read(&orig_node->last_ttvn))) | 2468 | atomic_read(&orig_node->last_ttvn))) |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8a0ce706aebd..a0a2f97b9c62 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
| @@ -1754,11 +1754,11 @@ int hci_register_dev(struct hci_dev *hdev) | |||
| 1754 | if (hdev->dev_type != HCI_AMP) | 1754 | if (hdev->dev_type != HCI_AMP) |
| 1755 | set_bit(HCI_AUTO_OFF, &hdev->dev_flags); | 1755 | set_bit(HCI_AUTO_OFF, &hdev->dev_flags); |
| 1756 | 1756 | ||
| 1757 | schedule_work(&hdev->power_on); | ||
| 1758 | |||
| 1759 | hci_notify(hdev, HCI_DEV_REG); | 1757 | hci_notify(hdev, HCI_DEV_REG); |
| 1760 | hci_dev_hold(hdev); | 1758 | hci_dev_hold(hdev); |
| 1761 | 1759 | ||
| 1760 | schedule_work(&hdev->power_on); | ||
| 1761 | |||
| 1762 | return id; | 1762 | return id; |
| 1763 | 1763 | ||
| 1764 | err_wqueue: | 1764 | err_wqueue: |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index aa2ea0a8142c..91de4239da66 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
| @@ -326,7 +326,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
| 326 | struct hci_dev *d; | 326 | struct hci_dev *d; |
| 327 | size_t rp_len; | 327 | size_t rp_len; |
| 328 | u16 count; | 328 | u16 count; |
| 329 | int i, err; | 329 | int err; |
| 330 | 330 | ||
| 331 | BT_DBG("sock %p", sk); | 331 | BT_DBG("sock %p", sk); |
| 332 | 332 | ||
| @@ -347,9 +347,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
| 347 | return -ENOMEM; | 347 | return -ENOMEM; |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | rp->num_controllers = cpu_to_le16(count); | 350 | count = 0; |
| 351 | |||
| 352 | i = 0; | ||
| 353 | list_for_each_entry(d, &hci_dev_list, list) { | 351 | list_for_each_entry(d, &hci_dev_list, list) { |
| 354 | if (test_bit(HCI_SETUP, &d->dev_flags)) | 352 | if (test_bit(HCI_SETUP, &d->dev_flags)) |
| 355 | continue; | 353 | continue; |
| @@ -357,10 +355,13 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
| 357 | if (!mgmt_valid_hdev(d)) | 355 | if (!mgmt_valid_hdev(d)) |
| 358 | continue; | 356 | continue; |
| 359 | 357 | ||
| 360 | rp->index[i++] = cpu_to_le16(d->id); | 358 | rp->index[count++] = cpu_to_le16(d->id); |
| 361 | BT_DBG("Added hci%u", d->id); | 359 | BT_DBG("Added hci%u", d->id); |
| 362 | } | 360 | } |
| 363 | 361 | ||
| 362 | rp->num_controllers = cpu_to_le16(count); | ||
| 363 | rp_len = sizeof(*rp) + (2 * count); | ||
| 364 | |||
| 364 | read_unlock(&hci_dev_list_lock); | 365 | read_unlock(&hci_dev_list_lock); |
| 365 | 366 | ||
| 366 | err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, | 367 | err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, |
| @@ -1366,6 +1367,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data, | |||
| 1366 | continue; | 1367 | continue; |
| 1367 | 1368 | ||
| 1368 | list_del(&match->list); | 1369 | list_del(&match->list); |
| 1370 | kfree(match); | ||
| 1369 | found++; | 1371 | found++; |
| 1370 | } | 1372 | } |
| 1371 | 1373 | ||
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 2ac8d50861e0..a5923378bdf0 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
| @@ -267,7 +267,7 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send) | |||
| 267 | 267 | ||
| 268 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); | 268 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); |
| 269 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, | 269 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, |
| 270 | hcon->dst_type, reason); | 270 | hcon->dst_type, HCI_ERROR_AUTH_FAILURE); |
| 271 | 271 | ||
| 272 | cancel_delayed_work_sync(&conn->security_timer); | 272 | cancel_delayed_work_sync(&conn->security_timer); |
| 273 | 273 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index bda6d004f9f0..c0946cb2b354 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -2818,8 +2818,10 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, | |||
| 2818 | if (unlikely(tcpu != next_cpu) && | 2818 | if (unlikely(tcpu != next_cpu) && |
| 2819 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || | 2819 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || |
| 2820 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - | 2820 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - |
| 2821 | rflow->last_qtail)) >= 0)) | 2821 | rflow->last_qtail)) >= 0)) { |
| 2822 | tcpu = next_cpu; | ||
| 2822 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); | 2823 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); |
| 2824 | } | ||
| 2823 | 2825 | ||
| 2824 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { | 2826 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { |
| 2825 | *rflowp = rflow; | 2827 | *rflowp = rflow; |
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index 87cc17db2d56..b079c7bbc157 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c | |||
| @@ -319,7 +319,8 @@ int dev_addr_del(struct net_device *dev, const unsigned char *addr, | |||
| 319 | */ | 319 | */ |
| 320 | ha = list_first_entry(&dev->dev_addrs.list, | 320 | ha = list_first_entry(&dev->dev_addrs.list, |
| 321 | struct netdev_hw_addr, list); | 321 | struct netdev_hw_addr, list); |
| 322 | if (ha->addr == dev->dev_addr && ha->refcount == 1) | 322 | if (!memcmp(ha->addr, addr, dev->addr_len) && |
| 323 | ha->type == addr_type && ha->refcount == 1) | ||
| 323 | return -ENOENT; | 324 | return -ENOENT; |
| 324 | 325 | ||
| 325 | err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, | 326 | err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 5eea4a811042..14bbfcf717ac 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
| @@ -457,19 +457,28 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
| 457 | struct inet_sock *inet = inet_sk(sk); | 457 | struct inet_sock *inet = inet_sk(sk); |
| 458 | int val = 0, err; | 458 | int val = 0, err; |
| 459 | 459 | ||
| 460 | if (((1<<optname) & ((1<<IP_PKTINFO) | (1<<IP_RECVTTL) | | 460 | switch (optname) { |
| 461 | (1<<IP_RECVOPTS) | (1<<IP_RECVTOS) | | 461 | case IP_PKTINFO: |
| 462 | (1<<IP_RETOPTS) | (1<<IP_TOS) | | 462 | case IP_RECVTTL: |
| 463 | (1<<IP_TTL) | (1<<IP_HDRINCL) | | 463 | case IP_RECVOPTS: |
| 464 | (1<<IP_MTU_DISCOVER) | (1<<IP_RECVERR) | | 464 | case IP_RECVTOS: |
| 465 | (1<<IP_ROUTER_ALERT) | (1<<IP_FREEBIND) | | 465 | case IP_RETOPTS: |
| 466 | (1<<IP_PASSSEC) | (1<<IP_TRANSPARENT) | | 466 | case IP_TOS: |
| 467 | (1<<IP_MINTTL) | (1<<IP_NODEFRAG))) || | 467 | case IP_TTL: |
| 468 | optname == IP_UNICAST_IF || | 468 | case IP_HDRINCL: |
| 469 | optname == IP_MULTICAST_TTL || | 469 | case IP_MTU_DISCOVER: |
| 470 | optname == IP_MULTICAST_ALL || | 470 | case IP_RECVERR: |
| 471 | optname == IP_MULTICAST_LOOP || | 471 | case IP_ROUTER_ALERT: |
| 472 | optname == IP_RECVORIGDSTADDR) { | 472 | case IP_FREEBIND: |
| 473 | case IP_PASSSEC: | ||
| 474 | case IP_TRANSPARENT: | ||
| 475 | case IP_MINTTL: | ||
| 476 | case IP_NODEFRAG: | ||
| 477 | case IP_UNICAST_IF: | ||
| 478 | case IP_MULTICAST_TTL: | ||
| 479 | case IP_MULTICAST_ALL: | ||
| 480 | case IP_MULTICAST_LOOP: | ||
| 481 | case IP_RECVORIGDSTADDR: | ||
| 473 | if (optlen >= sizeof(int)) { | 482 | if (optlen >= sizeof(int)) { |
| 474 | if (get_user(val, (int __user *) optval)) | 483 | if (get_user(val, (int __user *) optval)) |
| 475 | return -EFAULT; | 484 | return -EFAULT; |
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 1831092f999f..858fddf6482a 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c | |||
| @@ -338,12 +338,17 @@ static int vti_rcv(struct sk_buff *skb) | |||
| 338 | if (tunnel != NULL) { | 338 | if (tunnel != NULL) { |
| 339 | struct pcpu_tstats *tstats; | 339 | struct pcpu_tstats *tstats; |
| 340 | 340 | ||
| 341 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) | ||
| 342 | return -1; | ||
| 343 | |||
| 341 | tstats = this_cpu_ptr(tunnel->dev->tstats); | 344 | tstats = this_cpu_ptr(tunnel->dev->tstats); |
| 342 | u64_stats_update_begin(&tstats->syncp); | 345 | u64_stats_update_begin(&tstats->syncp); |
| 343 | tstats->rx_packets++; | 346 | tstats->rx_packets++; |
| 344 | tstats->rx_bytes += skb->len; | 347 | tstats->rx_bytes += skb->len; |
| 345 | u64_stats_update_end(&tstats->syncp); | 348 | u64_stats_update_end(&tstats->syncp); |
| 346 | 349 | ||
| 350 | skb->mark = 0; | ||
| 351 | secpath_reset(skb); | ||
| 347 | skb->dev = tunnel->dev; | 352 | skb->dev = tunnel->dev; |
| 348 | return 1; | 353 | return 1; |
| 349 | } | 354 | } |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 197c0008503c..083092e3aed6 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
| @@ -1212,7 +1212,7 @@ new_segment: | |||
| 1212 | wait_for_sndbuf: | 1212 | wait_for_sndbuf: |
| 1213 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); | 1213 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); |
| 1214 | wait_for_memory: | 1214 | wait_for_memory: |
| 1215 | if (copied && likely(!tp->repair)) | 1215 | if (copied) |
| 1216 | tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); | 1216 | tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); |
| 1217 | 1217 | ||
| 1218 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) | 1218 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) |
| @@ -1223,7 +1223,7 @@ wait_for_memory: | |||
| 1223 | } | 1223 | } |
| 1224 | 1224 | ||
| 1225 | out: | 1225 | out: |
| 1226 | if (copied && likely(!tp->repair)) | 1226 | if (copied) |
| 1227 | tcp_push(sk, flags, mss_now, tp->nonagle); | 1227 | tcp_push(sk, flags, mss_now, tp->nonagle); |
| 1228 | release_sock(sk); | 1228 | release_sock(sk); |
| 1229 | return copied + copied_syn; | 1229 | return copied + copied_syn; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2c2b13a999ea..609ff98aeb47 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -5313,11 +5313,6 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, | |||
| 5313 | goto discard; | 5313 | goto discard; |
| 5314 | } | 5314 | } |
| 5315 | 5315 | ||
| 5316 | /* ts_recent update must be made after we are sure that the packet | ||
| 5317 | * is in window. | ||
| 5318 | */ | ||
| 5319 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
| 5320 | |||
| 5321 | /* step 3: check security and precedence [ignored] */ | 5316 | /* step 3: check security and precedence [ignored] */ |
| 5322 | 5317 | ||
| 5323 | /* step 4: Check for a SYN | 5318 | /* step 4: Check for a SYN |
| @@ -5552,6 +5547,11 @@ step5: | |||
| 5552 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) | 5547 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) |
| 5553 | goto discard; | 5548 | goto discard; |
| 5554 | 5549 | ||
| 5550 | /* ts_recent update must be made after we are sure that the packet | ||
| 5551 | * is in window. | ||
| 5552 | */ | ||
| 5553 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
| 5554 | |||
| 5555 | tcp_rcv_rtt_measure_ts(sk, skb); | 5555 | tcp_rcv_rtt_measure_ts(sk, skb); |
| 5556 | 5556 | ||
| 5557 | /* Process urgent data. */ | 5557 | /* Process urgent data. */ |
| @@ -6130,6 +6130,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 6130 | } else | 6130 | } else |
| 6131 | goto discard; | 6131 | goto discard; |
| 6132 | 6132 | ||
| 6133 | /* ts_recent update must be made after we are sure that the packet | ||
| 6134 | * is in window. | ||
| 6135 | */ | ||
| 6136 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
| 6137 | |||
| 6133 | /* step 6: check the URG bit */ | 6138 | /* step 6: check the URG bit */ |
| 6134 | tcp_urg(sk, skb, th); | 6139 | tcp_urg(sk, skb, th); |
| 6135 | 6140 | ||
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 53bc5847bfa8..f696d7c2e9fa 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #include <linux/rcupdate.h> | 1 | #include <linux/rcupdate.h> |
| 2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
| 3 | #include <linux/jiffies.h> | 3 | #include <linux/jiffies.h> |
| 4 | #include <linux/bootmem.h> | ||
| 5 | #include <linux/module.h> | 4 | #include <linux/module.h> |
| 6 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
| 7 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
| @@ -9,6 +8,7 @@ | |||
| 9 | #include <linux/tcp.h> | 8 | #include <linux/tcp.h> |
| 10 | #include <linux/hash.h> | 9 | #include <linux/hash.h> |
| 11 | #include <linux/tcp_metrics.h> | 10 | #include <linux/tcp_metrics.h> |
| 11 | #include <linux/vmalloc.h> | ||
| 12 | 12 | ||
| 13 | #include <net/inet_connection_sock.h> | 13 | #include <net/inet_connection_sock.h> |
| 14 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
| @@ -1034,7 +1034,10 @@ static int __net_init tcp_net_metrics_init(struct net *net) | |||
| 1034 | net->ipv4.tcp_metrics_hash_log = order_base_2(slots); | 1034 | net->ipv4.tcp_metrics_hash_log = order_base_2(slots); |
| 1035 | size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log; | 1035 | size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log; |
| 1036 | 1036 | ||
| 1037 | net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL); | 1037 | net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL | __GFP_NOWARN); |
| 1038 | if (!net->ipv4.tcp_metrics_hash) | ||
| 1039 | net->ipv4.tcp_metrics_hash = vzalloc(size); | ||
| 1040 | |||
| 1038 | if (!net->ipv4.tcp_metrics_hash) | 1041 | if (!net->ipv4.tcp_metrics_hash) |
| 1039 | return -ENOMEM; | 1042 | return -ENOMEM; |
| 1040 | 1043 | ||
| @@ -1055,7 +1058,10 @@ static void __net_exit tcp_net_metrics_exit(struct net *net) | |||
| 1055 | tm = next; | 1058 | tm = next; |
| 1056 | } | 1059 | } |
| 1057 | } | 1060 | } |
| 1058 | kfree(net->ipv4.tcp_metrics_hash); | 1061 | if (is_vmalloc_addr(net->ipv4.tcp_metrics_hash)) |
| 1062 | vfree(net->ipv4.tcp_metrics_hash); | ||
| 1063 | else | ||
| 1064 | kfree(net->ipv4.tcp_metrics_hash); | ||
| 1059 | } | 1065 | } |
| 1060 | 1066 | ||
| 1061 | static __net_initdata struct pernet_operations tcp_net_metrics_ops = { | 1067 | static __net_initdata struct pernet_operations tcp_net_metrics_ops = { |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index cfe6ffe1c177..2798706cb063 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -1986,6 +1986,9 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
| 1986 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); | 1986 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); |
| 1987 | BUG_ON(!tso_segs); | 1987 | BUG_ON(!tso_segs); |
| 1988 | 1988 | ||
| 1989 | if (unlikely(tp->repair) && tp->repair_queue == TCP_SEND_QUEUE) | ||
| 1990 | goto repair; /* Skip network transmission */ | ||
| 1991 | |||
| 1989 | cwnd_quota = tcp_cwnd_test(tp, skb); | 1992 | cwnd_quota = tcp_cwnd_test(tp, skb); |
| 1990 | if (!cwnd_quota) | 1993 | if (!cwnd_quota) |
| 1991 | break; | 1994 | break; |
| @@ -2026,6 +2029,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
| 2026 | if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) | 2029 | if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) |
| 2027 | break; | 2030 | break; |
| 2028 | 2031 | ||
| 2032 | repair: | ||
| 2029 | /* Advance the send_head. This one is sent out. | 2033 | /* Advance the send_head. This one is sent out. |
| 2030 | * This call will increment packets_out. | 2034 | * This call will increment packets_out. |
| 2031 | */ | 2035 | */ |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index ba6d13d1f1e1..e02faed6d17e 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
| @@ -827,6 +827,7 @@ pref_skip_coa: | |||
| 827 | if (val < 0 || val > 255) | 827 | if (val < 0 || val > 255) |
| 828 | goto e_inval; | 828 | goto e_inval; |
| 829 | np->min_hopcount = val; | 829 | np->min_hopcount = val; |
| 830 | retv = 0; | ||
| 830 | break; | 831 | break; |
| 831 | case IPV6_DONTFRAG: | 832 | case IPV6_DONTFRAG: |
| 832 | np->dontfrag = valbool; | 833 | np->dontfrag = valbool; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 05f3a313db88..7371f676cf41 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -2594,6 +2594,9 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, | |||
| 2594 | else | 2594 | else |
| 2595 | local->probe_req_reg--; | 2595 | local->probe_req_reg--; |
| 2596 | 2596 | ||
| 2597 | if (!local->open_count) | ||
| 2598 | break; | ||
| 2599 | |||
| 2597 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); | 2600 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); |
| 2598 | break; | 2601 | break; |
| 2599 | default: | 2602 | default: |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8c804550465b..156e5835e37f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -1314,6 +1314,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
| 1314 | struct net_device *dev); | 1314 | struct net_device *dev); |
| 1315 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | 1315 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, |
| 1316 | struct net_device *dev); | 1316 | struct net_device *dev); |
| 1317 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
| 1318 | struct sk_buff_head *skbs); | ||
| 1317 | 1319 | ||
| 1318 | /* HT */ | 1320 | /* HT */ |
| 1319 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, | 1321 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index c80c4490351c..f57f597972f8 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
| @@ -871,8 +871,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
| 871 | local->hw.wiphy->cipher_suites, | 871 | local->hw.wiphy->cipher_suites, |
| 872 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, | 872 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, |
| 873 | GFP_KERNEL); | 873 | GFP_KERNEL); |
| 874 | if (!suites) | 874 | if (!suites) { |
| 875 | return -ENOMEM; | 875 | result = -ENOMEM; |
| 876 | goto fail_wiphy_register; | ||
| 877 | } | ||
| 876 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { | 878 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { |
| 877 | u32 suite = local->hw.wiphy->cipher_suites[r]; | 879 | u32 suite = local->hw.wiphy->cipher_suites[r]; |
| 878 | if (suite == WLAN_CIPHER_SUITE_WEP40 || | 880 | if (suite == WLAN_CIPHER_SUITE_WEP40 || |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index c4cdbde24fd3..43e60b5a7546 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -917,7 +917,7 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, | |||
| 917 | struct cfg80211_sched_scan_request *req) | 917 | struct cfg80211_sched_scan_request *req) |
| 918 | { | 918 | { |
| 919 | struct ieee80211_local *local = sdata->local; | 919 | struct ieee80211_local *local = sdata->local; |
| 920 | struct ieee80211_sched_scan_ies sched_scan_ies; | 920 | struct ieee80211_sched_scan_ies sched_scan_ies = {}; |
| 921 | int ret, i; | 921 | int ret, i; |
| 922 | 922 | ||
| 923 | mutex_lock(&local->mtx); | 923 | mutex_lock(&local->mtx); |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 0a4e4c04db89..d2eb64e12353 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
| @@ -117,8 +117,8 @@ static void free_sta_work(struct work_struct *wk) | |||
| 117 | 117 | ||
| 118 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 118 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
| 119 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); | 119 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); |
| 120 | __skb_queue_purge(&sta->ps_tx_buf[ac]); | 120 | ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); |
| 121 | __skb_queue_purge(&sta->tx_filtered[ac]); | 121 | ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | #ifdef CONFIG_MAC80211_MESH | 124 | #ifdef CONFIG_MAC80211_MESH |
| @@ -141,7 +141,7 @@ static void free_sta_work(struct work_struct *wk) | |||
| 141 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); | 141 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); |
| 142 | if (!tid_tx) | 142 | if (!tid_tx) |
| 143 | continue; | 143 | continue; |
| 144 | __skb_queue_purge(&tid_tx->pending); | 144 | ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); |
| 145 | kfree(tid_tx); | 145 | kfree(tid_tx); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| @@ -961,6 +961,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
| 961 | struct ieee80211_local *local = sdata->local; | 961 | struct ieee80211_local *local = sdata->local; |
| 962 | struct sk_buff_head pending; | 962 | struct sk_buff_head pending; |
| 963 | int filtered = 0, buffered = 0, ac; | 963 | int filtered = 0, buffered = 0, ac; |
| 964 | unsigned long flags; | ||
| 964 | 965 | ||
| 965 | clear_sta_flag(sta, WLAN_STA_SP); | 966 | clear_sta_flag(sta, WLAN_STA_SP); |
| 966 | 967 | ||
| @@ -976,12 +977,16 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
| 976 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 977 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
| 977 | int count = skb_queue_len(&pending), tmp; | 978 | int count = skb_queue_len(&pending), tmp; |
| 978 | 979 | ||
| 980 | spin_lock_irqsave(&sta->tx_filtered[ac].lock, flags); | ||
| 979 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); | 981 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); |
| 982 | spin_unlock_irqrestore(&sta->tx_filtered[ac].lock, flags); | ||
| 980 | tmp = skb_queue_len(&pending); | 983 | tmp = skb_queue_len(&pending); |
| 981 | filtered += tmp - count; | 984 | filtered += tmp - count; |
| 982 | count = tmp; | 985 | count = tmp; |
| 983 | 986 | ||
| 987 | spin_lock_irqsave(&sta->ps_tx_buf[ac].lock, flags); | ||
| 984 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); | 988 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); |
| 989 | spin_unlock_irqrestore(&sta->ps_tx_buf[ac].lock, flags); | ||
| 985 | tmp = skb_queue_len(&pending); | 990 | tmp = skb_queue_len(&pending); |
| 986 | buffered += tmp - count; | 991 | buffered += tmp - count; |
| 987 | } | 992 | } |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 3af0cc4130f1..101eb88a2b78 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
| @@ -668,3 +668,12 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
| 668 | dev_kfree_skb_any(skb); | 668 | dev_kfree_skb_any(skb); |
| 669 | } | 669 | } |
| 670 | EXPORT_SYMBOL(ieee80211_free_txskb); | 670 | EXPORT_SYMBOL(ieee80211_free_txskb); |
| 671 | |||
| 672 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
| 673 | struct sk_buff_head *skbs) | ||
| 674 | { | ||
| 675 | struct sk_buff *skb; | ||
| 676 | |||
| 677 | while ((skb = __skb_dequeue(skbs))) | ||
| 678 | ieee80211_free_txskb(hw, skb); | ||
| 679 | } | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c9bf83f36657..b858ebe41fda 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
| @@ -1358,7 +1358,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
| 1358 | if (tx->skb) | 1358 | if (tx->skb) |
| 1359 | ieee80211_free_txskb(&tx->local->hw, tx->skb); | 1359 | ieee80211_free_txskb(&tx->local->hw, tx->skb); |
| 1360 | else | 1360 | else |
| 1361 | __skb_queue_purge(&tx->skbs); | 1361 | ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); |
| 1362 | return -1; | 1362 | return -1; |
| 1363 | } else if (unlikely(res == TX_QUEUED)) { | 1363 | } else if (unlikely(res == TX_QUEUED)) { |
| 1364 | I802_DEBUG_INC(tx->local->tx_handlers_queued); | 1364 | I802_DEBUG_INC(tx->local->tx_handlers_queued); |
| @@ -2120,10 +2120,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
| 2120 | */ | 2120 | */ |
| 2121 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) | 2121 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) |
| 2122 | { | 2122 | { |
| 2123 | struct sk_buff *skb; | ||
| 2123 | int i; | 2124 | int i; |
| 2124 | 2125 | ||
| 2125 | for (i = 0; i < local->hw.queues; i++) | 2126 | for (i = 0; i < local->hw.queues; i++) { |
| 2126 | skb_queue_purge(&local->pending[i]); | 2127 | while ((skb = skb_dequeue(&local->pending[i])) != NULL) |
| 2128 | ieee80211_free_txskb(&local->hw, skb); | ||
| 2129 | } | ||
| 2127 | } | 2130 | } |
| 2128 | 2131 | ||
| 2129 | /* | 2132 | /* |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 239391807ca9..0151ae33c4cd 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
| @@ -1491,6 +1491,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
| 1491 | list_for_each_entry(sdata, &local->interfaces, list) { | 1491 | list_for_each_entry(sdata, &local->interfaces, list) { |
| 1492 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 1492 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
| 1493 | continue; | 1493 | continue; |
| 1494 | if (!sdata->u.mgd.associated) | ||
| 1495 | continue; | ||
| 1494 | 1496 | ||
| 1495 | ieee80211_send_nullfunc(local, sdata, 0); | 1497 | ieee80211_send_nullfunc(local, sdata, 0); |
| 1496 | } | 1498 | } |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index c3bea269faf4..9966e7b16451 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
| @@ -102,7 +102,7 @@ static const struct file_operations sctp_snmp_seq_fops = { | |||
| 102 | .open = sctp_snmp_seq_open, | 102 | .open = sctp_snmp_seq_open, |
| 103 | .read = seq_read, | 103 | .read = seq_read, |
| 104 | .llseek = seq_lseek, | 104 | .llseek = seq_lseek, |
| 105 | .release = single_release, | 105 | .release = single_release_net, |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | /* Set up the proc fs entry for 'snmp' object. */ | 108 | /* Set up the proc fs entry for 'snmp' object. */ |
| @@ -251,7 +251,7 @@ static const struct file_operations sctp_eps_seq_fops = { | |||
| 251 | .open = sctp_eps_seq_open, | 251 | .open = sctp_eps_seq_open, |
| 252 | .read = seq_read, | 252 | .read = seq_read, |
| 253 | .llseek = seq_lseek, | 253 | .llseek = seq_lseek, |
| 254 | .release = seq_release, | 254 | .release = seq_release_net, |
| 255 | }; | 255 | }; |
| 256 | 256 | ||
| 257 | /* Set up the proc fs entry for 'eps' object. */ | 257 | /* Set up the proc fs entry for 'eps' object. */ |
| @@ -372,7 +372,7 @@ static const struct file_operations sctp_assocs_seq_fops = { | |||
| 372 | .open = sctp_assocs_seq_open, | 372 | .open = sctp_assocs_seq_open, |
| 373 | .read = seq_read, | 373 | .read = seq_read, |
| 374 | .llseek = seq_lseek, | 374 | .llseek = seq_lseek, |
| 375 | .release = seq_release, | 375 | .release = seq_release_net, |
| 376 | }; | 376 | }; |
| 377 | 377 | ||
| 378 | /* Set up the proc fs entry for 'assocs' object. */ | 378 | /* Set up the proc fs entry for 'assocs' object. */ |
| @@ -517,7 +517,7 @@ static const struct file_operations sctp_remaddr_seq_fops = { | |||
| 517 | .open = sctp_remaddr_seq_open, | 517 | .open = sctp_remaddr_seq_open, |
| 518 | .read = seq_read, | 518 | .read = seq_read, |
| 519 | .llseek = seq_lseek, | 519 | .llseek = seq_lseek, |
| 520 | .release = seq_release, | 520 | .release = seq_release_net, |
| 521 | }; | 521 | }; |
| 522 | 522 | ||
| 523 | int __net_init sctp_remaddr_proc_init(struct net *net) | 523 | int __net_init sctp_remaddr_proc_init(struct net *net) |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bcc7d7ee5a51..b75756b05af7 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
| @@ -141,9 +141,8 @@ static const struct ieee80211_regdomain world_regdom = { | |||
| 141 | .reg_rules = { | 141 | .reg_rules = { |
| 142 | /* IEEE 802.11b/g, channels 1..11 */ | 142 | /* IEEE 802.11b/g, channels 1..11 */ |
| 143 | REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), | 143 | REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), |
| 144 | /* IEEE 802.11b/g, channels 12..13. No HT40 | 144 | /* IEEE 802.11b/g, channels 12..13. */ |
| 145 | * channel fits here. */ | 145 | REG_RULE(2467-10, 2472+10, 40, 6, 20, |
| 146 | REG_RULE(2467-10, 2472+10, 20, 6, 20, | ||
| 147 | NL80211_RRF_PASSIVE_SCAN | | 146 | NL80211_RRF_PASSIVE_SCAN | |
| 148 | NL80211_RRF_NO_IBSS), | 147 | NL80211_RRF_NO_IBSS), |
| 149 | /* IEEE 802.11 channel 14 - Only JP enables | 148 | /* IEEE 802.11 channel 14 - Only JP enables |
