aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2013-08-15ath9k: Fix RX crypto processingSujith Manoharan1-8/+4
The keymiss events are valid only in the last descriptor of a packet. Fix this by making sure that we return early in case of chained descriptors. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Discard invalid frames earlySujith Manoharan1-16/+22
Frames with invalid or zero length can be discarded early, there is no need to check the crypto bits. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix phy error handling for DFSSujith Manoharan1-2/+1
Since the DFS code appears to process the phy errors ATH9K_PHYERR_RADAR and ATH9K_PHYERR_FALSE_RADAR_EXT, check for the correct phyerr status in the main RX tasklet routine. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Use a subroutine to check for "mybeacon"Sujith Manoharan1-13/+23
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k_htc: do not use bulk on EP3 and EP4Oleksij Rempel1-27/+11
If usb auto suspend is enabled or system run in to suspend/resume cycle, ath9k-htc adapter will stop to response. It is reproducible on xhci HCs. Host part of problem: XHCI do timing calculation based on Transfer Type and bInterval, immediately after device was detected. Ath9k-htc try to overwrite this parameters on module probe and some changes in FW, since we do not initiate usb reset from the driver this changes are not took to account. So, before any kind of suspend or reset, host controller will operate with old parameters. Only after suspend/resume and if interface id stay unchanged, new parameters will by applied. Host will send bulk data with no intervals (?), which will cause overflow on FIFO of EP4. Firmware part of problem: By default, ath9k-htc adapters configured with EP3 and EP4 as interrupt endpoints. Current firmware will try to overwrite ConfigDescriptor to make EP3 and EP4 bulk. FIFO for this endpoints stay not reconfigured, so under the hood it is still Int EP. This patch is revert of 4a0e8ecca4ee commit which trying to reduce CPU usage on some systems. Since it will produce more bug as fixes, we will need to find other way to fix it. here is comment from kernel source which has some more explanation: * Some buggy high speed devices have bulk endpoints using * maxpacket sizes other than 512. High speed HCDs may not * be able to handle that particular bug, so let's warn... in our case EP3 and EP4 have maxpacket sizes = 64!!! Signed-off-by: Oleksij Rempel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15wil6210: let IP stack re-check HW TCP/UDP csum errorsVladimir Kondratiev1-6/+6
Fix for TCP iperf from Windows to Linux stall after about 1sec Hardware reports false errors in some situations: Microsoft IP stack, in violation of RFC 1624, set TCP checksum that should be 0x0 as 0xffff. hardware report Rx csum error. If HW csum absolutely trusted, this frame can be never received, as re-transmitted one will have same csum problem. In addition, it mess up block ack reorder buffer, as if packet dropped, it is not score boarded there. Signed-off-by: Vladimir Kondratiev <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: reset buffer stale flag in ath_tx_get_tid_subframeFelix Fietkau1-0/+2
If that flag stays set for a buffer that already ran through the tx path once, it might cause issues in tx completion processing. Better clear it early to ensure that this does not happen Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: simplify ath_tid_drainFelix Fietkau1-12/+0
ath_tid_drain is only called when a station entry is being removed, so there is no point in still tracking BAW state. Remove some unnecessary code and a bogus TODO comment related to this. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: avoid accessing MRC registers on single-chain devicesFelix Fietkau1-0/+4
They are not implemented, and accessing them might trigger errors Cc: [email protected] Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: simplify debugfs chainmask handlingFelix Fietkau1-88/+4
Writing to that file is unnecessary and quirky, the antenna API should be used instead. Use debugfs_create_u8 to allow reading the values. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: remove ath9k_sta_remove_debugfsFelix Fietkau4-20/+1
mac80211 uses debugfs_remove_recursive, so there's no need for the driver to do an explicit cleanup of its sta debugfs entry. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: shrink a few data structures by reordering fieldsFelix Fietkau2-14/+14
Also reduce the size of a few fields where possible Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: fix rx descriptor related race conditionFelix Fietkau2-8/+14
Similar to a race condition that exists in the tx path, the hardware might re-read the 'next' pointer of a descriptor of the last completed frame. This only affects non-EDMA (pre-AR93xx) devices. To deal with this race, defer clearing and re-linking a completed rx descriptor until the next one has been processed. Cc: [email protected] Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: use configurable sdio bus header length for tx packetFranky Lin1-14/+16
Host tx glomming require an extended hardware sdio bus header to store information for dongle. Introduce a variable in struct brcmf_sdio to replace macro SDPCM_HDRLEN Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Arend van Spriel <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: streamline sdio bus header codeFranky Lin1-123/+120
Streamlining sdio bus specific header related code as preparation for host tx glomming Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: remove align from brcmf_bus structureFranky Lin3-11/+17
remove align from brcmf_bus since it is only used by sdio bus layer internally Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Arend van Spriel <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: abstract tx packet processing functionsFranky Lin3-78/+177
Abstract brcmf_sdio_txpkt_prep and brcmf_sdio_txpkt_postp as a preparation of chained tx packets for host side tx glomming. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Arend van Spriel <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: add support for manual TDLS operationsArend van Spriel2-1/+77
Implement the .tdls_oper() callback and indicate TDLS support in the wiphy flags. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: ignore IF event if firmware indicates itArend van Spriel2-0/+6
Not every IF event from the firmware needs to result in a related interface, netdev or wdev, on the host. This is indicated in the event message. Handle that flag and effectively ignore the firmware event. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: no fws locking outside fws module.Hante Meuleman2-66/+62
FWS uses locking to protect its data while being called from various entries. On bus_txdata the lock was kept resulting in unnecessary long locking, but also creating possibility for deadlock. This update changes the locking to release lock when bus_txdata is called. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: always use worker thread for tx data.Hante Meuleman3-56/+54
When fw signalling is disabled tx is sent immediately. Using queues and worker thread allows usb to do synchronous autopm. This patch makes fws use queues and worker thread even if signalling is not supported by FW or not enabled. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: add AMPDU reordering functionalityArend van Spriel3-27/+283
This feature moves the responsibility of collecting all MPDUs in an AMPDU session in the correct order from the firmware to the host driver. This reduces buffer requirement on the firmware side. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: .txdata() bus callback should not call brcmf_txcomplete()Arend van Spriel3-3/+5
With firmware-signalling the packet handed to the bus specific driver layer should not be discarded with brcmf_txcomplete() in the failure path. Instead only an error is returned and the caller decides what to do with the packet. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15brcmfmac: use irq safe spinlock in brcmf_sdbrcm_txdata()Arend van Spriel2-3/+8
Firmware-signalling needs transmit to firmware to be atomic and uses a spinlock with irq disabled. Therefor, brcmf_sdbrcm_txdata() should not use spin_unlock_bh() as it would enable the interrupts. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville11-43/+270
2013-08-15drivers/net/ethernet/via/via-velocity.c: update napi implementationJulia Lawall1-1/+3
Drivers supporting NAPI should use a NAPI-specific function for receiving packets. Hence netif_rx is changed to netif_receive_skb. Furthermore netif_napi_del should be used in the probe and remove function to clean up the NAPI resource information. Thanks to Francois Romieu, David Shwatrz and Rami Rosen for their help on this patch. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-15net/usb/r8152: enable interrupt transferhayeswang1-27/+113
Use the interrupt transfer to replace polling link status. Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-15net/usb/r8152: enable tx checksumhayeswang1-5/+59
Enable tx checksum. Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-15net/usb/r8152: support aggregationhayeswang1-161/+486
Enable the tx/rx aggregation which could contain one or more packets for each bulk in/out. This could reduce the loading of the host controller by sending less bulk transfer. The rx packets in the bulk in buffer should be 8-byte aligned, and the tx packets in the bulk out buffer should be 4-byte aligned. Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-15Revert "cxgb3: Check and handle the dma mapping errors"Alexey Kardashevskiy1-83/+24
This reverts commit f83331bab149e29fa2c49cf102c0cd8c3f1ce9f9. As the tests PPC64 (powernv platform) show, IOMMU pages are leaking when transferring big amount of small packets (<=64 bytes), "ping -f" and waiting for 15 seconds is the simplest way to confirm the bug. Cc: Linus Torvalds <[email protected]> Cc: Santosh Rastapur <[email protected]> Cc: Jay Fenlason <[email protected]> Cc: David S. Miller <[email protected]> Cc: Divy Le ray <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> Acked-by: Divy Le Ray <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-15be2net: Clear any capability flags that driver is not interested in.Sarveshwar Bandi2-0/+9
It is possible for some versions of firmware to advertise capabilities that driver is not ready to handle. This may lead to controller stall. Since the driver is interested only in subset of flags, clearing the rest. Signed-off-by: Sarveshwar Bandi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13tun: compare with 0 instead of total_lenWeiping Pan1-2/+2
Since we set "len = total_len" in the beginning of tun_get_user(), so we should compare the new len with 0, instead of total_len, or the if statement always returns false. Signed-off-by: Weiping Pan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13ethernet/arc/arc_emac - fix NAPI "work > weight" warningAlexey Brodkin1-1/+1
Initially I improperly set a boundary for maximum number of input packets to process on NAPI poll ("work") so it might be more than expected amount ("weight"). This was really harmless but seeing WARN_ON_ONCE on every device boot is not nice. So trivial fix ("<" instead of "<=") is here. Signed-off-by: Alexey Brodkin <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Mischa Jonker <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2013-08-13bnx2x: prevent crash in shutdown flow with CNICYuval Mintz1-2/+1
There might be a crash as during shutdown flow CNIC might try to access resources already freed by bnx2x. Change bnx2x_close() into dev_close() in __bnx2x_remove (shutdown flow) to guarantee CNIC is notified of the device's change of status. Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13bnx2x: fix PTE write access errorBarak Witkowsky3-0/+15
PTE write access error might occur in MF_ALLOWED mode when IOMMU is active. The patch adds rmmod HSI indicating to MFW to stop running queries which might trigger this failure. Signed-off-by: Barak Witkowsky <[email protected]> Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13bnx2x: fix memory leak in VFAriel Elior1-1/+1
Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13bnx2x: update fairness parameters following DCB negotiationDmitry Kravkov3-12/+24
ETS can be enabled as a result of DCB negotiation, then fairness must be recalculated after each negotiation. Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13bnx2x: protect different statistics flowsDmitry Kravkov3-12/+57
Add locking to protect different statistics flows from running simultaneously. This in order to serialize statistics requests sent to FW, otherwise two outstanding queries may cause FW assert. Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Acked-by: Neal Cardwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13Merge branch 'for-davem' of ↵David S. Miller144-2877/+6611
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== This is a batch of updates intended for 3.12. It is mostly driver stuff, although Johannes Berg and Simon Wunderlich make a good showing with mac80211 bits (particularly some work on 5/10 MHz channel support). The usual suspects are mostly represented. There are lots of updates to iwlwifi, ath9k, ath10k, mwifiex, rt2x00, wil6210, as usual. The bcma bus gets some love this time, as do cw1200, iwl4965, and a few other bits here and there. I don't think there is much unusual here, FWIW. ==================== Signed-off-by: David S. Miller <[email protected]>
2013-08-13drivers: net: cpsw: Add support for new CPSW IP version present in AM43xx SoCMugunthan V N1-0/+3
The new IP version which is present in AM43xx SoC has a minor changes and the offsets are same as the previous version, so adding new IP version support in the driver. Signed-off-by: Mugunthan V N <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13gianfar: Add flow control supportClaudiu Manoil3-3/+132
eTSEC has Rx and Tx flow control capabilities that may be enabled through MACCFG1[Rx_Flow, Tx_Flow] bits. These bits must not be set however when eTSEC is operated in Half-Duplex mode. Unfortunately, the driver currently sets these bits unconditionally. This patch adds the proper handling of the PAUSE frame capability register bits by implementing the ethtool -A interface. When pause autoneg is enabled, the controller uses the phy's capability to negotiate PAUSE frame settings with the link partner and reconfigures its Rx_Flow and Tx_Flow settings to match the capabilities of the link partner. If pause autoneg is off, the PAUSE frame generation may be forced manually (ethtool -A). Flow control is disabled by default now. This implementation is inspired by the tg3 driver. Signed-off-by: Lutz Jaenicke <[email protected]> Signed-off-by: Claudiu Manoil <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13pptp: fix byte order warningsstephen hemminger1-5/+5
Pptp driver has lots of byte order warnings from sparse. This was because the on-the-wire header is in network byte order (obviously) but the definition did not reflect that. Also, the address structure to user space actually put the call id in host order. Rather than break ABI compatibility, just acknowledge the existing design. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13skge: dma_sync the whole receive bufferstephen hemminger1-2/+4
The DMA sync should sync the whole receive buffer, not just part of it. Fixes log messages dma_sync_check. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13net: asix: Move declaration of ax88172a_info to shared headerMark Brown2-2/+2
Ensure that the definition of ax88172a_info matches the declaration seen by users and silence sparse warnings about symbols without declarations in the global namespace by moving the declaration into the shared header asix.h. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13net: asix: Staticise non-exported symbolsMark Brown1-3/+5
Make functions that are only referenced from ops structures static, they do not need to be in the global namespace and sparse complains about this. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-13mlx4_core: Fix XRC QPs detection in the resource trackerYishai Hadas1-1/+2
Recognize XRC QPs in the SR-IOV resource tracker based on transport type. The previous check didn't match IB_QPT_XRC_INI and caused an invalid calculation for required mtt pages. Signed-off-by: Yishai Hadas <[email protected]> Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2013-08-12stmmac: fix init_dma_desc_rings() to handle errorsBartlomiej Zolnierkiewicz1-19/+92
In stmmac_init_rx_buffers(): * add missing handling of dma_map_single() error * remove superfluous unlikely() optimization while at it Add stmmac_free_rx_buffers() helper and use it in dma_free_rx_skbufs(). In init_dma_desc_rings(): * add missing handling of kmalloc_array() errors * fix handling of dma_alloc_coherent() and stmmac_init_rx_buffers() errors * make function return an error value on error and 0 on success In stmmac_open(): * add handling of init_dma_desc_rings() return value Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-12bnx2x: Use pci_wait_for_pending_transaction() instead of for loopCasey Leedom1-16/+2
New routine has been added to avoid duplication of code to wait for pending PCI transactions to complete. This makes use of that routine. Signed-off-by: Casey Leedom <[email protected]> Signed-off-by: Vipul Pandya <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Acked-by: David S. Miller <[email protected]>
2013-08-12cxgb4: Add CLIP support to store compressed IPv6 addressVipul Pandya3-0/+241
The Compressed LIP region is used to hold a limited number of Local IPv6 addresses. This region is primarily used to reduce the TCAM space consumed for an IPv6 offloaded connection. A 128-bit LIP will be reduced to 13-bit and stored in the TCAM if there is a match between the IPv6 tuple's LIP and the one stored in the CLIP region. Signed-off-by: Vipul Pandya <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2013-08-12cxgb4: Add routines to create and remove listening IPv6 serversVipul Pandya3-2/+91
Add cxgb4_create_server6 and cxgb4_remove_server routines to create and remove listening IPv6 servers. Return success (0) from cxgb4_create_server in case of ctrl queue congestion since in case of congestion, passive open request gets queued and gets processed later. If a non-zero value were returned it would be treated as an error and the ULD would free STID, which can result in an error in passive open reply. Add cpl structure for active open request with IPv6 address for T5. Signed-off-by: Vipul Pandya <[email protected]> Signed-off-by: Roland Dreier <[email protected]>