Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

1) Don't use MMIO on certain iwlwifi devices otherwise we get a
firmware crash.

2) Don't corrupt the GRO lists of mac80211 contexts by doing sends via
timer interrupt, from Johannes Berg.

3) SKB tailroom is miscalculated in AP_VLAN crypto code, from Michal
Kazior.

4) Fix fw_status memory leak in iwlwifi, from Haim Dreyfuss.

5) Fix use after free in iwl_mvm_d0i3_enable_tx(), from Eliad Peller.

6) JIT'ing of large BPF programs is broken on x86, from Alexei
Starovoitov.

7) EMAC driver ethtool register dump size is miscalculated, from Ivan
Mikhaylov.

8) Fix PHY initial link mode when autonegotiation is disabled in
amd-xgbe, from Tom Lendacky.

9) Fix NULL deref on SOCK_DEAD socket in AF_UNIX and CAIF protocols,
from Mark Salyzyn.

10) credit_bytes not initialized properly in xen-netback, from Ross
Lagerwall.

11) Fallback from MSI-X to INTx interrupts not handled properly in mlx4
driver, fix from Benjamin Poirier.

12) Perform ->attach() after binding dev->qdisc in packet scheduler,
otherwise we can crash. From Cong WANG.

13) Don't clobber data in sctp_v4_map_v6(). From Jason Gunthorpe.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits)
sctp: Fix mangled IPv4 addresses on a IPv6 listening socket
net_sched: invoke ->attach() after setting dev->qdisc
xen-netfront: properly destroy queues when removing device
mlx4_core: Fix fallback from MSI-X to INTx
xen/netback: Properly initialize credit_bytes
net: netxen: correct sysfs bin attribute return code
tools: bpf_jit_disasm: fix segfault on disabled debugging log output
unix/caif: sk_socket can disappear when state is unlocked
amd-xgbe-phy: Fix initial mode when autoneg is disabled
net: dp83640: fix improper double spin locking.
net: dp83640: reinforce locking rules.
net: dp83640: fix broken calibration routine.
net: stmmac: create one debugfs dir per net-device
net/ibm/emac: fix size of emac dump memory areas
x86: bpf_jit: fix compilation of large bpf programs
net: phy: bcm7xxx: Fix 7425 PHY ID and flags
iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx()
iwlwifi: mvm: clean net-detect info if device was reset during suspend
iwlwifi: mvm: take the UCODE_DOWN reference when resuming
iwlwifi: mvm: BT Coex - duplicate the command if sent ASYNC
...

+351 -170
+6 -1
arch/x86/net/bpf_jit_comp.c
··· 966 966 } 967 967 ctx.cleanup_addr = proglen; 968 968 969 - for (pass = 0; pass < 10; pass++) { 969 + /* JITed image shrinks with every pass and the loop iterates 970 + * until the image stops shrinking. Very large bpf programs 971 + * may converge on the last pass. In such case do one more 972 + * pass to emit the final image 973 + */ 974 + for (pass = 0; pass < 10 || image; pass++) { 970 975 proglen = do_jit(prog, addrs, image, oldproglen, &ctx); 971 976 if (proglen <= 0) { 972 977 image = NULL;
+6 -10
drivers/net/ethernet/ibm/emac/core.c
··· 2084 2084 2085 2085 static int emac_get_regs_len(struct emac_instance *dev) 2086 2086 { 2087 - if (emac_has_feature(dev, EMAC_FTR_EMAC4)) 2088 2087 return sizeof(struct emac_ethtool_regs_subhdr) + 2089 - EMAC4_ETHTOOL_REGS_SIZE(dev); 2090 - else 2091 - return sizeof(struct emac_ethtool_regs_subhdr) + 2092 - EMAC_ETHTOOL_REGS_SIZE(dev); 2088 + sizeof(struct emac_regs); 2093 2089 } 2094 2090 2095 2091 static int emac_ethtool_get_regs_len(struct net_device *ndev) ··· 2110 2114 struct emac_ethtool_regs_subhdr *hdr = buf; 2111 2115 2112 2116 hdr->index = dev->cell_index; 2113 - if (emac_has_feature(dev, EMAC_FTR_EMAC4)) { 2117 + if (emac_has_feature(dev, EMAC_FTR_EMAC4SYNC)) { 2118 + hdr->version = EMAC4SYNC_ETHTOOL_REGS_VER; 2119 + } else if (emac_has_feature(dev, EMAC_FTR_EMAC4)) { 2114 2120 hdr->version = EMAC4_ETHTOOL_REGS_VER; 2115 - memcpy_fromio(hdr + 1, dev->emacp, EMAC4_ETHTOOL_REGS_SIZE(dev)); 2116 - return (void *)(hdr + 1) + EMAC4_ETHTOOL_REGS_SIZE(dev); 2117 2121 } else { 2118 2122 hdr->version = EMAC_ETHTOOL_REGS_VER; 2119 - memcpy_fromio(hdr + 1, dev->emacp, EMAC_ETHTOOL_REGS_SIZE(dev)); 2120 - return (void *)(hdr + 1) + EMAC_ETHTOOL_REGS_SIZE(dev); 2121 2123 } 2124 + memcpy_fromio(hdr + 1, dev->emacp, sizeof(struct emac_regs)); 2125 + return (void *)(hdr + 1) + sizeof(struct emac_regs); 2122 2126 } 2123 2127 2124 2128 static void emac_ethtool_get_regs(struct net_device *ndev,
+2 -5
drivers/net/ethernet/ibm/emac/core.h
··· 461 461 }; 462 462 463 463 #define EMAC_ETHTOOL_REGS_VER 0 464 - #define EMAC_ETHTOOL_REGS_SIZE(dev) ((dev)->rsrc_regs.end - \ 465 - (dev)->rsrc_regs.start + 1) 466 - #define EMAC4_ETHTOOL_REGS_VER 1 467 - #define EMAC4_ETHTOOL_REGS_SIZE(dev) ((dev)->rsrc_regs.end - \ 468 - (dev)->rsrc_regs.start + 1) 464 + #define EMAC4_ETHTOOL_REGS_VER 1 465 + #define EMAC4SYNC_ETHTOOL_REGS_VER 2 469 466 470 467 #endif /* __IBM_NEWEMAC_CORE_H */
+7 -2
drivers/net/ethernet/mellanox/mlx4/cmd.c
··· 714 714 msecs_to_jiffies(timeout))) { 715 715 mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n", 716 716 op); 717 - err = -EIO; 718 - goto out_reset; 717 + if (op == MLX4_CMD_NOP) { 718 + err = -EBUSY; 719 + goto out; 720 + } else { 721 + err = -EIO; 722 + goto out_reset; 723 + } 719 724 } 720 725 721 726 err = context->result;
+3 -3
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
··· 3025 3025 u8 dw, rows, cols, banks, ranks; 3026 3026 u32 val; 3027 3027 3028 - if (size != sizeof(struct netxen_dimm_cfg)) { 3028 + if (size < attr->size) { 3029 3029 netdev_err(netdev, "Invalid size\n"); 3030 - return -1; 3030 + return -EINVAL; 3031 3031 } 3032 3032 3033 3033 memset(&dimm, 0, sizeof(struct netxen_dimm_cfg)); ··· 3137 3137 3138 3138 static struct bin_attribute bin_attr_dimm = { 3139 3139 .attr = { .name = "dimm", .mode = (S_IRUGO | S_IWUSR) }, 3140 - .size = 0, 3140 + .size = sizeof(struct netxen_dimm_cfg), 3141 3141 .read = netxen_sysfs_read_dimm, 3142 3142 }; 3143 3143
+6
drivers/net/ethernet/stmicro/stmmac/stmmac.h
··· 117 117 int use_riwt; 118 118 int irq_wake; 119 119 spinlock_t ptp_lock; 120 + 121 + #ifdef CONFIG_DEBUG_FS 122 + struct dentry *dbgfs_dir; 123 + struct dentry *dbgfs_rings_status; 124 + struct dentry *dbgfs_dma_cap; 125 + #endif 120 126 }; 121 127 122 128 int stmmac_mdio_unregister(struct net_device *ndev);
+53 -23
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 118 118 119 119 #ifdef CONFIG_DEBUG_FS 120 120 static int stmmac_init_fs(struct net_device *dev); 121 - static void stmmac_exit_fs(void); 121 + static void stmmac_exit_fs(struct net_device *dev); 122 122 #endif 123 123 124 124 #define STMMAC_COAL_TIMER(x) (jiffies + usecs_to_jiffies(x)) ··· 1916 1916 netif_carrier_off(dev); 1917 1917 1918 1918 #ifdef CONFIG_DEBUG_FS 1919 - stmmac_exit_fs(); 1919 + stmmac_exit_fs(dev); 1920 1920 #endif 1921 1921 1922 1922 stmmac_release_ptp(priv); ··· 2508 2508 2509 2509 #ifdef CONFIG_DEBUG_FS 2510 2510 static struct dentry *stmmac_fs_dir; 2511 - static struct dentry *stmmac_rings_status; 2512 - static struct dentry *stmmac_dma_cap; 2513 2511 2514 2512 static void sysfs_display_ring(void *head, int size, int extend_desc, 2515 2513 struct seq_file *seq) ··· 2646 2648 2647 2649 static int stmmac_init_fs(struct net_device *dev) 2648 2650 { 2649 - /* Create debugfs entries */ 2650 - stmmac_fs_dir = debugfs_create_dir(STMMAC_RESOURCE_NAME, NULL); 2651 + struct stmmac_priv *priv = netdev_priv(dev); 2651 2652 2652 - if (!stmmac_fs_dir || IS_ERR(stmmac_fs_dir)) { 2653 - pr_err("ERROR %s, debugfs create directory failed\n", 2654 - STMMAC_RESOURCE_NAME); 2653 + /* Create per netdev entries */ 2654 + priv->dbgfs_dir = debugfs_create_dir(dev->name, stmmac_fs_dir); 2655 + 2656 + if (!priv->dbgfs_dir || IS_ERR(priv->dbgfs_dir)) { 2657 + pr_err("ERROR %s/%s, debugfs create directory failed\n", 2658 + STMMAC_RESOURCE_NAME, dev->name); 2655 2659 2656 2660 return -ENOMEM; 2657 2661 } 2658 2662 2659 2663 /* Entry to report DMA RX/TX rings */ 2660 - stmmac_rings_status = debugfs_create_file("descriptors_status", 2661 - S_IRUGO, stmmac_fs_dir, dev, 2662 - &stmmac_rings_status_fops); 2664 + priv->dbgfs_rings_status = 2665 + debugfs_create_file("descriptors_status", S_IRUGO, 2666 + priv->dbgfs_dir, dev, 2667 + &stmmac_rings_status_fops); 2663 2668 2664 - if (!stmmac_rings_status || IS_ERR(stmmac_rings_status)) { 2669 + if (!priv->dbgfs_rings_status || IS_ERR(priv->dbgfs_rings_status)) { 2665 2670 pr_info("ERROR creating stmmac ring debugfs file\n"); 2666 - debugfs_remove(stmmac_fs_dir); 2671 + debugfs_remove_recursive(priv->dbgfs_dir); 2667 2672 2668 2673 return -ENOMEM; 2669 2674 } 2670 2675 2671 2676 /* Entry to report the DMA HW features */ 2672 - stmmac_dma_cap = debugfs_create_file("dma_cap", S_IRUGO, stmmac_fs_dir, 2673 - dev, &stmmac_dma_cap_fops); 2677 + priv->dbgfs_dma_cap = debugfs_create_file("dma_cap", S_IRUGO, 2678 + priv->dbgfs_dir, 2679 + dev, &stmmac_dma_cap_fops); 2674 2680 2675 - if (!stmmac_dma_cap || IS_ERR(stmmac_dma_cap)) { 2681 + if (!priv->dbgfs_dma_cap || IS_ERR(priv->dbgfs_dma_cap)) { 2676 2682 pr_info("ERROR creating stmmac MMC debugfs file\n"); 2677 - debugfs_remove(stmmac_rings_status); 2678 - debugfs_remove(stmmac_fs_dir); 2683 + debugfs_remove_recursive(priv->dbgfs_dir); 2679 2684 2680 2685 return -ENOMEM; 2681 2686 } ··· 2686 2685 return 0; 2687 2686 } 2688 2687 2689 - static void stmmac_exit_fs(void) 2688 + static void stmmac_exit_fs(struct net_device *dev) 2690 2689 { 2691 - debugfs_remove(stmmac_rings_status); 2692 - debugfs_remove(stmmac_dma_cap); 2693 - debugfs_remove(stmmac_fs_dir); 2690 + struct stmmac_priv *priv = netdev_priv(dev); 2691 + 2692 + debugfs_remove_recursive(priv->dbgfs_dir); 2694 2693 } 2695 2694 #endif /* CONFIG_DEBUG_FS */ 2696 2695 ··· 3149 3148 3150 3149 __setup("stmmaceth=", stmmac_cmdline_opt); 3151 3150 #endif /* MODULE */ 3151 + 3152 + static int __init stmmac_init(void) 3153 + { 3154 + #ifdef CONFIG_DEBUG_FS 3155 + /* Create debugfs main directory if it doesn't exist yet */ 3156 + if (!stmmac_fs_dir) { 3157 + stmmac_fs_dir = debugfs_create_dir(STMMAC_RESOURCE_NAME, NULL); 3158 + 3159 + if (!stmmac_fs_dir || IS_ERR(stmmac_fs_dir)) { 3160 + pr_err("ERROR %s, debugfs create directory failed\n", 3161 + STMMAC_RESOURCE_NAME); 3162 + 3163 + return -ENOMEM; 3164 + } 3165 + } 3166 + #endif 3167 + 3168 + return 0; 3169 + } 3170 + 3171 + static void __exit stmmac_exit(void) 3172 + { 3173 + #ifdef CONFIG_DEBUG_FS 3174 + debugfs_remove_recursive(stmmac_fs_dir); 3175 + #endif 3176 + } 3177 + 3178 + module_init(stmmac_init) 3179 + module_exit(stmmac_exit) 3152 3180 3153 3181 MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet device driver"); 3154 3182 MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
+42 -3
drivers/net/phy/amd-xgbe-phy.c
··· 755 755 return ret; 756 756 } 757 757 758 + static bool amd_xgbe_phy_use_xgmii_mode(struct phy_device *phydev) 759 + { 760 + if (phydev->autoneg == AUTONEG_ENABLE) { 761 + if (phydev->advertising & ADVERTISED_10000baseKR_Full) 762 + return true; 763 + } else { 764 + if (phydev->speed == SPEED_10000) 765 + return true; 766 + } 767 + 768 + return false; 769 + } 770 + 771 + static bool amd_xgbe_phy_use_gmii_2500_mode(struct phy_device *phydev) 772 + { 773 + if (phydev->autoneg == AUTONEG_ENABLE) { 774 + if (phydev->advertising & ADVERTISED_2500baseX_Full) 775 + return true; 776 + } else { 777 + if (phydev->speed == SPEED_2500) 778 + return true; 779 + } 780 + 781 + return false; 782 + } 783 + 784 + static bool amd_xgbe_phy_use_gmii_mode(struct phy_device *phydev) 785 + { 786 + if (phydev->autoneg == AUTONEG_ENABLE) { 787 + if (phydev->advertising & ADVERTISED_1000baseKX_Full) 788 + return true; 789 + } else { 790 + if (phydev->speed == SPEED_1000) 791 + return true; 792 + } 793 + 794 + return false; 795 + } 796 + 758 797 static int amd_xgbe_phy_set_an(struct phy_device *phydev, bool enable, 759 798 bool restart) 760 799 { ··· 1274 1235 /* Set initial mode - call the mode setting routines 1275 1236 * directly to insure we are properly configured 1276 1237 */ 1277 - if (phydev->advertising & SUPPORTED_10000baseKR_Full) 1238 + if (amd_xgbe_phy_use_xgmii_mode(phydev)) 1278 1239 ret = amd_xgbe_phy_xgmii_mode(phydev); 1279 - else if (phydev->advertising & SUPPORTED_1000baseKX_Full) 1240 + else if (amd_xgbe_phy_use_gmii_mode(phydev)) 1280 1241 ret = amd_xgbe_phy_gmii_mode(phydev); 1281 - else if (phydev->advertising & SUPPORTED_2500baseX_Full) 1242 + else if (amd_xgbe_phy_use_gmii_2500_mode(phydev)) 1282 1243 ret = amd_xgbe_phy_gmii_2500_mode(phydev); 1283 1244 else 1284 1245 ret = -EINVAL;
+1 -1
drivers/net/phy/bcm7xxx.c
··· 404 404 .name = "Broadcom BCM7425", 405 405 .features = PHY_GBIT_FEATURES | 406 406 SUPPORTED_Pause | SUPPORTED_Asym_Pause, 407 - .flags = 0, 407 + .flags = PHY_IS_INTERNAL, 408 408 .config_init = bcm7xxx_config_init, 409 409 .config_aneg = genphy_config_aneg, 410 410 .read_status = genphy_read_status,
+19 -4
drivers/net/phy/dp83640.c
··· 47 47 #define PSF_TX 0x1000 48 48 #define EXT_EVENT 1 49 49 #define CAL_EVENT 7 50 - #define CAL_TRIGGER 7 50 + #define CAL_TRIGGER 1 51 51 #define DP83640_N_PINS 12 52 52 53 53 #define MII_DP83640_MICR 0x11 ··· 496 496 else 497 497 evnt |= EVNT_RISE; 498 498 } 499 + mutex_lock(&clock->extreg_lock); 499 500 ext_write(0, phydev, PAGE5, PTP_EVNT, evnt); 501 + mutex_unlock(&clock->extreg_lock); 500 502 return 0; 501 503 502 504 case PTP_CLK_REQ_PEROUT: ··· 534 532 535 533 static void enable_status_frames(struct phy_device *phydev, bool on) 536 534 { 535 + struct dp83640_private *dp83640 = phydev->priv; 536 + struct dp83640_clock *clock = dp83640->clock; 537 537 u16 cfg0 = 0, ver; 538 538 539 539 if (on) ··· 543 539 544 540 ver = (PSF_PTPVER & VERSIONPTP_MASK) << VERSIONPTP_SHIFT; 545 541 542 + mutex_lock(&clock->extreg_lock); 543 + 546 544 ext_write(0, phydev, PAGE5, PSF_CFG0, cfg0); 547 545 ext_write(0, phydev, PAGE6, PSF_CFG1, ver); 546 + 547 + mutex_unlock(&clock->extreg_lock); 548 548 549 549 if (!phydev->attached_dev) { 550 550 pr_warn("expected to find an attached netdevice\n"); ··· 846 838 list_del_init(&rxts->list); 847 839 phy2rxts(phy_rxts, rxts); 848 840 849 - spin_lock_irqsave(&dp83640->rx_queue.lock, flags); 841 + spin_lock(&dp83640->rx_queue.lock); 850 842 skb_queue_walk(&dp83640->rx_queue, skb) { 851 843 struct dp83640_skb_info *skb_info; 852 844 ··· 861 853 break; 862 854 } 863 855 } 864 - spin_unlock_irqrestore(&dp83640->rx_queue.lock, flags); 856 + spin_unlock(&dp83640->rx_queue.lock); 865 857 866 858 if (!shhwtstamps) 867 859 list_add_tail(&rxts->list, &dp83640->rxts); ··· 1181 1173 1182 1174 if (clock->chosen && !list_empty(&clock->phylist)) 1183 1175 recalibrate(clock); 1184 - else 1176 + else { 1177 + mutex_lock(&clock->extreg_lock); 1185 1178 enable_broadcast(phydev, clock->page, 1); 1179 + mutex_unlock(&clock->extreg_lock); 1180 + } 1186 1181 1187 1182 enable_status_frames(phydev, true); 1183 + 1184 + mutex_lock(&clock->extreg_lock); 1188 1185 ext_write(0, phydev, PAGE4, PTP_CTL, PTP_ENABLE); 1186 + mutex_unlock(&clock->extreg_lock); 1187 + 1189 1188 return 0; 1190 1189 } 1191 1190
+1
drivers/net/wireless/iwlwifi/Kconfig
··· 21 21 Intel 7260 Wi-Fi Adapter 22 22 Intel 3160 Wi-Fi Adapter 23 23 Intel 7265 Wi-Fi Adapter 24 + Intel 3165 Wi-Fi Adapter 24 25 25 26 26 27 This driver uses the kernel's mac80211 subsystem.
+8 -8
drivers/net/wireless/iwlwifi/iwl-7000.c
··· 70 70 71 71 /* Highest firmware API version supported */ 72 72 #define IWL7260_UCODE_API_MAX 13 73 - #define IWL3160_UCODE_API_MAX 13 74 73 75 74 /* Oldest version we won't warn about */ 76 75 #define IWL7260_UCODE_API_OK 12 77 - #define IWL3160_UCODE_API_OK 12 76 + #define IWL3165_UCODE_API_OK 13 78 77 79 78 /* Lowest firmware API version supported */ 80 79 #define IWL7260_UCODE_API_MIN 10 81 - #define IWL3160_UCODE_API_MIN 10 80 + #define IWL3165_UCODE_API_MIN 13 82 81 83 82 /* NVM versions */ 84 83 #define IWL7260_NVM_VERSION 0x0a1d ··· 102 103 103 104 #define IWL3160_FW_PRE "iwlwifi-3160-" 104 105 #define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode" 105 - 106 - #define IWL3165_FW_PRE "iwlwifi-3165-" 107 - #define IWL3165_MODULE_FIRMWARE(api) IWL3165_FW_PRE __stringify(api) ".ucode" 108 106 109 107 #define IWL7265_FW_PRE "iwlwifi-7265-" 110 108 #define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode" ··· 244 248 245 249 const struct iwl_cfg iwl3165_2ac_cfg = { 246 250 .name = "Intel(R) Dual Band Wireless AC 3165", 247 - .fw_name_pre = IWL3165_FW_PRE, 251 + .fw_name_pre = IWL7265D_FW_PRE, 248 252 IWL_DEVICE_7000, 253 + /* sparse doens't like the re-assignment but it is safe */ 254 + #ifndef __CHECKER__ 255 + .ucode_api_ok = IWL3165_UCODE_API_OK, 256 + .ucode_api_min = IWL3165_UCODE_API_MIN, 257 + #endif 249 258 .ht_params = &iwl7000_ht_params, 250 259 .nvm_ver = IWL3165_NVM_VERSION, 251 260 .nvm_calib_ver = IWL3165_TX_POWER_VERSION, ··· 326 325 327 326 MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); 328 327 MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); 329 - MODULE_FIRMWARE(IWL3165_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); 330 328 MODULE_FIRMWARE(IWL7265_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); 331 329 MODULE_FIRMWARE(IWL7265D_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
+5
drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c
··· 6 6 * GPL LICENSE SUMMARY 7 7 * 8 8 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 9 + * Copyright(c) 2015 Intel Mobile Communications GmbH 9 10 * 10 11 * This program is free software; you can redistribute it and/or modify 11 12 * it under the terms of version 2 of the GNU General Public License as ··· 32 31 * BSD LICENSE 33 32 * 34 33 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. 34 + * Copyright(c) 2015 Intel Mobile Communications GmbH 35 35 * All rights reserved. 36 36 * 37 37 * Redistribution and use in source and binary forms, with or without ··· 749 747 ht_info->ht_supported = false; 750 748 return; 751 749 } 750 + 751 + if (data->sku_cap_mimo_disabled) 752 + rx_chains = 1; 752 753 753 754 ht_info->ht_supported = true; 754 755 ht_info->cap = IEEE80211_HT_CAP_DSSSCCK40;
+3
drivers/net/wireless/iwlwifi/iwl-eeprom-parse.h
··· 6 6 * GPL LICENSE SUMMARY 7 7 * 8 8 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 9 + * Copyright(c) 2015 Intel Mobile Communications GmbH 9 10 * 10 11 * This program is free software; you can redistribute it and/or modify 11 12 * it under the terms of version 2 of the GNU General Public License as ··· 32 31 * BSD LICENSE 33 32 * 34 33 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. 34 + * Copyright(c) 2015 Intel Mobile Communications GmbH 35 35 * All rights reserved. 36 36 * 37 37 * Redistribution and use in source and binary forms, with or without ··· 86 84 bool sku_cap_11ac_enable; 87 85 bool sku_cap_amt_enable; 88 86 bool sku_cap_ipan_enable; 87 + bool sku_cap_mimo_disabled; 89 88 90 89 u16 radio_cfg_type; 91 90 u8 radio_cfg_step;
+23 -7
drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
··· 6 6 * GPL LICENSE SUMMARY 7 7 * 8 8 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 9 - * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH 9 + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 10 10 * 11 11 * This program is free software; you can redistribute it and/or modify 12 12 * it under the terms of version 2 of the GNU General Public License as ··· 32 32 * BSD LICENSE 33 33 * 34 34 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. 35 - * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH 35 + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 36 36 * All rights reserved. 37 37 * 38 38 * Redistribution and use in source and binary forms, with or without ··· 116 116 117 117 /* SKU Capabilities (actual values from NVM definition) */ 118 118 enum nvm_sku_bits { 119 - NVM_SKU_CAP_BAND_24GHZ = BIT(0), 120 - NVM_SKU_CAP_BAND_52GHZ = BIT(1), 121 - NVM_SKU_CAP_11N_ENABLE = BIT(2), 122 - NVM_SKU_CAP_11AC_ENABLE = BIT(3), 119 + NVM_SKU_CAP_BAND_24GHZ = BIT(0), 120 + NVM_SKU_CAP_BAND_52GHZ = BIT(1), 121 + NVM_SKU_CAP_11N_ENABLE = BIT(2), 122 + NVM_SKU_CAP_11AC_ENABLE = BIT(3), 123 + NVM_SKU_CAP_MIMO_DISABLE = BIT(5), 123 124 }; 124 125 125 126 /* ··· 369 368 if (cfg->ht_params->ldpc) 370 369 vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC; 371 370 371 + if (data->sku_cap_mimo_disabled) { 372 + num_rx_ants = 1; 373 + num_tx_ants = 1; 374 + } 375 + 372 376 if (num_tx_ants > 1) 373 377 vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC; 374 378 else ··· 533 527 const u8 *hw_addr; 534 528 535 529 if (mac_override) { 530 + static const u8 reserved_mac[] = { 531 + 0x02, 0xcc, 0xaa, 0xff, 0xee, 0x00 532 + }; 533 + 536 534 hw_addr = (const u8 *)(mac_override + 537 535 MAC_ADDRESS_OVERRIDE_FAMILY_8000); 538 536 ··· 548 538 data->hw_addr[4] = hw_addr[5]; 549 539 data->hw_addr[5] = hw_addr[4]; 550 540 551 - if (is_valid_ether_addr(data->hw_addr)) 541 + /* 542 + * Force the use of the OTP MAC address in case of reserved MAC 543 + * address in the NVM, or if address is given but invalid. 544 + */ 545 + if (is_valid_ether_addr(data->hw_addr) && 546 + memcmp(reserved_mac, hw_addr, ETH_ALEN) != 0) 552 547 return; 553 548 554 549 IWL_ERR_DEV(dev, ··· 625 610 data->sku_cap_11n_enable = false; 626 611 data->sku_cap_11ac_enable = data->sku_cap_11n_enable && 627 612 (sku & NVM_SKU_CAP_11AC_ENABLE); 613 + data->sku_cap_mimo_disabled = sku & NVM_SKU_CAP_MIMO_DISABLE; 628 614 629 615 data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw); 630 616
+1 -1
drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
··· 776 776 struct iwl_host_cmd cmd = { 777 777 .id = BT_CONFIG, 778 778 .len = { sizeof(*bt_cmd), }, 779 - .dataflags = { IWL_HCMD_DFL_NOCOPY, }, 779 + .dataflags = { IWL_HCMD_DFL_DUP, }, 780 780 .flags = CMD_ASYNC, 781 781 }; 782 782 struct iwl_mvm_sta *mvmsta;
+16 -6
drivers/net/wireless/iwlwifi/mvm/d3.c
··· 1750 1750 int i, j, n_matches, ret; 1751 1751 1752 1752 fw_status = iwl_mvm_get_wakeup_status(mvm, vif); 1753 - if (!IS_ERR_OR_NULL(fw_status)) 1753 + if (!IS_ERR_OR_NULL(fw_status)) { 1754 1754 reasons = le32_to_cpu(fw_status->wakeup_reasons); 1755 + kfree(fw_status); 1756 + } 1755 1757 1756 1758 if (reasons & IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED) 1757 1759 wakeup.rfkill_release = true; ··· 1870 1868 /* get the BSS vif pointer again */ 1871 1869 vif = iwl_mvm_get_bss_vif(mvm); 1872 1870 if (IS_ERR_OR_NULL(vif)) 1873 - goto out_unlock; 1871 + goto err; 1874 1872 1875 1873 ret = iwl_trans_d3_resume(mvm->trans, &d3_status, test); 1876 1874 if (ret) 1877 - goto out_unlock; 1875 + goto err; 1878 1876 1879 1877 if (d3_status != IWL_D3_STATUS_ALIVE) { 1880 1878 IWL_INFO(mvm, "Device was reset during suspend\n"); 1881 - goto out_unlock; 1879 + goto err; 1882 1880 } 1883 1881 1884 1882 /* query SRAM first in case we want event logging */ ··· 1904 1902 goto out_iterate; 1905 1903 } 1906 1904 1907 - out_unlock: 1905 + err: 1906 + iwl_mvm_free_nd(mvm); 1908 1907 mutex_unlock(&mvm->mutex); 1909 1908 1910 1909 out_iterate: ··· 1918 1915 /* return 1 to reconfigure the device */ 1919 1916 set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status); 1920 1917 set_bit(IWL_MVM_STATUS_D3_RECONFIG, &mvm->status); 1918 + 1919 + /* We always return 1, which causes mac80211 to do a reconfig 1920 + * with IEEE80211_RECONFIG_TYPE_RESTART. This type of 1921 + * reconfig calls iwl_mvm_restart_complete(), where we unref 1922 + * the IWL_MVM_REF_UCODE_DOWN, so we need to take the 1923 + * reference here. 1924 + */ 1925 + iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); 1921 1926 return 1; 1922 1927 } 1923 1928 ··· 2032 2021 __iwl_mvm_resume(mvm, true); 2033 2022 rtnl_unlock(); 2034 2023 iwl_abort_notification_waits(&mvm->notif_wait); 2035 - iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); 2036 2024 ieee80211_restart_hw(mvm->hw); 2037 2025 2038 2026 /* wait for restart and disconnect all interfaces */
-3
drivers/net/wireless/iwlwifi/mvm/mac80211.c
··· 3995 3995 if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_MLME)) 3996 3996 return; 3997 3997 3998 - if (event->u.mlme.status == MLME_SUCCESS) 3999 - return; 4000 - 4001 3998 trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_MLME); 4002 3999 trig_mlme = (void *)trig->data; 4003 4000 if (!iwl_fw_dbg_trigger_check_stop(mvm, vif, trig))
+4 -2
drivers/net/wireless/iwlwifi/mvm/ops.c
··· 1263 1263 ieee80211_iterate_active_interfaces( 1264 1264 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, 1265 1265 iwl_mvm_d0i3_disconnect_iter, mvm); 1266 - 1267 - iwl_free_resp(&get_status_cmd); 1268 1266 out: 1269 1267 iwl_mvm_d0i3_enable_tx(mvm, qos_seq); 1268 + 1269 + /* qos_seq might point inside resp_pkt, so free it only now */ 1270 + if (get_status_cmd.resp_pkt) 1271 + iwl_free_resp(&get_status_cmd); 1270 1272 1271 1273 /* the FW might have updated the regdomain */ 1272 1274 iwl_mvm_update_changed_regdom(mvm);
+3
drivers/net/wireless/iwlwifi/mvm/rs.c
··· 180 180 if (iwl_mvm_vif_low_latency(mvmvif) && mvmsta->vif->p2p) 181 181 return false; 182 182 183 + if (mvm->nvm_data->sku_cap_mimo_disabled) 184 + return false; 185 + 183 186 return true; 184 187 } 185 188
+5 -3
drivers/net/wireless/iwlwifi/pcie/trans.c
··· 1049 1049 iwl_pcie_rx_stop(trans); 1050 1050 1051 1051 /* Power-down device's busmaster DMA clocks */ 1052 - iwl_write_prph(trans, APMG_CLK_DIS_REG, 1053 - APMG_CLK_VAL_DMA_CLK_RQT); 1054 - udelay(5); 1052 + if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) { 1053 + iwl_write_prph(trans, APMG_CLK_DIS_REG, 1054 + APMG_CLK_VAL_DMA_CLK_RQT); 1055 + udelay(5); 1056 + } 1055 1057 } 1056 1058 1057 1059 /* Make sure (redundant) we've released our request to stay awake */
+1
drivers/net/xen-netback/xenbus.c
··· 793 793 goto err; 794 794 } 795 795 796 + queue->credit_bytes = credit_bytes; 796 797 queue->remaining_credit = credit_bytes; 797 798 queue->credit_usec = credit_usec; 798 799
+2 -13
drivers/net/xen-netfront.c
··· 1698 1698 1699 1699 if (netif_running(info->netdev)) 1700 1700 napi_disable(&queue->napi); 1701 + del_timer_sync(&queue->rx_refill_timer); 1701 1702 netif_napi_del(&queue->napi); 1702 1703 } 1703 1704 ··· 2103 2102 static int xennet_remove(struct xenbus_device *dev) 2104 2103 { 2105 2104 struct netfront_info *info = dev_get_drvdata(&dev->dev); 2106 - unsigned int num_queues = info->netdev->real_num_tx_queues; 2107 - struct netfront_queue *queue = NULL; 2108 - unsigned int i = 0; 2109 2105 2110 2106 dev_dbg(&dev->dev, "%s\n", dev->nodename); 2111 2107 ··· 2110 2112 2111 2113 unregister_netdev(info->netdev); 2112 2114 2113 - for (i = 0; i < num_queues; ++i) { 2114 - queue = &info->queues[i]; 2115 - del_timer_sync(&queue->rx_refill_timer); 2116 - } 2117 - 2118 - if (num_queues) { 2119 - kfree(info->queues); 2120 - info->queues = NULL; 2121 - } 2122 - 2115 + xennet_destroy_queues(info); 2123 2116 xennet_free_netdev(info->netdev); 2124 2117 2125 2118 return 0;
+4 -3
drivers/ssb/driver_pcicore.c
··· 359 359 360 360 /* 361 361 * Accessing PCI config without a proper delay after devices reset (not 362 - * GPIO reset) was causing reboots on WRT300N v1.0. 362 + * GPIO reset) was causing reboots on WRT300N v1.0 (BCM4704). 363 363 * Tested delay 850 us lowered reboot chance to 50-80%, 1000 us fixed it 364 364 * completely. Flushing all writes was also tested but with no luck. 365 + * The same problem was reported for WRT350N v1 (BCM4705), so we just 366 + * sleep here unconditionally. 365 367 */ 366 - if (pc->dev->bus->chip_id == 0x4704) 367 - usleep_range(1000, 2000); 368 + usleep_range(1000, 2000); 368 369 369 370 /* Enable PCI bridge BAR0 prefetch and burst */ 370 371 val = PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+1 -1
include/linux/brcmphy.h
··· 17 17 #define PHY_ID_BCM7250 0xae025280 18 18 #define PHY_ID_BCM7364 0xae025260 19 19 #define PHY_ID_BCM7366 0x600d8490 20 - #define PHY_ID_BCM7425 0x03625e60 20 + #define PHY_ID_BCM7425 0x600d86b0 21 21 #define PHY_ID_BCM7429 0x600d8730 22 22 #define PHY_ID_BCM7439 0x600d8480 23 23 #define PHY_ID_BCM7439_2 0xae025080
+5 -2
include/net/sctp/sctp.h
··· 574 574 /* Map v4 address to v4-mapped v6 address */ 575 575 static inline void sctp_v4_map_v6(union sctp_addr *addr) 576 576 { 577 + __be16 port; 578 + 579 + port = addr->v4.sin_port; 580 + addr->v6.sin6_addr.s6_addr32[3] = addr->v4.sin_addr.s_addr; 581 + addr->v6.sin6_port = port; 577 582 addr->v6.sin6_family = AF_INET6; 578 583 addr->v6.sin6_flowinfo = 0; 579 584 addr->v6.sin6_scope_id = 0; 580 - addr->v6.sin6_port = addr->v4.sin_port; 581 - addr->v6.sin6_addr.s6_addr32[3] = addr->v4.sin_addr.s_addr; 582 585 addr->v6.sin6_addr.s6_addr32[0] = 0; 583 586 addr->v6.sin6_addr.s6_addr32[1] = 0; 584 587 addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff);
+8
net/caif/caif_socket.c
··· 330 330 release_sock(sk); 331 331 timeo = schedule_timeout(timeo); 332 332 lock_sock(sk); 333 + 334 + if (sock_flag(sk, SOCK_DEAD)) 335 + break; 336 + 333 337 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 334 338 } 335 339 ··· 377 373 struct sk_buff *skb; 378 374 379 375 lock_sock(sk); 376 + if (sock_flag(sk, SOCK_DEAD)) { 377 + err = -ECONNRESET; 378 + goto unlock; 379 + } 380 380 skb = skb_dequeue(&sk->sk_receive_queue); 381 381 caif_check_flow_release(sk); 382 382
+11 -48
net/mac80211/cfg.c
··· 2495 2495 struct ieee80211_roc_work *new_roc, 2496 2496 struct ieee80211_roc_work *cur_roc) 2497 2497 { 2498 - unsigned long j = jiffies; 2499 - unsigned long cur_roc_end = cur_roc->hw_start_time + 2500 - msecs_to_jiffies(cur_roc->duration); 2501 - struct ieee80211_roc_work *next_roc; 2502 - int new_dur; 2498 + unsigned long now = jiffies; 2499 + unsigned long remaining = cur_roc->hw_start_time + 2500 + msecs_to_jiffies(cur_roc->duration) - 2501 + now; 2503 2502 2504 2503 if (WARN_ON(!cur_roc->started || !cur_roc->hw_begun)) 2505 2504 return false; 2506 2505 2507 - if (time_after(j + IEEE80211_ROC_MIN_LEFT, cur_roc_end)) 2506 + /* if it doesn't fit entirely, schedule a new one */ 2507 + if (new_roc->duration > jiffies_to_msecs(remaining)) 2508 2508 return false; 2509 2509 2510 2510 ieee80211_handle_roc_started(new_roc); 2511 2511 2512 - new_dur = new_roc->duration - jiffies_to_msecs(cur_roc_end - j); 2513 - 2514 - /* cur_roc is long enough - add new_roc to the dependents list. */ 2515 - if (new_dur <= 0) { 2516 - list_add_tail(&new_roc->list, &cur_roc->dependents); 2517 - return true; 2518 - } 2519 - 2520 - new_roc->duration = new_dur; 2521 - 2522 - /* 2523 - * if cur_roc was already coalesced before, we might 2524 - * want to extend the next roc instead of adding 2525 - * a new one. 2526 - */ 2527 - next_roc = list_entry(cur_roc->list.next, 2528 - struct ieee80211_roc_work, list); 2529 - if (&next_roc->list != &local->roc_list && 2530 - next_roc->chan == new_roc->chan && 2531 - next_roc->sdata == new_roc->sdata && 2532 - !WARN_ON(next_roc->started)) { 2533 - list_add_tail(&new_roc->list, &next_roc->dependents); 2534 - next_roc->duration = max(next_roc->duration, 2535 - new_roc->duration); 2536 - next_roc->type = max(next_roc->type, new_roc->type); 2537 - return true; 2538 - } 2539 - 2540 - /* add right after cur_roc */ 2541 - list_add(&new_roc->list, &cur_roc->list); 2542 - 2512 + /* add to dependents so we send the expired event properly */ 2513 + list_add_tail(&new_roc->list, &cur_roc->dependents); 2543 2514 return true; 2544 2515 } 2545 2516 ··· 2623 2652 * In the offloaded ROC case, if it hasn't begun, add 2624 2653 * this new one to the dependent list to be handled 2625 2654 * when the master one begins. If it has begun, 2626 - * check that there's still a minimum time left and 2627 - * if so, start this one, transmitting the frame, but 2628 - * add it to the list directly after this one with 2629 - * a reduced time so we'll ask the driver to execute 2630 - * it right after finishing the previous one, in the 2631 - * hope that it'll also be executed right afterwards, 2632 - * effectively extending the old one. 2633 - * If there's no minimum time left, just add it to the 2634 - * normal list. 2635 - * TODO: the ROC type is ignored here, assuming that it 2636 - * is better to immediately use the current ROC. 2655 + * check if it fits entirely within the existing one, 2656 + * in which case it will just be dependent as well. 2657 + * Otherwise, schedule it by itself. 2637 2658 */ 2638 2659 if (!tmp->hw_begun) { 2639 2660 list_add_tail(&roc->list, &tmp->dependents);
+3 -6
net/mac80211/ieee80211_i.h
··· 205 205 * @IEEE80211_RX_CMNTR: received on cooked monitor already 206 206 * @IEEE80211_RX_BEACON_REPORTED: This frame was already reported 207 207 * to cfg80211_report_obss_beacon(). 208 + * @IEEE80211_RX_REORDER_TIMER: this frame is released by the 209 + * reorder buffer timeout timer, not the normal RX path 208 210 * 209 211 * These flags are used across handling multiple interfaces 210 212 * for a single frame. ··· 214 212 enum ieee80211_rx_flags { 215 213 IEEE80211_RX_CMNTR = BIT(0), 216 214 IEEE80211_RX_BEACON_REPORTED = BIT(1), 215 + IEEE80211_RX_REORDER_TIMER = BIT(2), 217 216 }; 218 217 219 218 struct ieee80211_rx_data { ··· 327 324 u8 dst[ETH_ALEN]; 328 325 u8 flags; 329 326 }; 330 - 331 - #if HZ/100 == 0 332 - #define IEEE80211_ROC_MIN_LEFT 1 333 - #else 334 - #define IEEE80211_ROC_MIN_LEFT (HZ/100) 335 - #endif 336 327 337 328 struct ieee80211_roc_work { 338 329 struct list_head list;
+6
net/mac80211/iface.c
··· 522 522 memcpy(sdata->vif.hw_queue, master->vif.hw_queue, 523 523 sizeof(sdata->vif.hw_queue)); 524 524 sdata->vif.bss_conf.chandef = master->vif.bss_conf.chandef; 525 + 526 + mutex_lock(&local->key_mtx); 527 + sdata->crypto_tx_tailroom_needed_cnt += 528 + master->crypto_tx_tailroom_needed_cnt; 529 + mutex_unlock(&local->key_mtx); 530 + 525 531 break; 526 532 } 527 533 case NL80211_IFTYPE_AP:
+73 -9
net/mac80211/key.c
··· 58 58 lockdep_assert_held(&local->key_mtx); 59 59 } 60 60 61 + static void 62 + update_vlan_tailroom_need_count(struct ieee80211_sub_if_data *sdata, int delta) 63 + { 64 + struct ieee80211_sub_if_data *vlan; 65 + 66 + if (sdata->vif.type != NL80211_IFTYPE_AP) 67 + return; 68 + 69 + mutex_lock(&sdata->local->mtx); 70 + 71 + list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) 72 + vlan->crypto_tx_tailroom_needed_cnt += delta; 73 + 74 + mutex_unlock(&sdata->local->mtx); 75 + } 76 + 61 77 static void increment_tailroom_need_count(struct ieee80211_sub_if_data *sdata) 62 78 { 63 79 /* ··· 95 79 * http://mid.gmane.org/1308590980.4322.19.camel@jlt3.sipsolutions.net 96 80 */ 97 81 82 + update_vlan_tailroom_need_count(sdata, 1); 83 + 98 84 if (!sdata->crypto_tx_tailroom_needed_cnt++) { 99 85 /* 100 86 * Flush all XMIT packets currently using HW encryption or no ··· 104 86 */ 105 87 synchronize_net(); 106 88 } 89 + } 90 + 91 + static void decrease_tailroom_need_count(struct ieee80211_sub_if_data *sdata, 92 + int delta) 93 + { 94 + WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt < delta); 95 + 96 + update_vlan_tailroom_need_count(sdata, -delta); 97 + sdata->crypto_tx_tailroom_needed_cnt -= delta; 107 98 } 108 99 109 100 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) ··· 171 144 172 145 if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || 173 146 (key->conf.flags & IEEE80211_KEY_FLAG_RESERVE_TAILROOM))) 174 - sdata->crypto_tx_tailroom_needed_cnt--; 147 + decrease_tailroom_need_count(sdata, 1); 175 148 176 149 WARN_ON((key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE) && 177 150 (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)); ··· 568 541 schedule_delayed_work(&sdata->dec_tailroom_needed_wk, 569 542 HZ/2); 570 543 } else { 571 - sdata->crypto_tx_tailroom_needed_cnt--; 544 + decrease_tailroom_need_count(sdata, 1); 572 545 } 573 546 } 574 547 ··· 658 631 void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata) 659 632 { 660 633 struct ieee80211_key *key; 634 + struct ieee80211_sub_if_data *vlan; 661 635 662 636 ASSERT_RTNL(); 663 637 ··· 667 639 668 640 mutex_lock(&sdata->local->key_mtx); 669 641 670 - sdata->crypto_tx_tailroom_needed_cnt = 0; 642 + WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt || 643 + sdata->crypto_tx_tailroom_pending_dec); 644 + 645 + if (sdata->vif.type == NL80211_IFTYPE_AP) { 646 + list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) 647 + WARN_ON_ONCE(vlan->crypto_tx_tailroom_needed_cnt || 648 + vlan->crypto_tx_tailroom_pending_dec); 649 + } 671 650 672 651 list_for_each_entry(key, &sdata->key_list, list) { 673 652 increment_tailroom_need_count(sdata); 674 653 ieee80211_key_enable_hw_accel(key); 654 + } 655 + 656 + mutex_unlock(&sdata->local->key_mtx); 657 + } 658 + 659 + void ieee80211_reset_crypto_tx_tailroom(struct ieee80211_sub_if_data *sdata) 660 + { 661 + struct ieee80211_sub_if_data *vlan; 662 + 663 + mutex_lock(&sdata->local->key_mtx); 664 + 665 + sdata->crypto_tx_tailroom_needed_cnt = 0; 666 + 667 + if (sdata->vif.type == NL80211_IFTYPE_AP) { 668 + list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) 669 + vlan->crypto_tx_tailroom_needed_cnt = 0; 675 670 } 676 671 677 672 mutex_unlock(&sdata->local->key_mtx); ··· 739 688 { 740 689 struct ieee80211_key *key, *tmp; 741 690 742 - sdata->crypto_tx_tailroom_needed_cnt -= 743 - sdata->crypto_tx_tailroom_pending_dec; 691 + decrease_tailroom_need_count(sdata, 692 + sdata->crypto_tx_tailroom_pending_dec); 744 693 sdata->crypto_tx_tailroom_pending_dec = 0; 745 694 746 695 ieee80211_debugfs_key_remove_mgmt_default(sdata); ··· 760 709 { 761 710 struct ieee80211_local *local = sdata->local; 762 711 struct ieee80211_sub_if_data *vlan; 712 + struct ieee80211_sub_if_data *master; 763 713 struct ieee80211_key *key, *tmp; 764 714 LIST_HEAD(keys); 765 715 ··· 780 728 list_for_each_entry_safe(key, tmp, &keys, list) 781 729 __ieee80211_key_destroy(key, false); 782 730 783 - WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt || 784 - sdata->crypto_tx_tailroom_pending_dec); 731 + if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { 732 + if (sdata->bss) { 733 + master = container_of(sdata->bss, 734 + struct ieee80211_sub_if_data, 735 + u.ap); 736 + 737 + WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt != 738 + master->crypto_tx_tailroom_needed_cnt); 739 + } 740 + } else { 741 + WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt || 742 + sdata->crypto_tx_tailroom_pending_dec); 743 + } 744 + 785 745 if (sdata->vif.type == NL80211_IFTYPE_AP) { 786 746 list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) 787 747 WARN_ON_ONCE(vlan->crypto_tx_tailroom_needed_cnt || ··· 857 793 */ 858 794 859 795 mutex_lock(&sdata->local->key_mtx); 860 - sdata->crypto_tx_tailroom_needed_cnt -= 861 - sdata->crypto_tx_tailroom_pending_dec; 796 + decrease_tailroom_need_count(sdata, 797 + sdata->crypto_tx_tailroom_pending_dec); 862 798 sdata->crypto_tx_tailroom_pending_dec = 0; 863 799 mutex_unlock(&sdata->local->key_mtx); 864 800 }
+1
net/mac80211/key.h
··· 161 161 void ieee80211_free_sta_keys(struct ieee80211_local *local, 162 162 struct sta_info *sta); 163 163 void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata); 164 + void ieee80211_reset_crypto_tx_tailroom(struct ieee80211_sub_if_data *sdata); 164 165 165 166 #define key_mtx_dereference(local, ref) \ 166 167 rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx)))
+3 -2
net/mac80211/rx.c
··· 2121 2121 /* deliver to local stack */ 2122 2122 skb->protocol = eth_type_trans(skb, dev); 2123 2123 memset(skb->cb, 0, sizeof(skb->cb)); 2124 - if (rx->local->napi) 2124 + if (!(rx->flags & IEEE80211_RX_REORDER_TIMER) && 2125 + rx->local->napi) 2125 2126 napi_gro_receive(rx->local->napi, skb); 2126 2127 else 2127 2128 netif_receive_skb(skb); ··· 3232 3231 /* This is OK -- must be QoS data frame */ 3233 3232 .security_idx = tid, 3234 3233 .seqno_idx = tid, 3235 - .flags = 0, 3234 + .flags = IEEE80211_RX_REORDER_TIMER, 3236 3235 }; 3237 3236 struct tid_ampdu_rx *tid_agg_rx; 3238 3237
+3
net/mac80211/util.c
··· 2023 2023 2024 2024 /* add back keys */ 2025 2025 list_for_each_entry(sdata, &local->interfaces, list) 2026 + ieee80211_reset_crypto_tx_tailroom(sdata); 2027 + 2028 + list_for_each_entry(sdata, &local->interfaces, list) 2026 2029 if (ieee80211_sdata_running(sdata)) 2027 2030 ieee80211_enable_keys(sdata); 2028 2031
+6 -4
net/sched/sch_api.c
··· 815 815 if (dev->flags & IFF_UP) 816 816 dev_deactivate(dev); 817 817 818 - if (new && new->ops->attach) { 819 - new->ops->attach(new); 820 - num_q = 0; 821 - } 818 + if (new && new->ops->attach) 819 + goto skip; 822 820 823 821 for (i = 0; i < num_q; i++) { 824 822 struct netdev_queue *dev_queue = dev_ingress_queue(dev); ··· 832 834 qdisc_destroy(old); 833 835 } 834 836 837 + skip: 835 838 if (!ingress) { 836 839 notify_and_destroy(net, skb, n, classid, 837 840 dev->qdisc, new); 838 841 if (new && !new->ops->attach) 839 842 atomic_inc(&new->refcnt); 840 843 dev->qdisc = new ? : &noop_qdisc; 844 + 845 + if (new && new->ops->attach) 846 + new->ops->attach(new); 841 847 } else { 842 848 notify_and_destroy(net, skb, n, classid, old, new); 843 849 }
+8
net/unix/af_unix.c
··· 1880 1880 unix_state_unlock(sk); 1881 1881 timeo = freezable_schedule_timeout(timeo); 1882 1882 unix_state_lock(sk); 1883 + 1884 + if (sock_flag(sk, SOCK_DEAD)) 1885 + break; 1886 + 1883 1887 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 1884 1888 } 1885 1889 ··· 1943 1939 struct sk_buff *skb, *last; 1944 1940 1945 1941 unix_state_lock(sk); 1942 + if (sock_flag(sk, SOCK_DEAD)) { 1943 + err = -ECONNRESET; 1944 + goto unlock; 1945 + } 1946 1946 last = skb = skb_peek(&sk->sk_receive_queue); 1947 1947 again: 1948 1948 if (skb == NULL) {
+2
tools/net/bpf_jit_disasm.c
··· 123 123 assert(ret == 0); 124 124 125 125 ptr = haystack; 126 + memset(pmatch, 0, sizeof(pmatch)); 127 + 126 128 while (1) { 127 129 ret = regexec(&regex, ptr, 1, pmatch, 0); 128 130 if (ret == 0) {