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:
"This is what we usually expect at this stage of the game, lots of
little things, mostly in drivers. With the occasional 'oops didn't
mean to do that' kind of regressions in the core code."

1) Uninitialized data in __ip_vs_get_timeouts(), from Arnd Bergmann

2) Reject invalid ACK sequences in Fast Open sockets, from Jerry Chu.

3) Lost error code on return from _rtl_usb_receive(), from Christian
Lamparter.

4) Fix reset resume on USB rt2x00, from Stanislaw Gruszka.

5) Release resources on error in pch_gbe driver, from Veaceslav Falico.

6) Default hop limit not set correctly in ip6_template_metrics[], fix
from Li RongQing.

7) Gianfar PTP code requests wrong kind of resource during probe, fix
from Wei Yang.

8) Fix VHOST net driver on big-endian, from Michael S Tsirkin.

9) Mallenox driver bug fixes from Jack Morgenstein, Or Gerlitz, Moni
Shoua, Dotan Barak, and Uri Habusha.

10) usbnet leaks memory on TX path, fix from Hemant Kumar.

11) Use socket state test, rather than presence of FIN bit packet, to
determine FIONREAD/SIOCINQ value. Fix from Eric Dumazet.

12) Fix cxgb4 build failure, from Vipul Pandya.

13) Provide a SYN_DATA_ACKED state to complement SYN_FASTOPEN in socket
info dumps. From Yuchung Cheng.

14) Fix leak of security path in kfree_skb_partial(). Fix from Eric
Dumazet.

15) Handle RX FIFO overflows more resiliently in pch_gbe driver, from
Veaceslav Falico.

16) Fix MAINTAINERS file pattern for networking drivers, from Jean
Delvare.

17) Add iPhone5 IDs to IPHETH driver, from Jay Purohit.

18) VLAN device type change restriction is too strict, and should not
trigger for the automatically generated vlan0 device. Fix from Jiri
Pirko.

19) Make PMTU/redirect flushing work properly again in ipv4, from
Steffen Klassert.

20) Fix memory corruptions by using kfree_rcu() in netlink_release().
From Eric Dumazet.

21) More qmi_wwan device IDs, from Bjørn Mork.

22) Fix unintentional change of SNAT/DNAT hooks in generic NAT
infrastructure, from Elison Niven.

23) Fix 3.6.x regression in xt_TEE netfilter module, from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits)
tilegx: fix some issues in the SW TSO support
qmi_wwan/cdc_ether: move Novatel 551 and E362 to qmi_wwan
net: usb: Fix memory leak on Tx data path
net/mlx4_core: Unmap UAR also in the case of error flow
net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
net/mlx4_en: Fix double-release-range in tx-rings
bas_gigaset: fix pre_reset handling
vhost: fix mergeable bufs on BE hosts
gianfar_ptp: use iomem, not ioports resource tree in probe
ipv6: Set default hoplimit as zero.
NET_VENDOR_TI: make available for am33xx as well
pch_gbe: fix error handling in pch_gbe_up()
b43: Fix oops on unload when firmware not found
mwifiex: clean up scan state on error
mwifiex: return -EBUSY if specific scan request cannot be honored
brcmfmac: fix potential NULL dereference
Revert "ath9k_hw: Updated AR9003 tx gain table for 5GHz"
ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation
rt2x00: usb: fix reset resume
rtlwifi: pass rx setup error code to caller
...

+724 -384
+7 -1
MAINTAINERS
··· 5062 5062 S: Odd Fixes 5063 5063 F: drivers/net/ 5064 5064 F: include/linux/if_* 5065 - F: include/linux/*device.h 5065 + F: include/linux/netdevice.h 5066 + F: include/linux/arcdevice.h 5067 + F: include/linux/etherdevice.h 5068 + F: include/linux/fcdevice.h 5069 + F: include/linux/fddidevice.h 5070 + F: include/linux/hippidevice.h 5071 + F: include/linux/inetdevice.h 5066 5072 5067 5073 NETXEN (1/10) GbE SUPPORT 5068 5074 M: Sony Chacko <sony.chacko@qlogic.com>
+3 -2
drivers/bcma/main.c
··· 158 158 159 159 static void bcma_unregister_cores(struct bcma_bus *bus) 160 160 { 161 - struct bcma_device *core; 161 + struct bcma_device *core, *tmp; 162 162 163 - list_for_each_entry(core, &bus->cores, list) { 163 + list_for_each_entry_safe(core, tmp, &bus->cores, list) { 164 + list_del(&core->list); 164 165 if (core->dev_registered) 165 166 device_unregister(&core->dev); 166 167 }
+16 -3
drivers/isdn/gigaset/bas-gigaset.c
··· 617 617 if (rc == 0) 618 618 /* success, resubmit interrupt read URB */ 619 619 rc = usb_submit_urb(urb, GFP_ATOMIC); 620 - if (rc != 0 && rc != -ENODEV) { 620 + 621 + switch (rc) { 622 + case 0: /* success */ 623 + case -ENODEV: /* device gone */ 624 + case -EINVAL: /* URB already resubmitted, or terminal badness */ 625 + break; 626 + default: /* failure: try to recover by resetting the device */ 621 627 dev_err(cs->dev, "clear halt failed: %s\n", get_usb_rcmsg(rc)); 622 628 rc = usb_lock_device_for_reset(ucs->udev, ucs->interface); 623 629 if (rc == 0) { ··· 2448 2442 } 2449 2443 2450 2444 /* gigaset_suspend 2451 - * This function is called before the USB connection is suspended. 2445 + * This function is called before the USB connection is suspended 2446 + * or before the USB device is reset. 2447 + * In the latter case, message == PMSG_ON. 2452 2448 */ 2453 2449 static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) 2454 2450 { ··· 2506 2498 del_timer_sync(&ucs->timer_atrdy); 2507 2499 del_timer_sync(&ucs->timer_cmd_in); 2508 2500 del_timer_sync(&ucs->timer_int_in); 2509 - cancel_work_sync(&ucs->int_in_wq); 2501 + 2502 + /* don't try to cancel int_in_wq from within reset as it 2503 + * might be the one requesting the reset 2504 + */ 2505 + if (message.event != PM_EVENT_ON) 2506 + cancel_work_sync(&ucs->int_in_wq); 2510 2507 2511 2508 gig_dbg(DEBUG_SUSPEND, "suspend complete"); 2512 2509 return 0;
+16 -3
drivers/net/can/flexcan.c
··· 144 144 145 145 #define FLEXCAN_MB_CODE_MASK (0xf0ffffff) 146 146 147 - /* FLEXCAN hardware feature flags */ 147 + /* 148 + * FLEXCAN hardware feature flags 149 + * 150 + * Below is some version info we got: 151 + * SOC Version IP-Version Glitch- [TR]WRN_INT 152 + * Filter? connected? 153 + * MX25 FlexCAN2 03.00.00.00 no no 154 + * MX28 FlexCAN2 03.00.04.00 yes yes 155 + * MX35 FlexCAN2 03.00.00.00 no no 156 + * MX53 FlexCAN2 03.00.00.00 yes no 157 + * MX6s FlexCAN3 10.00.12.00 yes yes 158 + * 159 + * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. 160 + */ 148 161 #define FLEXCAN_HAS_V10_FEATURES BIT(1) /* For core version >= 10 */ 149 - #define FLEXCAN_HAS_BROKEN_ERR_STATE BIT(2) /* Broken error state handling */ 162 + #define FLEXCAN_HAS_BROKEN_ERR_STATE BIT(2) /* [TR]WRN_INT not connected */ 150 163 151 164 /* Structure of the message buffer */ 152 165 struct flexcan_mb { ··· 218 205 }; 219 206 static struct flexcan_devtype_data fsl_imx28_devtype_data; 220 207 static struct flexcan_devtype_data fsl_imx6q_devtype_data = { 221 - .features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_BROKEN_ERR_STATE, 208 + .features = FLEXCAN_HAS_V10_FEATURES, 222 209 }; 223 210 224 211 static const struct can_bittiming_const flexcan_bittiming_const = {
+11 -2
drivers/net/can/sja1000/peak_pci.c
··· 30 30 31 31 #include "sja1000.h" 32 32 33 - MODULE_AUTHOR("Wolfgang Grandegger <wg@grandegger.com>"); 33 + MODULE_AUTHOR("Stephane Grosjean <s.grosjean@peak-system.com>"); 34 34 MODULE_DESCRIPTION("Socket-CAN driver for PEAK PCAN PCI family cards"); 35 35 MODULE_SUPPORTED_DEVICE("PEAK PCAN PCI/PCIe/PCIeC miniPCI CAN cards"); 36 + MODULE_SUPPORTED_DEVICE("PEAK PCAN miniPCIe/cPCI PC/104+ PCI/104e CAN Cards"); 36 37 MODULE_LICENSE("GPL v2"); 37 38 38 39 #define DRV_NAME "peak_pci" ··· 65 64 #define PEAK_PCI_DEVICE_ID 0x0001 /* for PCI/PCIe slot cards */ 66 65 #define PEAK_PCIEC_DEVICE_ID 0x0002 /* for ExpressCard slot cards */ 67 66 #define PEAK_PCIE_DEVICE_ID 0x0003 /* for nextgen PCIe slot cards */ 68 - #define PEAK_MPCI_DEVICE_ID 0x0008 /* The miniPCI slot cards */ 67 + #define PEAK_CPCI_DEVICE_ID 0x0004 /* for nextgen cPCI slot cards */ 68 + #define PEAK_MPCI_DEVICE_ID 0x0005 /* for nextgen miniPCI slot cards */ 69 + #define PEAK_PC_104P_DEVICE_ID 0x0006 /* PCAN-PC/104+ cards */ 70 + #define PEAK_PCI_104E_DEVICE_ID 0x0007 /* PCAN-PCI/104 Express cards */ 71 + #define PEAK_MPCIE_DEVICE_ID 0x0008 /* The miniPCIe slot cards */ 69 72 70 73 #define PEAK_PCI_CHAN_MAX 4 71 74 ··· 81 76 {PEAK_PCI_VENDOR_ID, PEAK_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 82 77 {PEAK_PCI_VENDOR_ID, PEAK_PCIE_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 83 78 {PEAK_PCI_VENDOR_ID, PEAK_MPCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 79 + {PEAK_PCI_VENDOR_ID, PEAK_MPCIE_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 80 + {PEAK_PCI_VENDOR_ID, PEAK_PC_104P_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 81 + {PEAK_PCI_VENDOR_ID, PEAK_PCI_104E_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 82 + {PEAK_PCI_VENDOR_ID, PEAK_CPCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 84 83 #ifdef CONFIG_CAN_PEAK_PCIEC 85 84 {PEAK_PCI_VENDOR_ID, PEAK_PCIEC_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, 86 85 #endif
+19
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
··· 251 251 unsigned char rev; /* chip revision */ 252 252 unsigned char offload; 253 253 254 + unsigned char bypass; 255 + 254 256 unsigned int ofldq_wr_cred; 255 257 }; 256 258 ··· 643 641 644 642 #define for_each_port(adapter, iter) \ 645 643 for (iter = 0; iter < (adapter)->params.nports; ++iter) 644 + 645 + static inline int is_bypass(struct adapter *adap) 646 + { 647 + return adap->params.bypass; 648 + } 649 + 650 + static inline int is_bypass_device(int device) 651 + { 652 + /* this should be set based upon device capabilities */ 653 + switch (device) { 654 + case 0x440b: 655 + case 0x440c: 656 + return 1; 657 + default: 658 + return 0; 659 + } 660 + } 646 661 647 662 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) 648 663 {
+5 -24
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
··· 3513 3513 if (ret < 0) 3514 3514 goto bye; 3515 3515 3516 - #ifndef CONFIG_CHELSIO_T4_OFFLOAD 3517 - /* 3518 - * If we're a pure NIC driver then disable all offloading facilities. 3519 - * This will allow the firmware to optimize aspects of the hardware 3520 - * configuration which will result in improved performance. 3521 - */ 3522 - caps_cmd.ofldcaps = 0; 3523 - caps_cmd.iscsicaps = 0; 3524 - caps_cmd.rdmacaps = 0; 3525 - caps_cmd.fcoecaps = 0; 3526 - #endif 3527 - 3528 3516 if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_VM)) { 3529 3517 if (!vf_acls) 3530 3518 caps_cmd.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM); ··· 3733 3745 u32 v, port_vec; 3734 3746 enum dev_state state; 3735 3747 u32 params[7], val[7]; 3748 + struct fw_caps_config_cmd caps_cmd; 3736 3749 int reset = 1, j; 3737 3750 3738 3751 /* ··· 3887 3898 goto bye; 3888 3899 } 3889 3900 3901 + if (is_bypass_device(adap->pdev->device)) 3902 + adap->params.bypass = 1; 3903 + 3890 3904 /* 3891 3905 * Grab some of our basic fundamental operating parameters. 3892 3906 */ ··· 3932 3940 adap->tids.aftid_end = val[1]; 3933 3941 } 3934 3942 3935 - #ifdef CONFIG_CHELSIO_T4_OFFLOAD 3936 3943 /* 3937 3944 * Get device capabilities so we can determine what resources we need 3938 3945 * to manage. 3939 3946 */ 3940 3947 memset(&caps_cmd, 0, sizeof(caps_cmd)); 3941 - caps_cmd.op_to_write = htonl(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | 3948 + caps_cmd.op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | 3942 3949 FW_CMD_REQUEST | FW_CMD_READ); 3943 3950 caps_cmd.retval_len16 = htonl(FW_LEN16(caps_cmd)); 3944 3951 ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd), ··· 3981 3990 adap->vres.ddp.start = val[3]; 3982 3991 adap->vres.ddp.size = val[4] - val[3] + 1; 3983 3992 adap->params.ofldq_wr_cred = val[5]; 3984 - 3985 - params[0] = FW_PARAM_PFVF(ETHOFLD_START); 3986 - params[1] = FW_PARAM_PFVF(ETHOFLD_END); 3987 - ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, 3988 - params, val); 3989 - if ((val[0] != val[1]) && (ret >= 0)) { 3990 - adap->tids.uotid_base = val[0]; 3991 - adap->tids.nuotids = val[1] - val[0] + 1; 3992 - } 3993 3993 3994 3994 adap->params.offload = 1; 3995 3995 } ··· 4030 4048 } 4031 4049 #undef FW_PARAM_PFVF 4032 4050 #undef FW_PARAM_DEV 4033 - #endif /* CONFIG_CHELSIO_T4_OFFLOAD */ 4034 4051 4035 4052 /* 4036 4053 * These are finalized by FW initialization, load their values now.
+3
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
··· 102 102 unsigned int ftid_base; 103 103 unsigned int aftid_base; 104 104 unsigned int aftid_end; 105 + /* Server filter region */ 106 + unsigned int sftid_base; 107 + unsigned int nsftids; 105 108 106 109 spinlock_t atid_lock ____cacheline_aligned_in_smp; 107 110 union aopen_entry *afree;
+1 -1
drivers/net/ethernet/freescale/gianfar_ptp.c
··· 478 478 pr_err("no resource\n"); 479 479 goto no_resource; 480 480 } 481 - if (request_resource(&ioport_resource, etsects->rsrc)) { 481 + if (request_resource(&iomem_resource, etsects->rsrc)) { 482 482 pr_err("resource busy\n"); 483 483 goto no_resource; 484 484 }
+1 -2
drivers/net/ethernet/mellanox/mlx4/en_tx.c
··· 143 143 mlx4_bf_free(mdev->dev, &ring->bf); 144 144 mlx4_qp_remove(mdev->dev, &ring->qp); 145 145 mlx4_qp_free(mdev->dev, &ring->qp); 146 - mlx4_qp_release_range(mdev->dev, ring->qpn, 1); 147 146 mlx4_en_unmap_buffer(&ring->wqres.buf); 148 147 mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); 149 148 kfree(ring->bounce_buf); ··· 711 712 if (bounce) 712 713 tx_desc = mlx4_en_bounce_to_desc(priv, ring, index, desc_size); 713 714 714 - if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) { 715 + if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tx_tag_present(skb)) { 715 716 *(__be32 *) (&tx_desc->ctrl.vlan_tag) |= cpu_to_be32(ring->doorbell_qpn); 716 717 op_own |= htonl((bf_index & 0xffff) << 8); 717 718 /* Ensure new descirptor hits memory
+14 -4
drivers/net/ethernet/mellanox/mlx4/eq.c
··· 837 837 return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4); 838 838 } 839 839 840 + static void mlx4_unmap_uar(struct mlx4_dev *dev) 841 + { 842 + struct mlx4_priv *priv = mlx4_priv(dev); 843 + int i; 844 + 845 + for (i = 0; i < mlx4_num_eq_uar(dev); ++i) 846 + if (priv->eq_table.uar_map[i]) { 847 + iounmap(priv->eq_table.uar_map[i]); 848 + priv->eq_table.uar_map[i] = NULL; 849 + } 850 + } 851 + 840 852 static int mlx4_create_eq(struct mlx4_dev *dev, int nent, 841 853 u8 intr, struct mlx4_eq *eq) 842 854 { ··· 1213 1201 mlx4_free_irqs(dev); 1214 1202 1215 1203 err_out_bitmap: 1204 + mlx4_unmap_uar(dev); 1216 1205 mlx4_bitmap_cleanup(&priv->eq_table.bitmap); 1217 1206 1218 1207 err_out_free: ··· 1238 1225 if (!mlx4_is_slave(dev)) 1239 1226 mlx4_unmap_clr_int(dev); 1240 1227 1241 - for (i = 0; i < mlx4_num_eq_uar(dev); ++i) 1242 - if (priv->eq_table.uar_map[i]) 1243 - iounmap(priv->eq_table.uar_map[i]); 1244 - 1228 + mlx4_unmap_uar(dev); 1245 1229 mlx4_bitmap_cleanup(&priv->eq_table.bitmap); 1246 1230 1247 1231 kfree(priv->eq_table.uar_map);
+37 -79
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
··· 339 339 } 340 340 341 341 /** 342 - * pch_gbe_wait_clr_bit_irq - Wait to clear a bit for interrupt context 343 - * @reg: Pointer of register 344 - * @busy: Busy bit 345 - */ 346 - static int pch_gbe_wait_clr_bit_irq(void *reg, u32 bit) 347 - { 348 - u32 tmp; 349 - int ret = -1; 350 - /* wait busy */ 351 - tmp = 20; 352 - while ((ioread32(reg) & bit) && --tmp) 353 - udelay(5); 354 - if (!tmp) 355 - pr_err("Error: busy bit is not cleared\n"); 356 - else 357 - ret = 0; 358 - return ret; 359 - } 360 - 361 - /** 362 342 * pch_gbe_mac_mar_set - Set MAC address register 363 343 * @hw: Pointer to the HW structure 364 344 * @addr: Pointer to the MAC address ··· 389 409 return; 390 410 } 391 411 392 - static void pch_gbe_mac_reset_rx(struct pch_gbe_hw *hw) 412 + static void pch_gbe_disable_mac_rx(struct pch_gbe_hw *hw) 393 413 { 394 - /* Read the MAC addresses. and store to the private data */ 395 - pch_gbe_mac_read_mac_addr(hw); 396 - iowrite32(PCH_GBE_RX_RST, &hw->reg->RESET); 397 - pch_gbe_wait_clr_bit_irq(&hw->reg->RESET, PCH_GBE_RX_RST); 398 - /* Setup the MAC addresses */ 399 - pch_gbe_mac_mar_set(hw, hw->mac.addr, 0); 400 - return; 414 + u32 rctl; 415 + /* Disables Receive MAC */ 416 + rctl = ioread32(&hw->reg->MAC_RX_EN); 417 + iowrite32((rctl & ~PCH_GBE_MRE_MAC_RX_EN), &hw->reg->MAC_RX_EN); 418 + } 419 + 420 + static void pch_gbe_enable_mac_rx(struct pch_gbe_hw *hw) 421 + { 422 + u32 rctl; 423 + /* Enables Receive MAC */ 424 + rctl = ioread32(&hw->reg->MAC_RX_EN); 425 + iowrite32((rctl | PCH_GBE_MRE_MAC_RX_EN), &hw->reg->MAC_RX_EN); 401 426 } 402 427 403 428 /** ··· 898 913 static void pch_gbe_configure_rx(struct pch_gbe_adapter *adapter) 899 914 { 900 915 struct pch_gbe_hw *hw = &adapter->hw; 901 - u32 rdba, rdlen, rctl, rxdma; 916 + u32 rdba, rdlen, rxdma; 902 917 903 918 pr_debug("dma adr = 0x%08llx size = 0x%08x\n", 904 919 (unsigned long long)adapter->rx_ring->dma, ··· 906 921 907 922 pch_gbe_mac_force_mac_fc(hw); 908 923 909 - /* Disables Receive MAC */ 910 - rctl = ioread32(&hw->reg->MAC_RX_EN); 911 - iowrite32((rctl & ~PCH_GBE_MRE_MAC_RX_EN), &hw->reg->MAC_RX_EN); 924 + pch_gbe_disable_mac_rx(hw); 912 925 913 926 /* Disables Receive DMA */ 914 927 rxdma = ioread32(&hw->reg->DMA_CTRL); ··· 1299 1316 spin_unlock_irqrestore(&adapter->stats_lock, flags); 1300 1317 } 1301 1318 1302 - static void pch_gbe_stop_receive(struct pch_gbe_adapter *adapter) 1319 + static void pch_gbe_disable_dma_rx(struct pch_gbe_hw *hw) 1303 1320 { 1304 - struct pch_gbe_hw *hw = &adapter->hw; 1305 1321 u32 rxdma; 1306 - u16 value; 1307 - int ret; 1308 1322 1309 1323 /* Disable Receive DMA */ 1310 1324 rxdma = ioread32(&hw->reg->DMA_CTRL); 1311 1325 rxdma &= ~PCH_GBE_RX_DMA_EN; 1312 1326 iowrite32(rxdma, &hw->reg->DMA_CTRL); 1313 - /* Wait Rx DMA BUS is IDLE */ 1314 - ret = pch_gbe_wait_clr_bit_irq(&hw->reg->RX_DMA_ST, PCH_GBE_IDLE_CHECK); 1315 - if (ret) { 1316 - /* Disable Bus master */ 1317 - pci_read_config_word(adapter->pdev, PCI_COMMAND, &value); 1318 - value &= ~PCI_COMMAND_MASTER; 1319 - pci_write_config_word(adapter->pdev, PCI_COMMAND, value); 1320 - /* Stop Receive */ 1321 - pch_gbe_mac_reset_rx(hw); 1322 - /* Enable Bus master */ 1323 - value |= PCI_COMMAND_MASTER; 1324 - pci_write_config_word(adapter->pdev, PCI_COMMAND, value); 1325 - } else { 1326 - /* Stop Receive */ 1327 - pch_gbe_mac_reset_rx(hw); 1328 - } 1329 - /* reprogram multicast address register after reset */ 1330 - pch_gbe_set_multi(adapter->netdev); 1331 1327 } 1332 1328 1333 - static void pch_gbe_start_receive(struct pch_gbe_hw *hw) 1329 + static void pch_gbe_enable_dma_rx(struct pch_gbe_hw *hw) 1334 1330 { 1335 1331 u32 rxdma; 1336 1332 ··· 1317 1355 rxdma = ioread32(&hw->reg->DMA_CTRL); 1318 1356 rxdma |= PCH_GBE_RX_DMA_EN; 1319 1357 iowrite32(rxdma, &hw->reg->DMA_CTRL); 1320 - /* Enables Receive */ 1321 - iowrite32(PCH_GBE_MRE_MAC_RX_EN, &hw->reg->MAC_RX_EN); 1322 - return; 1323 1358 } 1324 1359 1325 1360 /** ··· 1352 1393 int_en = ioread32(&hw->reg->INT_EN); 1353 1394 iowrite32((int_en & ~PCH_GBE_INT_RX_FIFO_ERR), 1354 1395 &hw->reg->INT_EN); 1355 - pch_gbe_stop_receive(adapter); 1396 + pch_gbe_disable_dma_rx(&adapter->hw); 1356 1397 int_st |= ioread32(&hw->reg->INT_ST); 1357 1398 int_st = int_st & ioread32(&hw->reg->INT_EN); 1358 1399 } ··· 1930 1971 struct net_device *netdev = adapter->netdev; 1931 1972 struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring; 1932 1973 struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring; 1933 - int err; 1974 + int err = -EINVAL; 1934 1975 1935 1976 /* Ensure we have a valid MAC */ 1936 1977 if (!is_valid_ether_addr(adapter->hw.mac.addr)) { 1937 1978 pr_err("Error: Invalid MAC address\n"); 1938 - return -EINVAL; 1979 + goto out; 1939 1980 } 1940 1981 1941 1982 /* hardware has been reset, we need to reload some things */ ··· 1948 1989 1949 1990 err = pch_gbe_request_irq(adapter); 1950 1991 if (err) { 1951 - pr_err("Error: can't bring device up\n"); 1952 - return err; 1992 + pr_err("Error: can't bring device up - irq request failed\n"); 1993 + goto out; 1953 1994 } 1954 1995 err = pch_gbe_alloc_rx_buffers_pool(adapter, rx_ring, rx_ring->count); 1955 1996 if (err) { 1956 - pr_err("Error: can't bring device up\n"); 1957 - return err; 1997 + pr_err("Error: can't bring device up - alloc rx buffers pool failed\n"); 1998 + goto freeirq; 1958 1999 } 1959 2000 pch_gbe_alloc_tx_buffers(adapter, tx_ring); 1960 2001 pch_gbe_alloc_rx_buffers(adapter, rx_ring, rx_ring->count); 1961 2002 adapter->tx_queue_len = netdev->tx_queue_len; 1962 - pch_gbe_start_receive(&adapter->hw); 2003 + pch_gbe_enable_dma_rx(&adapter->hw); 2004 + pch_gbe_enable_mac_rx(&adapter->hw); 1963 2005 1964 2006 mod_timer(&adapter->watchdog_timer, jiffies); 1965 2007 ··· 1969 2009 netif_start_queue(adapter->netdev); 1970 2010 1971 2011 return 0; 2012 + 2013 + freeirq: 2014 + pch_gbe_free_irq(adapter); 2015 + out: 2016 + return err; 1972 2017 } 1973 2018 1974 2019 /** ··· 2370 2405 int work_done = 0; 2371 2406 bool poll_end_flag = false; 2372 2407 bool cleaned = false; 2373 - u32 int_en; 2374 2408 2375 2409 pr_debug("budget : %d\n", budget); 2376 2410 ··· 2386 2422 2387 2423 if (poll_end_flag) { 2388 2424 napi_complete(napi); 2389 - if (adapter->rx_stop_flag) { 2390 - adapter->rx_stop_flag = false; 2391 - pch_gbe_start_receive(&adapter->hw); 2392 - } 2393 2425 pch_gbe_irq_enable(adapter); 2394 - } else 2395 - if (adapter->rx_stop_flag) { 2396 - adapter->rx_stop_flag = false; 2397 - pch_gbe_start_receive(&adapter->hw); 2398 - int_en = ioread32(&adapter->hw.reg->INT_EN); 2399 - iowrite32((int_en | PCH_GBE_INT_RX_FIFO_ERR), 2400 - &adapter->hw.reg->INT_EN); 2401 - } 2426 + } 2427 + 2428 + if (adapter->rx_stop_flag) { 2429 + adapter->rx_stop_flag = false; 2430 + pch_gbe_enable_dma_rx(&adapter->hw); 2431 + } 2402 2432 2403 2433 pr_debug("poll_end_flag : %d work_done : %d budget : %d\n", 2404 2434 poll_end_flag, work_done, budget);
+7 -2
drivers/net/ethernet/qlogic/qla3xxx.c
··· 2525 2525 qdev->req_q_size = 2526 2526 (u32) (NUM_REQ_Q_ENTRIES * sizeof(struct ob_mac_iocb_req)); 2527 2527 2528 + qdev->rsp_q_size = NUM_RSP_Q_ENTRIES * sizeof(struct net_rsp_iocb); 2529 + 2530 + /* The barrier is required to ensure request and response queue 2531 + * addr writes to the registers. 2532 + */ 2533 + wmb(); 2534 + 2528 2535 qdev->req_q_virt_addr = 2529 2536 pci_alloc_consistent(qdev->pdev, 2530 2537 (size_t) qdev->req_q_size, ··· 2542 2535 netdev_err(qdev->ndev, "reqQ failed\n"); 2543 2536 return -ENOMEM; 2544 2537 } 2545 - 2546 - qdev->rsp_q_size = NUM_RSP_Q_ENTRIES * sizeof(struct net_rsp_iocb); 2547 2538 2548 2539 qdev->rsp_q_virt_addr = 2549 2540 pci_alloc_consistent(qdev->pdev,
+1 -1
drivers/net/ethernet/ti/Kconfig
··· 5 5 config NET_VENDOR_TI 6 6 bool "Texas Instruments (TI) devices" 7 7 default y 8 - depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3)) 8 + depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX)) 9 9 ---help--- 10 10 If you have a network (Ethernet) card belonging to this class, say Y 11 11 and read the Ethernet-HOWTO, available from
+19 -16
drivers/net/ethernet/tile/tilegx.c
··· 1334 1334 { 1335 1335 struct skb_shared_info *sh = skb_shinfo(skb); 1336 1336 unsigned int sh_len = skb_transport_offset(skb) + tcp_hdrlen(skb); 1337 - unsigned int data_len = skb->data_len + skb->hdr_len - sh_len; 1337 + unsigned int data_len = skb->len - sh_len; 1338 1338 unsigned int p_len = sh->gso_size; 1339 1339 long f_id = -1; /* id of the current fragment */ 1340 - long f_size = skb->hdr_len; /* size of the current fragment */ 1341 - long f_used = sh_len; /* bytes used from the current fragment */ 1340 + long f_size = skb_headlen(skb) - sh_len; /* current fragment size */ 1341 + long f_used = 0; /* bytes used from the current fragment */ 1342 1342 long n; /* size of the current piece of payload */ 1343 1343 int num_edescs = 0; 1344 1344 int segment; ··· 1353 1353 /* Advance as needed. */ 1354 1354 while (f_used >= f_size) { 1355 1355 f_id++; 1356 - f_size = sh->frags[f_id].size; 1356 + f_size = skb_frag_size(&sh->frags[f_id]); 1357 1357 f_used = 0; 1358 1358 } 1359 1359 ··· 1384 1384 struct iphdr *ih; 1385 1385 struct tcphdr *th; 1386 1386 unsigned int sh_len = skb_transport_offset(skb) + tcp_hdrlen(skb); 1387 - unsigned int data_len = skb->data_len + skb->hdr_len - sh_len; 1387 + unsigned int data_len = skb->len - sh_len; 1388 1388 unsigned char *data = skb->data; 1389 1389 unsigned int ih_off, th_off, p_len; 1390 1390 unsigned int isum_seed, tsum_seed, id, seq; 1391 1391 long f_id = -1; /* id of the current fragment */ 1392 - long f_size = skb->hdr_len; /* size of the current fragment */ 1393 - long f_used = sh_len; /* bytes used from the current fragment */ 1392 + long f_size = skb_headlen(skb) - sh_len; /* current fragment size */ 1393 + long f_used = 0; /* bytes used from the current fragment */ 1394 1394 long n; /* size of the current piece of payload */ 1395 1395 int segment; 1396 1396 ··· 1405 1405 isum_seed = ((0xFFFF - ih->check) + 1406 1406 (0xFFFF - ih->tot_len) + 1407 1407 (0xFFFF - ih->id)); 1408 - tsum_seed = th->check + (0xFFFF ^ htons(sh_len + data_len)); 1408 + tsum_seed = th->check + (0xFFFF ^ htons(skb->len)); 1409 1409 id = ntohs(ih->id); 1410 1410 seq = ntohl(th->seq); 1411 1411 ··· 1444 1444 /* Advance as needed. */ 1445 1445 while (f_used >= f_size) { 1446 1446 f_id++; 1447 - f_size = sh->frags[f_id].size; 1447 + f_size = skb_frag_size(&sh->frags[f_id]); 1448 1448 f_used = 0; 1449 1449 } 1450 1450 ··· 1478 1478 struct tile_net_priv *priv = netdev_priv(dev); 1479 1479 struct skb_shared_info *sh = skb_shinfo(skb); 1480 1480 unsigned int sh_len = skb_transport_offset(skb) + tcp_hdrlen(skb); 1481 - unsigned int data_len = skb->data_len + skb->hdr_len - sh_len; 1481 + unsigned int data_len = skb->len - sh_len; 1482 1482 unsigned int p_len = sh->gso_size; 1483 1483 gxio_mpipe_edesc_t edesc_head = { { 0 } }; 1484 1484 gxio_mpipe_edesc_t edesc_body = { { 0 } }; 1485 1485 long f_id = -1; /* id of the current fragment */ 1486 - long f_size = skb->hdr_len; /* size of the current fragment */ 1487 - long f_used = sh_len; /* bytes used from the current fragment */ 1488 - void *f_data = skb->data; 1486 + long f_size = skb_headlen(skb) - sh_len; /* current fragment size */ 1487 + long f_used = 0; /* bytes used from the current fragment */ 1488 + void *f_data = skb->data + sh_len; 1489 1489 long n; /* size of the current piece of payload */ 1490 1490 unsigned long tx_packets = 0, tx_bytes = 0; 1491 1491 unsigned int csum_start; ··· 1516 1516 1517 1517 /* Egress the payload. */ 1518 1518 while (p_used < p_len) { 1519 + void *va; 1519 1520 1520 1521 /* Advance as needed. */ 1521 1522 while (f_used >= f_size) { 1522 1523 f_id++; 1523 - f_size = sh->frags[f_id].size; 1524 - f_used = 0; 1524 + f_size = skb_frag_size(&sh->frags[f_id]); 1525 1525 f_data = tile_net_frag_buf(&sh->frags[f_id]); 1526 + f_used = 0; 1526 1527 } 1528 + 1529 + va = f_data + f_used; 1527 1530 1528 1531 /* Use bytes from the current fragment. */ 1529 1532 n = p_len - p_used; ··· 1536 1533 p_used += n; 1537 1534 1538 1535 /* Egress a piece of the payload. */ 1539 - edesc_body.va = va_to_tile_io_addr(f_data) + f_used; 1536 + edesc_body.va = va_to_tile_io_addr(va); 1540 1537 edesc_body.xfer_size = n; 1541 1538 edesc_body.bound = !(p_used < p_len); 1542 1539 gxio_mpipe_equeue_put_at(equeue, edesc_body, slot);
+5
drivers/net/phy/Kconfig
··· 15 15 16 16 comment "MII PHY device drivers" 17 17 18 + config AT803X_PHY 19 + tristate "Drivers for Atheros AT803X PHYs" 20 + ---help--- 21 + Currently supports the AT8030 and AT8035 model 22 + 18 23 config AMD_PHY 19 24 tristate "Drivers for the AMD PHYs" 20 25 ---help---
+1
drivers/net/phy/Makefile
··· 25 25 obj-$(CONFIG_MICREL_PHY) += micrel.o 26 26 obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o 27 27 obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o 28 + obj-$(CONFIG_AT803X_PHY) += at803x.o 28 29 obj-$(CONFIG_AMD_PHY) += amd.o 29 30 obj-$(CONFIG_MDIO_BUS_MUX) += mdio-mux.o 30 31 obj-$(CONFIG_MDIO_BUS_MUX_GPIO) += mdio-mux-gpio.o
+176
drivers/net/phy/at803x.c
··· 1 + /* 2 + * drivers/net/phy/at803x.c 3 + * 4 + * Driver for Atheros 803x PHY 5 + * 6 + * Author: Matus Ujhelyi <ujhelyi.m@gmail.com> 7 + * 8 + * This program is free software; you can redistribute it and/or modify it 9 + * under the terms of the GNU General Public License as published by the 10 + * Free Software Foundation; either version 2 of the License, or (at your 11 + * option) any later version. 12 + */ 13 + 14 + #include <linux/phy.h> 15 + #include <linux/module.h> 16 + #include <linux/string.h> 17 + #include <linux/netdevice.h> 18 + #include <linux/etherdevice.h> 19 + 20 + #define AT803X_INTR_ENABLE 0x12 21 + #define AT803X_INTR_STATUS 0x13 22 + #define AT803X_WOL_ENABLE 0x01 23 + #define AT803X_DEVICE_ADDR 0x03 24 + #define AT803X_LOC_MAC_ADDR_0_15_OFFSET 0x804C 25 + #define AT803X_LOC_MAC_ADDR_16_31_OFFSET 0x804B 26 + #define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A 27 + #define AT803X_MMD_ACCESS_CONTROL 0x0D 28 + #define AT803X_MMD_ACCESS_CONTROL_DATA 0x0E 29 + #define AT803X_FUNC_DATA 0x4003 30 + 31 + MODULE_DESCRIPTION("Atheros 803x PHY driver"); 32 + MODULE_AUTHOR("Matus Ujhelyi"); 33 + MODULE_LICENSE("GPL"); 34 + 35 + static void at803x_set_wol_mac_addr(struct phy_device *phydev) 36 + { 37 + struct net_device *ndev = phydev->attached_dev; 38 + const u8 *mac; 39 + unsigned int i, offsets[] = { 40 + AT803X_LOC_MAC_ADDR_32_47_OFFSET, 41 + AT803X_LOC_MAC_ADDR_16_31_OFFSET, 42 + AT803X_LOC_MAC_ADDR_0_15_OFFSET, 43 + }; 44 + 45 + if (!ndev) 46 + return; 47 + 48 + mac = (const u8 *) ndev->dev_addr; 49 + 50 + if (!is_valid_ether_addr(mac)) 51 + return; 52 + 53 + for (i = 0; i < 3; i++) { 54 + phy_write(phydev, AT803X_MMD_ACCESS_CONTROL, 55 + AT803X_DEVICE_ADDR); 56 + phy_write(phydev, AT803X_MMD_ACCESS_CONTROL_DATA, 57 + offsets[i]); 58 + phy_write(phydev, AT803X_MMD_ACCESS_CONTROL, 59 + AT803X_FUNC_DATA); 60 + phy_write(phydev, AT803X_MMD_ACCESS_CONTROL_DATA, 61 + mac[(i * 2) + 1] | (mac[(i * 2)] << 8)); 62 + } 63 + } 64 + 65 + static int at803x_config_init(struct phy_device *phydev) 66 + { 67 + int val; 68 + u32 features; 69 + int status; 70 + 71 + features = SUPPORTED_TP | SUPPORTED_MII | SUPPORTED_AUI | 72 + SUPPORTED_FIBRE | SUPPORTED_BNC; 73 + 74 + val = phy_read(phydev, MII_BMSR); 75 + if (val < 0) 76 + return val; 77 + 78 + if (val & BMSR_ANEGCAPABLE) 79 + features |= SUPPORTED_Autoneg; 80 + if (val & BMSR_100FULL) 81 + features |= SUPPORTED_100baseT_Full; 82 + if (val & BMSR_100HALF) 83 + features |= SUPPORTED_100baseT_Half; 84 + if (val & BMSR_10FULL) 85 + features |= SUPPORTED_10baseT_Full; 86 + if (val & BMSR_10HALF) 87 + features |= SUPPORTED_10baseT_Half; 88 + 89 + if (val & BMSR_ESTATEN) { 90 + val = phy_read(phydev, MII_ESTATUS); 91 + if (val < 0) 92 + return val; 93 + 94 + if (val & ESTATUS_1000_TFULL) 95 + features |= SUPPORTED_1000baseT_Full; 96 + if (val & ESTATUS_1000_THALF) 97 + features |= SUPPORTED_1000baseT_Half; 98 + } 99 + 100 + phydev->supported = features; 101 + phydev->advertising = features; 102 + 103 + /* enable WOL */ 104 + at803x_set_wol_mac_addr(phydev); 105 + status = phy_write(phydev, AT803X_INTR_ENABLE, AT803X_WOL_ENABLE); 106 + status = phy_read(phydev, AT803X_INTR_STATUS); 107 + 108 + return 0; 109 + } 110 + 111 + /* ATHEROS 8035 */ 112 + static struct phy_driver at8035_driver = { 113 + .phy_id = 0x004dd072, 114 + .name = "Atheros 8035 ethernet", 115 + .phy_id_mask = 0xffffffef, 116 + .config_init = at803x_config_init, 117 + .features = PHY_GBIT_FEATURES, 118 + .flags = PHY_HAS_INTERRUPT, 119 + .config_aneg = &genphy_config_aneg, 120 + .read_status = &genphy_read_status, 121 + .driver = { 122 + .owner = THIS_MODULE, 123 + }, 124 + }; 125 + 126 + /* ATHEROS 8030 */ 127 + static struct phy_driver at8030_driver = { 128 + .phy_id = 0x004dd076, 129 + .name = "Atheros 8030 ethernet", 130 + .phy_id_mask = 0xffffffef, 131 + .config_init = at803x_config_init, 132 + .features = PHY_GBIT_FEATURES, 133 + .flags = PHY_HAS_INTERRUPT, 134 + .config_aneg = &genphy_config_aneg, 135 + .read_status = &genphy_read_status, 136 + .driver = { 137 + .owner = THIS_MODULE, 138 + }, 139 + }; 140 + 141 + static int __init atheros_init(void) 142 + { 143 + int ret; 144 + 145 + ret = phy_driver_register(&at8035_driver); 146 + if (ret) 147 + goto err1; 148 + 149 + ret = phy_driver_register(&at8030_driver); 150 + if (ret) 151 + goto err2; 152 + 153 + return 0; 154 + 155 + err2: 156 + phy_driver_unregister(&at8035_driver); 157 + err1: 158 + return ret; 159 + } 160 + 161 + static void __exit atheros_exit(void) 162 + { 163 + phy_driver_unregister(&at8035_driver); 164 + phy_driver_unregister(&at8030_driver); 165 + } 166 + 167 + module_init(atheros_init); 168 + module_exit(atheros_exit); 169 + 170 + static struct mdio_device_id __maybe_unused atheros_tbl[] = { 171 + { 0x004dd076, 0xffffffef }, 172 + { 0x004dd072, 0xffffffef }, 173 + { } 174 + }; 175 + 176 + MODULE_DEVICE_TABLE(mdio, atheros_tbl);
+26 -15
drivers/net/usb/cdc_ether.c
··· 592 592 .driver_info = 0, 593 593 }, 594 594 595 + /* Novatel USB551L and MC551 - handled by qmi_wwan */ 596 + { 597 + .match_flags = USB_DEVICE_ID_MATCH_VENDOR 598 + | USB_DEVICE_ID_MATCH_PRODUCT 599 + | USB_DEVICE_ID_MATCH_INT_INFO, 600 + .idVendor = NOVATEL_VENDOR_ID, 601 + .idProduct = 0xB001, 602 + .bInterfaceClass = USB_CLASS_COMM, 603 + .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, 604 + .bInterfaceProtocol = USB_CDC_PROTO_NONE, 605 + .driver_info = 0, 606 + }, 607 + 608 + /* Novatel E362 - handled by qmi_wwan */ 609 + { 610 + .match_flags = USB_DEVICE_ID_MATCH_VENDOR 611 + | USB_DEVICE_ID_MATCH_PRODUCT 612 + | USB_DEVICE_ID_MATCH_INT_INFO, 613 + .idVendor = NOVATEL_VENDOR_ID, 614 + .idProduct = 0x9010, 615 + .bInterfaceClass = USB_CLASS_COMM, 616 + .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, 617 + .bInterfaceProtocol = USB_CDC_PROTO_NONE, 618 + .driver_info = 0, 619 + }, 620 + 595 621 /* 596 622 * WHITELIST!!! 597 623 * ··· 630 604 * because of bugs/quirks in a given product (like Zaurus, above). 631 605 */ 632 606 { 633 - /* Novatel USB551L */ 634 - /* This match must come *before* the generic CDC-ETHER match so that 635 - * we get FLAG_WWAN set on the device, since it's descriptors are 636 - * generic CDC-ETHER. 637 - */ 638 - .match_flags = USB_DEVICE_ID_MATCH_VENDOR 639 - | USB_DEVICE_ID_MATCH_PRODUCT 640 - | USB_DEVICE_ID_MATCH_INT_INFO, 641 - .idVendor = NOVATEL_VENDOR_ID, 642 - .idProduct = 0xB001, 643 - .bInterfaceClass = USB_CLASS_COMM, 644 - .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, 645 - .bInterfaceProtocol = USB_CDC_PROTO_NONE, 646 - .driver_info = (unsigned long)&wwan_info, 647 - }, { 648 607 /* ZTE (Vodafone) K3805-Z */ 649 608 .match_flags = USB_DEVICE_ID_MATCH_VENDOR 650 609 | USB_DEVICE_ID_MATCH_PRODUCT
+5
drivers/net/usb/ipheth.c
··· 62 62 #define USB_PRODUCT_IPAD 0x129a 63 63 #define USB_PRODUCT_IPHONE_4_VZW 0x129c 64 64 #define USB_PRODUCT_IPHONE_4S 0x12a0 65 + #define USB_PRODUCT_IPHONE_5 0x12a8 65 66 66 67 #define IPHETH_USBINTF_CLASS 255 67 68 #define IPHETH_USBINTF_SUBCLASS 253 ··· 112 111 IPHETH_USBINTF_PROTO) }, 113 112 { USB_DEVICE_AND_INTERFACE_INFO( 114 113 USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4S, 114 + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, 115 + IPHETH_USBINTF_PROTO) }, 116 + { USB_DEVICE_AND_INTERFACE_INFO( 117 + USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_5, 115 118 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, 116 119 IPHETH_USBINTF_PROTO) }, 117 120 { }
+55
drivers/net/usb/qmi_wwan.c
··· 369 369 USB_VENDOR_AND_INTERFACE_INFO(0x106c, USB_CLASS_VENDOR_SPEC, 0xf1, 0xff), 370 370 .driver_info = (unsigned long)&qmi_wwan_info, 371 371 }, 372 + { /* Novatel USB551L and MC551 */ 373 + USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0xb001, 374 + USB_CLASS_COMM, 375 + USB_CDC_SUBCLASS_ETHERNET, 376 + USB_CDC_PROTO_NONE), 377 + .driver_info = (unsigned long)&qmi_wwan_info, 378 + }, 379 + { /* Novatel E362 */ 380 + USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0x9010, 381 + USB_CLASS_COMM, 382 + USB_CDC_SUBCLASS_ETHERNET, 383 + USB_CDC_PROTO_NONE), 384 + .driver_info = (unsigned long)&qmi_wwan_info, 385 + }, 372 386 373 387 /* 3. Combined interface devices matching on interface number */ 388 + {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, 389 + {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, 390 + {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, 391 + {QMI_FIXED_INTF(0x19d2, 0x0021, 4)}, 392 + {QMI_FIXED_INTF(0x19d2, 0x0025, 1)}, 393 + {QMI_FIXED_INTF(0x19d2, 0x0031, 4)}, 394 + {QMI_FIXED_INTF(0x19d2, 0x0042, 4)}, 395 + {QMI_FIXED_INTF(0x19d2, 0x0049, 5)}, 396 + {QMI_FIXED_INTF(0x19d2, 0x0052, 4)}, 374 397 {QMI_FIXED_INTF(0x19d2, 0x0055, 1)}, /* ZTE (Vodafone) K3520-Z */ 398 + {QMI_FIXED_INTF(0x19d2, 0x0058, 4)}, 375 399 {QMI_FIXED_INTF(0x19d2, 0x0063, 4)}, /* ZTE (Vodafone) K3565-Z */ 376 400 {QMI_FIXED_INTF(0x19d2, 0x0104, 4)}, /* ZTE (Vodafone) K4505-Z */ 401 + {QMI_FIXED_INTF(0x19d2, 0x0113, 5)}, 402 + {QMI_FIXED_INTF(0x19d2, 0x0118, 5)}, 403 + {QMI_FIXED_INTF(0x19d2, 0x0121, 5)}, 404 + {QMI_FIXED_INTF(0x19d2, 0x0123, 4)}, 405 + {QMI_FIXED_INTF(0x19d2, 0x0124, 5)}, 406 + {QMI_FIXED_INTF(0x19d2, 0x0125, 6)}, 407 + {QMI_FIXED_INTF(0x19d2, 0x0126, 5)}, 408 + {QMI_FIXED_INTF(0x19d2, 0x0130, 1)}, 409 + {QMI_FIXED_INTF(0x19d2, 0x0133, 3)}, 410 + {QMI_FIXED_INTF(0x19d2, 0x0141, 5)}, 377 411 {QMI_FIXED_INTF(0x19d2, 0x0157, 5)}, /* ZTE MF683 */ 412 + {QMI_FIXED_INTF(0x19d2, 0x0158, 3)}, 378 413 {QMI_FIXED_INTF(0x19d2, 0x0167, 4)}, /* ZTE MF820D */ 414 + {QMI_FIXED_INTF(0x19d2, 0x0168, 4)}, 415 + {QMI_FIXED_INTF(0x19d2, 0x0176, 3)}, 416 + {QMI_FIXED_INTF(0x19d2, 0x0178, 3)}, 417 + {QMI_FIXED_INTF(0x19d2, 0x0191, 4)}, /* ZTE EuFi890 */ 418 + {QMI_FIXED_INTF(0x19d2, 0x0199, 1)}, /* ZTE MF820S */ 419 + {QMI_FIXED_INTF(0x19d2, 0x0200, 1)}, 420 + {QMI_FIXED_INTF(0x19d2, 0x0257, 3)}, /* ZTE MF821 */ 379 421 {QMI_FIXED_INTF(0x19d2, 0x0326, 4)}, /* ZTE MF821D */ 380 422 {QMI_FIXED_INTF(0x19d2, 0x1008, 4)}, /* ZTE (Vodafone) K3570-Z */ 381 423 {QMI_FIXED_INTF(0x19d2, 0x1010, 4)}, /* ZTE (Vodafone) K3571-Z */ 424 + {QMI_FIXED_INTF(0x19d2, 0x1012, 4)}, 382 425 {QMI_FIXED_INTF(0x19d2, 0x1018, 3)}, /* ZTE (Vodafone) K5006-Z */ 426 + {QMI_FIXED_INTF(0x19d2, 0x1021, 2)}, 427 + {QMI_FIXED_INTF(0x19d2, 0x1245, 4)}, 428 + {QMI_FIXED_INTF(0x19d2, 0x1247, 4)}, 429 + {QMI_FIXED_INTF(0x19d2, 0x1252, 4)}, 430 + {QMI_FIXED_INTF(0x19d2, 0x1254, 4)}, 431 + {QMI_FIXED_INTF(0x19d2, 0x1255, 3)}, 432 + {QMI_FIXED_INTF(0x19d2, 0x1255, 4)}, 433 + {QMI_FIXED_INTF(0x19d2, 0x1256, 4)}, 434 + {QMI_FIXED_INTF(0x19d2, 0x1401, 2)}, 383 435 {QMI_FIXED_INTF(0x19d2, 0x1402, 2)}, /* ZTE MF60 */ 436 + {QMI_FIXED_INTF(0x19d2, 0x1424, 2)}, 437 + {QMI_FIXED_INTF(0x19d2, 0x1425, 2)}, 438 + {QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */ 384 439 {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ 385 440 {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ 386 441 {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
+3
drivers/net/usb/usbnet.c
··· 1158 1158 usb_anchor_urb(urb, &dev->deferred); 1159 1159 /* no use to process more packets */ 1160 1160 netif_stop_queue(net); 1161 + usb_put_urb(urb); 1161 1162 spin_unlock_irqrestore(&dev->txq.lock, flags); 1162 1163 netdev_dbg(dev->net, "Delaying transmission for resumption\n"); 1163 1164 goto deferred; ··· 1310 1309 unregister_netdev (net); 1311 1310 1312 1311 cancel_work_sync(&dev->kevent); 1312 + 1313 + usb_scuttle_anchored_urbs(&dev->deferred); 1313 1314 1314 1315 if (dev->driver_info->unbind) 1315 1316 dev->driver_info->unbind (dev, intf);
+82 -82
drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
··· 534 534 535 535 static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = { 536 536 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 537 - {0x0000a2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352}, 538 - {0x0000a2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584}, 539 - {0x0000a2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800}, 537 + {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, 538 + {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, 539 + {0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800}, 540 540 {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, 541 541 {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, 542 542 {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 543 543 {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002}, 544 544 {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004}, 545 545 {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200}, 546 - {0x0000a510, 0x15000028, 0x15000028, 0x0f000202, 0x0f000202}, 547 - {0x0000a514, 0x1b00002b, 0x1b00002b, 0x12000400, 0x12000400}, 548 - {0x0000a518, 0x1f020028, 0x1f020028, 0x16000402, 0x16000402}, 549 - {0x0000a51c, 0x2502002b, 0x2502002b, 0x19000404, 0x19000404}, 550 - {0x0000a520, 0x2a04002a, 0x2a04002a, 0x1c000603, 0x1c000603}, 551 - {0x0000a524, 0x2e06002a, 0x2e06002a, 0x21000a02, 0x21000a02}, 552 - {0x0000a528, 0x3302202d, 0x3302202d, 0x25000a04, 0x25000a04}, 553 - {0x0000a52c, 0x3804202c, 0x3804202c, 0x28000a20, 0x28000a20}, 554 - {0x0000a530, 0x3c06202c, 0x3c06202c, 0x2c000e20, 0x2c000e20}, 555 - {0x0000a534, 0x4108202d, 0x4108202d, 0x30000e22, 0x30000e22}, 556 - {0x0000a538, 0x4506402d, 0x4506402d, 0x34000e24, 0x34000e24}, 557 - {0x0000a53c, 0x4906222d, 0x4906222d, 0x38001640, 0x38001640}, 558 - {0x0000a540, 0x4d062231, 0x4d062231, 0x3c001660, 0x3c001660}, 559 - {0x0000a544, 0x50082231, 0x50082231, 0x3f001861, 0x3f001861}, 560 - {0x0000a548, 0x5608422e, 0x5608422e, 0x43001a81, 0x43001a81}, 561 - {0x0000a54c, 0x5a08442e, 0x5a08442e, 0x47001a83, 0x47001a83}, 562 - {0x0000a550, 0x5e0a4431, 0x5e0a4431, 0x4a001c84, 0x4a001c84}, 563 - {0x0000a554, 0x640a4432, 0x640a4432, 0x4e001ce3, 0x4e001ce3}, 564 - {0x0000a558, 0x680a4434, 0x680a4434, 0x52001ce5, 0x52001ce5}, 565 - {0x0000a55c, 0x6c0a6434, 0x6c0a6434, 0x56001ce9, 0x56001ce9}, 566 - {0x0000a560, 0x6f0a6633, 0x6f0a6633, 0x5a001ceb, 0x5a001ceb}, 567 - {0x0000a564, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 568 - {0x0000a568, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 569 - {0x0000a56c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 570 - {0x0000a570, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 571 - {0x0000a574, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 572 - {0x0000a578, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 573 - {0x0000a57c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec}, 546 + {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202}, 547 + {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400}, 548 + {0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402}, 549 + {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404}, 550 + {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603}, 551 + {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02}, 552 + {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04}, 553 + {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20}, 554 + {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20}, 555 + {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22}, 556 + {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24}, 557 + {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640}, 558 + {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660}, 559 + {0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861}, 560 + {0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81}, 561 + {0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83}, 562 + {0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84}, 563 + {0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3}, 564 + {0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5}, 565 + {0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9}, 566 + {0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb}, 567 + {0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 568 + {0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 569 + {0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 570 + {0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 571 + {0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 572 + {0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 573 + {0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 574 574 {0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000}, 575 575 {0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002}, 576 576 {0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004}, 577 577 {0x0000a58c, 0x10800023, 0x10800023, 0x0b800200, 0x0b800200}, 578 - {0x0000a590, 0x15800028, 0x15800028, 0x0f800202, 0x0f800202}, 579 - {0x0000a594, 0x1b80002b, 0x1b80002b, 0x12800400, 0x12800400}, 580 - {0x0000a598, 0x1f820028, 0x1f820028, 0x16800402, 0x16800402}, 581 - {0x0000a59c, 0x2582002b, 0x2582002b, 0x19800404, 0x19800404}, 582 - {0x0000a5a0, 0x2a84002a, 0x2a84002a, 0x1c800603, 0x1c800603}, 583 - {0x0000a5a4, 0x2e86002a, 0x2e86002a, 0x21800a02, 0x21800a02}, 584 - {0x0000a5a8, 0x3382202d, 0x3382202d, 0x25800a04, 0x25800a04}, 585 - {0x0000a5ac, 0x3884202c, 0x3884202c, 0x28800a20, 0x28800a20}, 586 - {0x0000a5b0, 0x3c86202c, 0x3c86202c, 0x2c800e20, 0x2c800e20}, 587 - {0x0000a5b4, 0x4188202d, 0x4188202d, 0x30800e22, 0x30800e22}, 588 - {0x0000a5b8, 0x4586402d, 0x4586402d, 0x34800e24, 0x34800e24}, 589 - {0x0000a5bc, 0x4986222d, 0x4986222d, 0x38801640, 0x38801640}, 590 - {0x0000a5c0, 0x4d862231, 0x4d862231, 0x3c801660, 0x3c801660}, 591 - {0x0000a5c4, 0x50882231, 0x50882231, 0x3f801861, 0x3f801861}, 592 - {0x0000a5c8, 0x5688422e, 0x5688422e, 0x43801a81, 0x43801a81}, 593 - {0x0000a5cc, 0x5a88442e, 0x5a88442e, 0x47801a83, 0x47801a83}, 594 - {0x0000a5d0, 0x5e8a4431, 0x5e8a4431, 0x4a801c84, 0x4a801c84}, 595 - {0x0000a5d4, 0x648a4432, 0x648a4432, 0x4e801ce3, 0x4e801ce3}, 596 - {0x0000a5d8, 0x688a4434, 0x688a4434, 0x52801ce5, 0x52801ce5}, 597 - {0x0000a5dc, 0x6c8a6434, 0x6c8a6434, 0x56801ce9, 0x56801ce9}, 598 - {0x0000a5e0, 0x6f8a6633, 0x6f8a6633, 0x5a801ceb, 0x5a801ceb}, 599 - {0x0000a5e4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 600 - {0x0000a5e8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 601 - {0x0000a5ec, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 602 - {0x0000a5f0, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 603 - {0x0000a5f4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 604 - {0x0000a5f8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 605 - {0x0000a5fc, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec}, 578 + {0x0000a590, 0x16800220, 0x16800220, 0x0f800202, 0x0f800202}, 579 + {0x0000a594, 0x1c800223, 0x1c800223, 0x12800400, 0x12800400}, 580 + {0x0000a598, 0x21802220, 0x21802220, 0x16800402, 0x16800402}, 581 + {0x0000a59c, 0x27802223, 0x27802223, 0x19800404, 0x19800404}, 582 + {0x0000a5a0, 0x2b822220, 0x2b822220, 0x1c800603, 0x1c800603}, 583 + {0x0000a5a4, 0x2f822222, 0x2f822222, 0x21800a02, 0x21800a02}, 584 + {0x0000a5a8, 0x34822225, 0x34822225, 0x25800a04, 0x25800a04}, 585 + {0x0000a5ac, 0x3a82222a, 0x3a82222a, 0x28800a20, 0x28800a20}, 586 + {0x0000a5b0, 0x3e82222c, 0x3e82222c, 0x2c800e20, 0x2c800e20}, 587 + {0x0000a5b4, 0x4282242a, 0x4282242a, 0x30800e22, 0x30800e22}, 588 + {0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24}, 589 + {0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640}, 590 + {0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660}, 591 + {0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861}, 592 + {0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81}, 593 + {0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83}, 594 + {0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84}, 595 + {0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3}, 596 + {0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5}, 597 + {0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9}, 598 + {0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb}, 599 + {0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 600 + {0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 601 + {0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 602 + {0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 603 + {0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 604 + {0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 605 + {0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 606 606 {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 607 607 {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 608 - {0x0000a608, 0x01804601, 0x01804601, 0x00000000, 0x00000000}, 609 - {0x0000a60c, 0x01804601, 0x01804601, 0x00000000, 0x00000000}, 610 - {0x0000a610, 0x01804601, 0x01804601, 0x00000000, 0x00000000}, 611 - {0x0000a614, 0x01804601, 0x01804601, 0x01404000, 0x01404000}, 612 - {0x0000a618, 0x01804601, 0x01804601, 0x01404501, 0x01404501}, 613 - {0x0000a61c, 0x01804601, 0x01804601, 0x02008501, 0x02008501}, 614 - {0x0000a620, 0x03408d02, 0x03408d02, 0x0280ca03, 0x0280ca03}, 615 - {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04}, 616 - {0x0000a628, 0x03410d04, 0x03410d04, 0x04014c04, 0x04014c04}, 617 - {0x0000a62c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005}, 618 - {0x0000a630, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005}, 619 - {0x0000a634, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005}, 620 - {0x0000a638, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005}, 621 - {0x0000a63c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005}, 622 - {0x0000b2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352}, 623 - {0x0000b2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584}, 624 - {0x0000b2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800}, 608 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 609 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 610 + {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 611 + {0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000}, 612 + {0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501}, 613 + {0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501}, 614 + {0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03}, 615 + {0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04}, 616 + {0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04}, 617 + {0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 618 + {0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 619 + {0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 620 + {0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 621 + {0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 622 + {0x0000b2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, 623 + {0x0000b2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, 624 + {0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800}, 625 625 {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, 626 - {0x0000c2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352}, 627 - {0x0000c2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584}, 628 - {0x0000c2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800}, 626 + {0x0000c2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, 627 + {0x0000c2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, 628 + {0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800}, 629 629 {0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, 630 630 {0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4}, 631 - {0x00016048, 0x61200001, 0x61200001, 0x66480001, 0x66480001}, 631 + {0x00016048, 0x66480001, 0x66480001, 0x66480001, 0x66480001}, 632 632 {0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, 633 633 {0x00016444, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4}, 634 - {0x00016448, 0x61200001, 0x61200001, 0x66480001, 0x66480001}, 634 + {0x00016448, 0x66480001, 0x66480001, 0x66480001, 0x66480001}, 635 635 {0x00016468, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, 636 636 {0x00016844, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4}, 637 - {0x00016848, 0x61200001, 0x61200001, 0x66480001, 0x66480001}, 637 + {0x00016848, 0x66480001, 0x66480001, 0x66480001, 0x66480001}, 638 638 {0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, 639 639 }; 640 640
+1
drivers/net/wireless/ath/ath9k/hif_usb.c
··· 38 38 { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ 39 39 { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ 40 40 { USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */ 41 + { USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */ 41 42 { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */ 42 43 43 44 { USB_DEVICE(0x0cf3, 0x7015),
+4
drivers/net/wireless/b43/main.c
··· 5404 5404 cancel_work_sync(&wldev->restart_work); 5405 5405 5406 5406 B43_WARN_ON(!wl); 5407 + if (!wldev->fw.ucode.data) 5408 + return; /* NULL if firmware never loaded */ 5407 5409 if (wl->current_dev == wldev && wl->hw_registred) { 5408 5410 b43_leds_stop(wldev); 5409 5411 ieee80211_unregister_hw(wl->hw); ··· 5480 5478 cancel_work_sync(&wldev->restart_work); 5481 5479 5482 5480 B43_WARN_ON(!wl); 5481 + if (!wldev->fw.ucode.data) 5482 + return; /* NULL if firmware never loaded */ 5483 5483 if (wl->current_dev == wldev && wl->hw_registred) { 5484 5484 b43_leds_stop(wldev); 5485 5485 ieee80211_unregister_hw(wl->hw);
+1 -1
drivers/net/wireless/brcm80211/brcmfmac/usb.c
··· 1339 1339 } 1340 1340 1341 1341 ret = brcmf_bus_start(dev); 1342 - if (ret == -ENOLINK) { 1342 + if (ret) { 1343 1343 brcmf_dbg(ERROR, "dongle is not responding\n"); 1344 1344 brcmf_detach(dev); 1345 1345 goto fail;
+25 -45
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
··· 3569 3569 3570 3570 if (!request || !request->n_ssids || !request->n_match_sets) { 3571 3571 WL_ERR("Invalid sched scan req!! n_ssids:%d\n", 3572 - request->n_ssids); 3572 + request ? request->n_ssids : 0); 3573 3573 return -EINVAL; 3574 3574 } 3575 3575 ··· 3972 3972 u8 *iovar_ie_buf; 3973 3973 u8 *curr_ie_buf; 3974 3974 u8 *mgmt_ie_buf = NULL; 3975 - u32 mgmt_ie_buf_len = 0; 3975 + int mgmt_ie_buf_len; 3976 3976 u32 *mgmt_ie_len = 0; 3977 3977 u32 del_add_ie_buf_len = 0; 3978 3978 u32 total_ie_buf_len = 0; ··· 3982 3982 struct parsed_vndr_ie_info *vndrie_info; 3983 3983 s32 i; 3984 3984 u8 *ptr; 3985 - u32 remained_buf_len; 3985 + int remained_buf_len; 3986 3986 3987 3987 WL_TRACE("bssidx %d, pktflag : 0x%02X\n", bssidx, pktflag); 3988 3988 iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); ··· 4606 4606 struct brcmf_cfg80211_profile *profile = cfg->profile; 4607 4607 struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); 4608 4608 struct wiphy *wiphy = cfg_to_wiphy(cfg); 4609 - struct brcmf_channel_info_le channel_le; 4610 - struct ieee80211_channel *notify_channel; 4609 + struct ieee80211_channel *notify_channel = NULL; 4611 4610 struct ieee80211_supported_band *band; 4611 + struct brcmf_bss_info_le *bi; 4612 4612 u32 freq; 4613 4613 s32 err = 0; 4614 4614 u32 target_channel; 4615 + u8 *buf; 4615 4616 4616 4617 WL_TRACE("Enter\n"); 4617 4618 ··· 4620 4619 memcpy(profile->bssid, e->addr, ETH_ALEN); 4621 4620 brcmf_update_bss_info(cfg); 4622 4621 4623 - brcmf_exec_dcmd(ndev, BRCMF_C_GET_CHANNEL, &channel_le, 4624 - sizeof(channel_le)); 4622 + buf = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL); 4623 + if (buf == NULL) { 4624 + err = -ENOMEM; 4625 + goto done; 4626 + } 4625 4627 4626 - target_channel = le32_to_cpu(channel_le.target_channel); 4627 - WL_CONN("Roamed to channel %d\n", target_channel); 4628 + /* data sent to dongle has to be little endian */ 4629 + *(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX); 4630 + err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX); 4631 + 4632 + if (err) 4633 + goto done; 4634 + 4635 + bi = (struct brcmf_bss_info_le *)(buf + 4); 4636 + target_channel = bi->ctl_ch ? bi->ctl_ch : 4637 + CHSPEC_CHANNEL(le16_to_cpu(bi->chanspec)); 4628 4638 4629 4639 if (target_channel <= CH_MAX_2G_CHANNEL) 4630 4640 band = wiphy->bands[IEEE80211_BAND_2GHZ]; ··· 4645 4633 freq = ieee80211_channel_to_frequency(target_channel, band->band); 4646 4634 notify_channel = ieee80211_get_channel(wiphy, freq); 4647 4635 4636 + done: 4637 + kfree(buf); 4648 4638 cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid, 4649 4639 conn_info->req_ie, conn_info->req_ie_len, 4650 4640 conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL); ··· 5200 5186 schedule_work(&cfg->event_work); 5201 5187 } 5202 5188 5203 - static s32 brcmf_dongle_mode(struct net_device *ndev, s32 iftype) 5204 - { 5205 - s32 infra = 0; 5206 - s32 err = 0; 5207 - 5208 - switch (iftype) { 5209 - case NL80211_IFTYPE_MONITOR: 5210 - case NL80211_IFTYPE_WDS: 5211 - WL_ERR("type (%d) : currently we do not support this mode\n", 5212 - iftype); 5213 - err = -EINVAL; 5214 - return err; 5215 - case NL80211_IFTYPE_ADHOC: 5216 - infra = 0; 5217 - break; 5218 - case NL80211_IFTYPE_STATION: 5219 - infra = 1; 5220 - break; 5221 - case NL80211_IFTYPE_AP: 5222 - infra = 1; 5223 - break; 5224 - default: 5225 - err = -EINVAL; 5226 - WL_ERR("invalid type (%d)\n", iftype); 5227 - return err; 5228 - } 5229 - err = brcmf_exec_dcmd_u32(ndev, BRCMF_C_SET_INFRA, &infra); 5230 - if (err) { 5231 - WL_ERR("WLC_SET_INFRA error (%d)\n", err); 5232 - return err; 5233 - } 5234 - 5235 - return 0; 5236 - } 5237 - 5238 5189 static s32 brcmf_dongle_eventmsg(struct net_device *ndev) 5239 5190 { 5240 5191 /* Room for "event_msgs" + '\0' + bitvec */ ··· 5418 5439 WL_BEACON_TIMEOUT); 5419 5440 if (err) 5420 5441 goto default_conf_out; 5421 - err = brcmf_dongle_mode(ndev, wdev->iftype); 5442 + err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype, 5443 + NULL, NULL); 5422 5444 if (err && err != -EINPROGRESS) 5423 5445 goto default_conf_out; 5424 5446 err = brcmf_dongle_probecap(cfg);
+1 -1
drivers/net/wireless/ipw2x00/ipw2200.c
··· 10472 10472 } else 10473 10473 len = src->len; 10474 10474 10475 - dst = alloc_skb(len + sizeof(*rt_hdr), GFP_ATOMIC); 10475 + dst = alloc_skb(len + sizeof(*rt_hdr) + sizeof(u16)*2, GFP_ATOMIC); 10476 10476 if (!dst) 10477 10477 continue; 10478 10478
+24 -15
drivers/net/wireless/iwlwifi/dvm/devices.c
··· 518 518 * See iwlagn_mac_channel_switch. 519 519 */ 520 520 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; 521 - struct iwl6000_channel_switch_cmd cmd; 521 + struct iwl6000_channel_switch_cmd *cmd; 522 522 u32 switch_time_in_usec, ucode_switch_time; 523 523 u16 ch; 524 524 u32 tsf_low; ··· 527 527 struct ieee80211_vif *vif = ctx->vif; 528 528 struct iwl_host_cmd hcmd = { 529 529 .id = REPLY_CHANNEL_SWITCH, 530 - .len = { sizeof(cmd), }, 530 + .len = { sizeof(*cmd), }, 531 531 .flags = CMD_SYNC, 532 - .data = { &cmd, }, 532 + .dataflags[0] = IWL_HCMD_DFL_NOCOPY, 533 533 }; 534 + int err; 534 535 535 - cmd.band = priv->band == IEEE80211_BAND_2GHZ; 536 + cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); 537 + if (!cmd) 538 + return -ENOMEM; 539 + 540 + hcmd.data[0] = cmd; 541 + 542 + cmd->band = priv->band == IEEE80211_BAND_2GHZ; 536 543 ch = ch_switch->channel->hw_value; 537 544 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", 538 545 ctx->active.channel, ch); 539 - cmd.channel = cpu_to_le16(ch); 540 - cmd.rxon_flags = ctx->staging.flags; 541 - cmd.rxon_filter_flags = ctx->staging.filter_flags; 546 + cmd->channel = cpu_to_le16(ch); 547 + cmd->rxon_flags = ctx->staging.flags; 548 + cmd->rxon_filter_flags = ctx->staging.filter_flags; 542 549 switch_count = ch_switch->count; 543 550 tsf_low = ch_switch->timestamp & 0x0ffffffff; 544 551 /* ··· 561 554 switch_count = 0; 562 555 } 563 556 if (switch_count <= 1) 564 - cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); 557 + cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time); 565 558 else { 566 559 switch_time_in_usec = 567 560 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; 568 561 ucode_switch_time = iwl_usecs_to_beacons(priv, 569 562 switch_time_in_usec, 570 563 beacon_interval); 571 - cmd.switch_time = iwl_add_beacon_time(priv, 572 - priv->ucode_beacon_time, 573 - ucode_switch_time, 574 - beacon_interval); 564 + cmd->switch_time = iwl_add_beacon_time(priv, 565 + priv->ucode_beacon_time, 566 + ucode_switch_time, 567 + beacon_interval); 575 568 } 576 569 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", 577 - cmd.switch_time); 578 - cmd.expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR; 570 + cmd->switch_time); 571 + cmd->expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR; 579 572 580 - return iwl_dvm_send_cmd(priv, &hcmd); 573 + err = iwl_dvm_send_cmd(priv, &hcmd); 574 + kfree(cmd); 575 + return err; 581 576 } 582 577 583 578 struct iwl_lib_ops iwl6000_lib = {
+5 -2
drivers/net/wireless/mwifiex/cfg80211.c
··· 1825 1825 return -EBUSY; 1826 1826 } 1827 1827 1828 - priv->scan_request = request; 1829 - 1830 1828 priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), 1831 1829 GFP_KERNEL); 1832 1830 if (!priv->user_scan_cfg) { 1833 1831 dev_err(priv->adapter->dev, "failed to alloc scan_req\n"); 1834 1832 return -ENOMEM; 1835 1833 } 1834 + 1835 + priv->scan_request = request; 1836 1836 1837 1837 priv->user_scan_cfg->num_ssids = request->n_ssids; 1838 1838 priv->user_scan_cfg->ssid_list = request->ssids; ··· 1870 1870 ret = mwifiex_scan_networks(priv, priv->user_scan_cfg); 1871 1871 if (ret) { 1872 1872 dev_err(priv->adapter->dev, "scan failed: %d\n", ret); 1873 + priv->scan_request = NULL; 1874 + kfree(priv->user_scan_cfg); 1875 + priv->user_scan_cfg = NULL; 1873 1876 return ret; 1874 1877 } 1875 1878
+5 -8
drivers/net/wireless/mwifiex/scan.c
··· 1843 1843 struct cfg80211_ssid *req_ssid) 1844 1844 { 1845 1845 struct mwifiex_adapter *adapter = priv->adapter; 1846 - int ret = 0; 1846 + int ret; 1847 1847 struct mwifiex_user_scan_cfg *scan_cfg; 1848 1848 1849 - if (!req_ssid) 1850 - return -1; 1851 - 1852 1849 if (adapter->scan_processing) { 1853 - dev_dbg(adapter->dev, "cmd: Scan already in process...\n"); 1854 - return ret; 1850 + dev_err(adapter->dev, "cmd: Scan already in process...\n"); 1851 + return -EBUSY; 1855 1852 } 1856 1853 1857 1854 if (priv->scan_block) { 1858 - dev_dbg(adapter->dev, 1855 + dev_err(adapter->dev, 1859 1856 "cmd: Scan is blocked during association...\n"); 1860 - return ret; 1857 + return -EBUSY; 1861 1858 } 1862 1859 1863 1860 scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), GFP_KERNEL);
+1
drivers/net/wireless/rt2x00/rt2500usb.c
··· 1988 1988 .disconnect = rt2x00usb_disconnect, 1989 1989 .suspend = rt2x00usb_suspend, 1990 1990 .resume = rt2x00usb_resume, 1991 + .reset_resume = rt2x00usb_resume, 1991 1992 .disable_hub_initiated_lpm = 1, 1992 1993 }; 1993 1994
+1
drivers/net/wireless/rt2x00/rt2800usb.c
··· 1282 1282 .disconnect = rt2x00usb_disconnect, 1283 1283 .suspend = rt2x00usb_suspend, 1284 1284 .resume = rt2x00usb_resume, 1285 + .reset_resume = rt2x00usb_resume, 1285 1286 .disable_hub_initiated_lpm = 1, 1286 1287 }; 1287 1288
+1
drivers/net/wireless/rt2x00/rt73usb.c
··· 2535 2535 .disconnect = rt2x00usb_disconnect, 2536 2536 .suspend = rt2x00usb_suspend, 2537 2537 .resume = rt2x00usb_resume, 2538 + .reset_resume = rt2x00usb_resume, 2538 2539 .disable_hub_initiated_lpm = 1, 2539 2540 }; 2540 2541
+1 -1
drivers/net/wireless/rtlwifi/usb.c
··· 673 673 set_hal_start(rtlhal); 674 674 675 675 /* Start bulk IN */ 676 - _rtl_usb_receive(hw); 676 + err = _rtl_usb_receive(hw); 677 677 } 678 678 679 679 return err;
+2 -1
drivers/vhost/net.c
··· 379 379 .hdr.gso_type = VIRTIO_NET_HDR_GSO_NONE 380 380 }; 381 381 size_t total_len = 0; 382 - int err, headcount, mergeable; 382 + int err, mergeable; 383 + s16 headcount; 383 384 size_t vhost_hlen, sock_hlen; 384 385 size_t vhost_len, sock_len; 385 386 /* TODO: check that we are running from vhost_worker? */
+2 -1
include/linux/tcp.h
··· 191 191 u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ 192 192 early_retrans_delayed:1, /* Delayed ER timer installed */ 193 193 syn_data:1, /* SYN includes data */ 194 - syn_fastopen:1; /* SYN includes Fast Open option */ 194 + syn_fastopen:1, /* SYN includes Fast Open option */ 195 + syn_data_acked:1;/* data in SYN is acked by SYN-ACK */ 195 196 196 197 /* RTT measurement */ 197 198 u32 srtt; /* smoothed round trip time << 3 */
+1
include/net/cfg80211.h
··· 1218 1218 const u8 *ie; 1219 1219 size_t ie_len; 1220 1220 u16 reason_code; 1221 + bool local_state_change; 1221 1222 }; 1222 1223 1223 1224 /**
+1
include/uapi/linux/tcp.h
··· 130 130 #define TCPI_OPT_WSCALE 4 131 131 #define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */ 132 132 #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ 133 + #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ 133 134 134 135 enum tcp_ca_state { 135 136 TCP_CA_Open = 0,
+3 -1
net/8021q/vlan.c
··· 463 463 464 464 case NETDEV_PRE_TYPE_CHANGE: 465 465 /* Forbid underlaying device to change its type. */ 466 - return NOTIFY_BAD; 466 + if (vlan_uses_dev(dev)) 467 + return NOTIFY_BAD; 468 + break; 467 469 468 470 case NETDEV_NOTIFY_PEERS: 469 471 case NETDEV_BONDING_FAILOVER:
+18 -9
net/batman-adv/bridge_loop_avoidance.c
··· 1167 1167 uint16_t crc; 1168 1168 unsigned long entrytime; 1169 1169 1170 + spin_lock_init(&bat_priv->bla.bcast_duplist_lock); 1171 + 1170 1172 batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla hash registering\n"); 1171 1173 1172 1174 /* setting claim destination address */ ··· 1212 1210 /** 1213 1211 * batadv_bla_check_bcast_duplist 1214 1212 * @bat_priv: the bat priv with all the soft interface information 1215 - * @bcast_packet: originator mac address 1216 - * @hdr_size: maximum length of the frame 1213 + * @bcast_packet: encapsulated broadcast frame plus batman header 1214 + * @bcast_packet_len: length of encapsulated broadcast frame plus batman header 1217 1215 * 1218 1216 * check if it is on our broadcast list. Another gateway might 1219 1217 * have sent the same packet because it is connected to the same backbone, ··· 1226 1224 */ 1227 1225 int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv, 1228 1226 struct batadv_bcast_packet *bcast_packet, 1229 - int hdr_size) 1227 + int bcast_packet_len) 1230 1228 { 1231 - int i, length, curr; 1229 + int i, length, curr, ret = 0; 1232 1230 uint8_t *content; 1233 1231 uint16_t crc; 1234 1232 struct batadv_bcast_duplist_entry *entry; 1235 1233 1236 - length = hdr_size - sizeof(*bcast_packet); 1234 + length = bcast_packet_len - sizeof(*bcast_packet); 1237 1235 content = (uint8_t *)bcast_packet; 1238 1236 content += sizeof(*bcast_packet); 1239 1237 1240 1238 /* calculate the crc ... */ 1241 1239 crc = crc16(0, content, length); 1240 + 1241 + spin_lock_bh(&bat_priv->bla.bcast_duplist_lock); 1242 1242 1243 1243 for (i = 0; i < BATADV_DUPLIST_SIZE; i++) { 1244 1244 curr = (bat_priv->bla.bcast_duplist_curr + i); ··· 1263 1259 /* this entry seems to match: same crc, not too old, 1264 1260 * and from another gw. therefore return 1 to forbid it. 1265 1261 */ 1266 - return 1; 1262 + ret = 1; 1263 + goto out; 1267 1264 } 1268 - /* not found, add a new entry (overwrite the oldest entry) */ 1265 + /* not found, add a new entry (overwrite the oldest entry) 1266 + * and allow it, its the first occurence. 1267 + */ 1269 1268 curr = (bat_priv->bla.bcast_duplist_curr + BATADV_DUPLIST_SIZE - 1); 1270 1269 curr %= BATADV_DUPLIST_SIZE; 1271 1270 entry = &bat_priv->bla.bcast_duplist[curr]; ··· 1277 1270 memcpy(entry->orig, bcast_packet->orig, ETH_ALEN); 1278 1271 bat_priv->bla.bcast_duplist_curr = curr; 1279 1272 1280 - /* allow it, its the first occurence. */ 1281 - return 0; 1273 + out: 1274 + spin_unlock_bh(&bat_priv->bla.bcast_duplist_lock); 1275 + 1276 + return ret; 1282 1277 } 1283 1278 1284 1279
+7 -1
net/batman-adv/routing.c
··· 1124 1124 1125 1125 spin_unlock_bh(&orig_node->bcast_seqno_lock); 1126 1126 1127 + /* keep skb linear for crc calculation */ 1128 + if (skb_linearize(skb) < 0) 1129 + goto out; 1130 + 1131 + bcast_packet = (struct batadv_bcast_packet *)skb->data; 1132 + 1127 1133 /* check whether this has been sent by another originator before */ 1128 - if (batadv_bla_check_bcast_duplist(bat_priv, bcast_packet, hdr_size)) 1134 + if (batadv_bla_check_bcast_duplist(bat_priv, bcast_packet, skb->len)) 1129 1135 goto out; 1130 1136 1131 1137 /* rebroadcast packet */
+2
net/batman-adv/types.h
··· 205 205 struct batadv_hashtable *backbone_hash; 206 206 struct batadv_bcast_duplist_entry bcast_duplist[BATADV_DUPLIST_SIZE]; 207 207 int bcast_duplist_curr; 208 + /* protects bcast_duplist and bcast_duplist_curr */ 209 + spinlock_t bcast_duplist_lock; 208 210 struct batadv_bla_claim_dst claim_dest; 209 211 struct delayed_work work; 210 212 };
+4 -2
net/bluetooth/smp.c
··· 32 32 33 33 #define SMP_TIMEOUT msecs_to_jiffies(30000) 34 34 35 + #define AUTH_REQ_MASK 0x07 36 + 35 37 static inline void swap128(u8 src[16], u8 dst[16]) 36 38 { 37 39 int i; ··· 232 230 req->max_key_size = SMP_MAX_ENC_KEY_SIZE; 233 231 req->init_key_dist = 0; 234 232 req->resp_key_dist = dist_keys; 235 - req->auth_req = authreq; 233 + req->auth_req = (authreq & AUTH_REQ_MASK); 236 234 return; 237 235 } 238 236 ··· 241 239 rsp->max_key_size = SMP_MAX_ENC_KEY_SIZE; 242 240 rsp->init_key_dist = 0; 243 241 rsp->resp_key_dist = req->resp_key_dist & dist_keys; 244 - rsp->auth_req = authreq; 242 + rsp->auth_req = (authreq & AUTH_REQ_MASK); 245 243 } 246 244 247 245 static u8 check_enc_key_size(struct l2cap_conn *conn, __u8 max_key_size)
+4 -2
net/core/skbuff.c
··· 3379 3379 3380 3380 void kfree_skb_partial(struct sk_buff *skb, bool head_stolen) 3381 3381 { 3382 - if (head_stolen) 3382 + if (head_stolen) { 3383 + skb_release_head_state(skb); 3383 3384 kmem_cache_free(skbuff_head_cache, skb); 3384 - else 3385 + } else { 3385 3386 __kfree_skb(skb); 3387 + } 3386 3388 } 3387 3389 EXPORT_SYMBOL(kfree_skb_partial); 3388 3390
+6 -3
net/ipv4/route.c
··· 1163 1163 spin_lock_bh(&fnhe_lock); 1164 1164 1165 1165 if (daddr == fnhe->fnhe_daddr) { 1166 - struct rtable *orig; 1167 - 1166 + struct rtable *orig = rcu_dereference(fnhe->fnhe_rth); 1167 + if (orig && rt_is_expired(orig)) { 1168 + fnhe->fnhe_gw = 0; 1169 + fnhe->fnhe_pmtu = 0; 1170 + fnhe->fnhe_expires = 0; 1171 + } 1168 1172 if (fnhe->fnhe_pmtu) { 1169 1173 unsigned long expires = fnhe->fnhe_expires; 1170 1174 unsigned long diff = expires - jiffies; ··· 1185 1181 } else if (!rt->rt_gateway) 1186 1182 rt->rt_gateway = daddr; 1187 1183 1188 - orig = rcu_dereference(fnhe->fnhe_rth); 1189 1184 rcu_assign_pointer(fnhe->fnhe_rth, rt); 1190 1185 if (orig) 1191 1186 rt_free(orig);
+5 -5
net/ipv4/tcp.c
··· 549 549 !tp->urg_data || 550 550 before(tp->urg_seq, tp->copied_seq) || 551 551 !before(tp->urg_seq, tp->rcv_nxt)) { 552 - struct sk_buff *skb; 553 552 554 553 answ = tp->rcv_nxt - tp->copied_seq; 555 554 556 - /* Subtract 1, if FIN is in queue. */ 557 - skb = skb_peek_tail(&sk->sk_receive_queue); 558 - if (answ && skb) 559 - answ -= tcp_hdr(skb)->fin; 555 + /* Subtract 1, if FIN was received */ 556 + if (answ && sock_flag(sk, SOCK_DONE)) 557 + answ--; 560 558 } else 561 559 answ = tp->urg_seq - tp->copied_seq; 562 560 release_sock(sk); ··· 2764 2766 info->tcpi_options |= TCPI_OPT_ECN; 2765 2767 if (tp->ecn_flags & TCP_ECN_SEEN) 2766 2768 info->tcpi_options |= TCPI_OPT_ECN_SEEN; 2769 + if (tp->syn_data_acked) 2770 + info->tcpi_options |= TCPI_OPT_SYN_DATA; 2767 2771 2768 2772 info->tcpi_rto = jiffies_to_usecs(icsk->icsk_rto); 2769 2773 info->tcpi_ato = jiffies_to_usecs(icsk->icsk_ack.ato);
+11 -2
net/ipv4/tcp_input.c
··· 5646 5646 tcp_rearm_rto(sk); 5647 5647 return true; 5648 5648 } 5649 + tp->syn_data_acked = tp->syn_data; 5649 5650 return false; 5650 5651 } 5651 5652 ··· 5964 5963 5965 5964 req = tp->fastopen_rsk; 5966 5965 if (req != NULL) { 5967 - BUG_ON(sk->sk_state != TCP_SYN_RECV && 5966 + WARN_ON_ONCE(sk->sk_state != TCP_SYN_RECV && 5968 5967 sk->sk_state != TCP_FIN_WAIT1); 5969 5968 5970 5969 if (tcp_check_req(sk, skb, req, NULL, true) == NULL) ··· 6053 6052 * ACK we have received, this would have acknowledged 6054 6053 * our SYNACK so stop the SYNACK timer. 6055 6054 */ 6056 - if (acceptable && req != NULL) { 6055 + if (req != NULL) { 6056 + /* Return RST if ack_seq is invalid. 6057 + * Note that RFC793 only says to generate a 6058 + * DUPACK for it but for TCP Fast Open it seems 6059 + * better to treat this case like TCP_SYN_RECV 6060 + * above. 6061 + */ 6062 + if (!acceptable) 6063 + return 1; 6057 6064 /* We no longer need the request sock. */ 6058 6065 reqsk_fastopen_remove(sk, req, false); 6059 6066 tcp_rearm_rto(sk);
+1
net/ipv4/tcp_ipv4.c
··· 1461 1461 skb_set_owner_r(skb, child); 1462 1462 __skb_queue_tail(&child->sk_receive_queue, skb); 1463 1463 tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq; 1464 + tp->syn_data_acked = 1; 1464 1465 } 1465 1466 sk->sk_data_ready(sk, 0); 1466 1467 bh_unlock_sock(child);
+1
net/ipv4/tcp_minisocks.c
··· 510 510 newtp->rx_opt.mss_clamp = req->mss; 511 511 TCP_ECN_openreq_child(newtp, req); 512 512 newtp->fastopen_rsk = NULL; 513 + newtp->syn_data_acked = 0; 513 514 514 515 TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_PASSIVEOPENS); 515 516 }
+2 -2
net/ipv4/tcp_timer.c
··· 347 347 return; 348 348 } 349 349 if (tp->fastopen_rsk) { 350 - BUG_ON(sk->sk_state != TCP_SYN_RECV && 351 - sk->sk_state != TCP_FIN_WAIT1); 350 + WARN_ON_ONCE(sk->sk_state != TCP_SYN_RECV && 351 + sk->sk_state != TCP_FIN_WAIT1); 352 352 tcp_fastopen_synack_timer(sk); 353 353 /* Before we receive ACK to our SYN-ACK don't retransmit 354 354 * anything else (e.g., data or FIN segments).
+2 -2
net/ipv6/route.c
··· 219 219 }; 220 220 221 221 static const u32 ip6_template_metrics[RTAX_MAX] = { 222 - [RTAX_HOPLIMIT - 1] = 255, 222 + [RTAX_HOPLIMIT - 1] = 0, 223 223 }; 224 224 225 225 static const struct rt6_info ip6_null_entry_template = { ··· 1232 1232 rt->rt6i_dst.addr = fl6->daddr; 1233 1233 rt->rt6i_dst.plen = 128; 1234 1234 rt->rt6i_idev = idev; 1235 - dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255); 1235 + dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 0); 1236 1236 1237 1237 spin_lock_bh(&icmp6_dst_lock); 1238 1238 rt->dst.next = icmp6_dst_gc_list;
+1 -1
net/mac80211/iface.c
··· 853 853 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 854 854 if (info->control.vif == &sdata->vif) { 855 855 __skb_unlink(skb, &local->pending[i]); 856 - dev_kfree_skb_irq(skb); 856 + ieee80211_free_txskb(&local->hw, skb); 857 857 } 858 858 } 859 859 }
+23 -12
net/mac80211/mlme.c
··· 3099 3099 ht_cfreq, ht_oper->primary_chan, 3100 3100 cbss->channel->band); 3101 3101 ht_oper = NULL; 3102 + } else { 3103 + channel_type = NL80211_CHAN_HT20; 3102 3104 } 3103 3105 } 3104 3106 3105 - if (ht_oper) { 3106 - channel_type = NL80211_CHAN_HT20; 3107 + if (ht_oper && sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) { 3108 + /* 3109 + * cfg80211 already verified that the channel itself can 3110 + * be used, but it didn't check that we can do the right 3111 + * HT type, so do that here as well. If HT40 isn't allowed 3112 + * on this channel, disable 40 MHz operation. 3113 + */ 3107 3114 3108 - if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) { 3109 - switch (ht_oper->ht_param & 3110 - IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { 3111 - case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: 3115 + switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { 3116 + case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: 3117 + if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40PLUS) 3118 + ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ; 3119 + else 3112 3120 channel_type = NL80211_CHAN_HT40PLUS; 3113 - break; 3114 - case IEEE80211_HT_PARAM_CHA_SEC_BELOW: 3121 + break; 3122 + case IEEE80211_HT_PARAM_CHA_SEC_BELOW: 3123 + if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40MINUS) 3124 + ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ; 3125 + else 3115 3126 channel_type = NL80211_CHAN_HT40MINUS; 3116 - break; 3117 - } 3127 + break; 3118 3128 } 3119 3129 } 3120 3130 ··· 3559 3549 { 3560 3550 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 3561 3551 u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; 3552 + bool tx = !req->local_state_change; 3562 3553 3563 3554 mutex_lock(&ifmgd->mtx); 3564 3555 ··· 3576 3565 if (ifmgd->associated && 3577 3566 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { 3578 3567 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, 3579 - req->reason_code, true, frame_buf); 3568 + req->reason_code, tx, frame_buf); 3580 3569 } else { 3581 3570 drv_mgd_prepare_tx(sdata->local, sdata); 3582 3571 ieee80211_send_deauth_disassoc(sdata, req->bssid, 3583 3572 IEEE80211_STYPE_DEAUTH, 3584 - req->reason_code, true, 3573 + req->reason_code, tx, 3585 3574 frame_buf); 3586 3575 } 3587 3576
+2 -2
net/mac80211/sta_info.c
··· 650 650 */ 651 651 if (!skb) 652 652 break; 653 - dev_kfree_skb(skb); 653 + ieee80211_free_txskb(&local->hw, skb); 654 654 } 655 655 656 656 /* ··· 679 679 local->total_ps_buffered--; 680 680 ps_dbg(sta->sdata, "Buffered frame expired (STA %pM)\n", 681 681 sta->sta.addr); 682 - dev_kfree_skb(skb); 682 + ieee80211_free_txskb(&local->hw, skb); 683 683 } 684 684 685 685 /*
+2 -2
net/mac80211/util.c
··· 406 406 int queue = info->hw_queue; 407 407 408 408 if (WARN_ON(!info->control.vif)) { 409 - kfree_skb(skb); 409 + ieee80211_free_txskb(&local->hw, skb); 410 410 return; 411 411 } 412 412 ··· 431 431 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 432 432 433 433 if (WARN_ON(!info->control.vif)) { 434 - kfree_skb(skb); 434 + ieee80211_free_txskb(&local->hw, skb); 435 435 continue; 436 436 } 437 437
+10 -4
net/mac80211/wpa.c
··· 106 106 if (status->flag & RX_FLAG_MMIC_ERROR) 107 107 goto mic_fail; 108 108 109 - if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key) 109 + if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && 110 + rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) 110 111 goto update_iv; 111 112 112 113 return RX_CONTINUE; ··· 546 545 547 546 static void bip_aad(struct sk_buff *skb, u8 *aad) 548 547 { 548 + __le16 mask_fc; 549 + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 550 + 549 551 /* BIP AAD: FC(masked) || A1 || A2 || A3 */ 550 552 551 553 /* FC type/subtype */ 552 - aad[0] = skb->data[0]; 553 554 /* Mask FC Retry, PwrMgt, MoreData flags to zero */ 554 - aad[1] = skb->data[1] & ~(BIT(4) | BIT(5) | BIT(6)); 555 + mask_fc = hdr->frame_control; 556 + mask_fc &= ~cpu_to_le16(IEEE80211_FCTL_RETRY | IEEE80211_FCTL_PM | 557 + IEEE80211_FCTL_MOREDATA); 558 + put_unaligned(mask_fc, (__le16 *) &aad[0]); 555 559 /* A1 || A2 || A3 */ 556 - memcpy(aad + 2, skb->data + 4, 3 * ETH_ALEN); 560 + memcpy(aad + 2, &hdr->addr1, 3 * ETH_ALEN); 557 561 } 558 562 559 563
+2 -1
net/netfilter/ipvs/ip_vs_ctl.c
··· 2589 2589 struct ip_vs_proto_data *pd; 2590 2590 #endif 2591 2591 2592 + memset(u, 0, sizeof (*u)); 2593 + 2592 2594 #ifdef CONFIG_IP_VS_PROTO_TCP 2593 2595 pd = ip_vs_proto_data_get(net, IPPROTO_TCP); 2594 2596 u->tcp_timeout = pd->timeout_table[IP_VS_TCP_S_ESTABLISHED] / HZ; ··· 2768 2766 { 2769 2767 struct ip_vs_timeout_user t; 2770 2768 2771 - memset(&t, 0, sizeof(t)); 2772 2769 __ip_vs_get_timeouts(net, &t); 2773 2770 if (copy_to_user(user, &t, sizeof(t)) != 0) 2774 2771 ret = -EFAULT;
+6 -4
net/netfilter/xt_CT.c
··· 180 180 typeof(nf_ct_timeout_find_get_hook) timeout_find_get; 181 181 struct ctnl_timeout *timeout; 182 182 struct nf_conn_timeout *timeout_ext; 183 - const struct ipt_entry *e = par->entryinfo; 184 183 struct nf_conntrack_l4proto *l4proto; 185 184 int ret = 0; 185 + u8 proto; 186 186 187 187 rcu_read_lock(); 188 188 timeout_find_get = rcu_dereference(nf_ct_timeout_find_get_hook); ··· 192 192 goto out; 193 193 } 194 194 195 - if (e->ip.invflags & IPT_INV_PROTO) { 195 + proto = xt_ct_find_proto(par); 196 + if (!proto) { 196 197 ret = -EINVAL; 197 - pr_info("You cannot use inversion on L4 protocol\n"); 198 + pr_info("You must specify a L4 protocol, and not use " 199 + "inversions on it.\n"); 198 200 goto out; 199 201 } 200 202 ··· 216 214 /* Make sure the timeout policy matches any existing protocol tracker, 217 215 * otherwise default to generic. 218 216 */ 219 - l4proto = __nf_ct_l4proto_find(par->family, e->ip.proto); 217 + l4proto = __nf_ct_l4proto_find(par->family, proto); 220 218 if (timeout->l4proto->l4proto != l4proto->l4proto) { 221 219 ret = -EINVAL; 222 220 pr_info("Timeout policy `%s' can only be used by L4 protocol "
+1
net/netfilter/xt_TEE.c
··· 70 70 fl4.daddr = info->gw.ip; 71 71 fl4.flowi4_tos = RT_TOS(iph->tos); 72 72 fl4.flowi4_scope = RT_SCOPE_UNIVERSE; 73 + fl4.flowi4_flags = FLOWI_FLAG_KNOWN_NH; 73 74 rt = ip_route_output_key(net, &fl4); 74 75 if (IS_ERR(rt)) 75 76 return false;
+4 -4
net/netfilter/xt_nat.c
··· 111 111 .family = NFPROTO_IPV4, 112 112 .table = "nat", 113 113 .hooks = (1 << NF_INET_POST_ROUTING) | 114 - (1 << NF_INET_LOCAL_OUT), 114 + (1 << NF_INET_LOCAL_IN), 115 115 .me = THIS_MODULE, 116 116 }, 117 117 { ··· 123 123 .family = NFPROTO_IPV4, 124 124 .table = "nat", 125 125 .hooks = (1 << NF_INET_PRE_ROUTING) | 126 - (1 << NF_INET_LOCAL_IN), 126 + (1 << NF_INET_LOCAL_OUT), 127 127 .me = THIS_MODULE, 128 128 }, 129 129 { ··· 133 133 .targetsize = sizeof(struct nf_nat_range), 134 134 .table = "nat", 135 135 .hooks = (1 << NF_INET_POST_ROUTING) | 136 - (1 << NF_INET_LOCAL_OUT), 136 + (1 << NF_INET_LOCAL_IN), 137 137 .me = THIS_MODULE, 138 138 }, 139 139 { ··· 143 143 .targetsize = sizeof(struct nf_nat_range), 144 144 .table = "nat", 145 145 .hooks = (1 << NF_INET_PRE_ROUTING) | 146 - (1 << NF_INET_LOCAL_IN), 146 + (1 << NF_INET_LOCAL_OUT), 147 147 .me = THIS_MODULE, 148 148 }, 149 149 };
+15 -4
net/netlink/af_netlink.c
··· 138 138 static DEFINE_RWLOCK(nl_table_lock); 139 139 static atomic_t nl_table_users = ATOMIC_INIT(0); 140 140 141 + #define nl_deref_protected(X) rcu_dereference_protected(X, lockdep_is_held(&nl_table_lock)); 142 + 141 143 static ATOMIC_NOTIFIER_HEAD(netlink_chain); 142 144 143 145 static inline u32 netlink_group_mask(u32 group) ··· 347 345 struct hlist_node *node; 348 346 unsigned long mask; 349 347 unsigned int i; 348 + struct listeners *listeners; 349 + 350 + listeners = nl_deref_protected(tbl->listeners); 351 + if (!listeners) 352 + return; 350 353 351 354 for (i = 0; i < NLGRPLONGS(tbl->groups); i++) { 352 355 mask = 0; ··· 359 352 if (i < NLGRPLONGS(nlk_sk(sk)->ngroups)) 360 353 mask |= nlk_sk(sk)->groups[i]; 361 354 } 362 - tbl->listeners->masks[i] = mask; 355 + listeners->masks[i] = mask; 363 356 } 364 357 /* this function is only called with the netlink table "grabbed", which 365 358 * makes sure updates are visible before bind or setsockopt return. */ ··· 543 536 if (netlink_is_kernel(sk)) { 544 537 BUG_ON(nl_table[sk->sk_protocol].registered == 0); 545 538 if (--nl_table[sk->sk_protocol].registered == 0) { 546 - kfree(nl_table[sk->sk_protocol].listeners); 539 + struct listeners *old; 540 + 541 + old = nl_deref_protected(nl_table[sk->sk_protocol].listeners); 542 + RCU_INIT_POINTER(nl_table[sk->sk_protocol].listeners, NULL); 543 + kfree_rcu(old, rcu); 547 544 nl_table[sk->sk_protocol].module = NULL; 548 545 nl_table[sk->sk_protocol].bind = NULL; 549 546 nl_table[sk->sk_protocol].flags = 0; ··· 993 982 rcu_read_lock(); 994 983 listeners = rcu_dereference(nl_table[sk->sk_protocol].listeners); 995 984 996 - if (group - 1 < nl_table[sk->sk_protocol].groups) 985 + if (listeners && group - 1 < nl_table[sk->sk_protocol].groups) 997 986 res = test_bit(group - 1, listeners->masks); 998 987 999 988 rcu_read_unlock(); ··· 1636 1625 new = kzalloc(sizeof(*new) + NLGRPSZ(groups), GFP_ATOMIC); 1637 1626 if (!new) 1638 1627 return -ENOMEM; 1639 - old = rcu_dereference_protected(tbl->listeners, 1); 1628 + old = nl_deref_protected(tbl->listeners); 1640 1629 memcpy(new->masks, old->masks, NLGRPSZ(tbl->groups)); 1641 1630 rcu_assign_pointer(tbl->listeners, new); 1642 1631
+3 -9
net/wireless/mlme.c
··· 457 457 .reason_code = reason, 458 458 .ie = ie, 459 459 .ie_len = ie_len, 460 + .local_state_change = local_state_change, 460 461 }; 461 462 462 463 ASSERT_WDEV_LOCK(wdev); 463 464 464 - if (local_state_change) { 465 - if (wdev->current_bss && 466 - ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) { 467 - cfg80211_unhold_bss(wdev->current_bss); 468 - cfg80211_put_bss(&wdev->current_bss->pub); 469 - wdev->current_bss = NULL; 470 - } 471 - 465 + if (local_state_change && (!wdev->current_bss || 466 + !ether_addr_equal(wdev->current_bss->pub.bssid, bssid))) 472 467 return 0; 473 - } 474 468 475 469 return rdev->ops->deauth(&rdev->wiphy, dev, &req); 476 470 }