summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-john' of ↵John W. Linville2013-08-1628-372/+707
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * mac80211: add APIs to allow keeping connections after WoWLANJohannes Berg2013-08-163-8/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to (securely) keep connections alive after the system was suspended for WoWLAN, we need some additional APIs. We already have API (ieee80211_gtk_rekey_notify) to tell wpa_supplicant about the new replay counter if GTK rekeying was done by the device while the host was asleep, but that's not sufficient. If GTK rekeying wasn't done, we need to tell the host about sequence counters for the GTK (and PTK regardless of rekeying) that was used while asleep, add ieee80211_set_key_rx_seq() for that. If GTK rekeying was done, then we need to be able to disable the old keys (with ieee80211_remove_key()) and allocate the new GTK key(s) in mac80211 (with ieee80211_gtk_rekey_add()). If protocol offload (e.g. ARP) is implemented, then also the TX sequence counter for the PTK must be updated, using the new ieee80211_set_key_tx_seq() function. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: move ibss presp generation in own functionSimon Wunderlich2013-08-161-76/+109
| | | | | | | | | | | | | | | | | | | | | | Channel Switch will later require to generate beacons without setting them immediately. Therefore split the presp generation in an own function. Splitting the original very long function might be a good idea anyway. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: perform power save processing before decryptionJohan Almbladh2013-08-161-202/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch decouples the power save processing from the frame decryption by running the decrypt rx handler after sta_process. In the case where the decryption failed for some reason, the stack used to not process the PM and MOREDATA bits for that frame. The stack now always performs power save processing regardless of the decryption result. That means that encrypted data frames and NULLFUNC frames are now handled in the same way regarding power save processing, making the stack more robust. Signed-off-by: Johan Almbladh <ja@anyfi.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * net: rfkill: Do not ignore errors from regulator_enable()Luis Henriques2013-08-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Function regulator_enable() may return an error that has to be checked. This patch changes function rfkill_regulator_set_block() so that it checks for the return code. Also, rfkill_data->reg_enabled is set to 'true' only if there is no error. This fixes the following compilation warning: net/rfkill/rfkill-regulator.c:43:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: ibss - do not scan if not needed when creating an IBSSAntonio Quartulli2013-08-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases mac80211 will scan before creating an IBSS even if bssid and frequency have been forced by the user. This is not needed and leads only to a delay in the IBSS establishment phase. Immediately create the cell if both bssid and frequency (and fixed_freq is set) have been specified. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add vif to testmode cmdDavid Spinadel2013-08-125-6/+19
| | | | | | | | | | | | | | | | Pass the wdev from cfg80211 on to the driver as the vif if given and it's valid for the driver. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: add wdev to testmode cmdDavid Spinadel2013-08-128-18/+41
| | | | | | | | | | | | | | | | | | To allow drivers to implement per-interface testmode operations more easily, pass a wdev pointer if any identification for one was given from userspace. Clean up the code a bit while at it. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add control port protocol TX control flagJohannes Berg2013-08-127-17/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | A lot of drivers check the frame protocol for ETH_P_PAE, for various reasons (like making those more reliable). Add a new flags bitmap to the TX control info and a new flag indicating the control port protocol is in use to let all drivers also apply such logic to other control port protocols, should they be configured. Also use the new flag in the iwlwifi drivers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: clean up CQM settings codeJohannes Berg2013-08-121-27/+24Star
| | | | | | | | | | | | | | | | | | Clean up the CQM settings code a bit and while at it enforce that when setting the threshold to 0 (disable) the hysteresis is also set to 0 to avoid confusion. As we haven't enforce it, simply override userspace. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: fix ieee80211_sta_process_chanswitch for 5/10 MHz channelsSimon Wunderlich2013-08-091-0/+9
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: allow lowest basic rate for unicast management for meshChun-Yeow Yeoh2013-08-091-7/+16
| | | | | | | | | | | | | | | | | | | | | | Allow lowest basic rate to be used for unicast management frame in mesh. Otherwise, the lowest supported rate is used for unicast management frame, such as 1Mbps for 2.4GHz and 6Mbps for 5GHz. Rename the rc_send_low_broadcast to re_send_low_basicrate since now it is also applied to unicast management frame in mesh. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * wireless: make TU conversion macros availableJohannes Berg2013-08-063-8/+6Star
| | | | | | | | | | | | | | | | A few places in the code (mac80211 and iwlmvm) use the same TU_TO_JIFFIES() macro and could use TU_TO_EXP_TIME() that mac80211 has. Make these available to everyone and use them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | rt2x00: rt2800pci: fix AUX_CTRL register setup for RT3090/3390/3593/5592Gabor Juhos2013-08-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The 2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO driver enables PCIe wakeup for these chips as well. Do the same in rt2x00. References: rt28xx_init in common/rtmp_init_intf.c RTMPInitPCIeLinkCtrlValue in os/linux/rt_rbus_pci_drv.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | rt2x00: rt2800lib: introduce rt2800_get_txwi_rxwi_size helperGabor Juhos2013-08-164-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rt2800pci driver uses the same [RT]XWI size for all chipsets, however some chips requires different values. The size of the [RT]XWI structures is a constant value for a given chipset and it does not depend on the underlying interface. Add a helper function which returns the correct values for the actual chipset and use the new helper both in the rt2800usb and in the rt2800pci drivers. This ensures that both drivers are using the correct values. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: enable CSA functionality in ath9kSimon Wunderlich2013-08-165-0/+43
| | | | | | | | | | | | | | | | | | | | | | CSA is only enabled for one interface, but the same limitation applies for mac80211 too. It checks whether the beacon has been sent (different approaches for non-EDMA-enabled and EDMA-enabled devices), and completes the channel switch after that. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: enable support for 5 MHz and 10 MHz channelsSimon Wunderlich2013-08-164-5/+25
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: set 5/10 MHz supported channels and fix durationSimon Wunderlich2013-08-163-9/+42
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: report 5/10 MHz channelsSimon Wunderlich2013-08-161-0/+10
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: announce that ath9k supports 5/10 MHzSimon Wunderlich2013-08-161-0/+1
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: set 5/10 MHz supported channels and fix bitrateSimon Wunderlich2013-08-162-8/+21
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: report 5/10 MHz channelsSimon Wunderlich2013-08-161-0/+11
| | | | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: use chandef instead of channel_typeSimon Wunderlich2013-08-166-40/+51
| | | | | | | | | | | | | | | | | | | | To enable support for 5/10 MHz, some internal functions must be converted from using the (old) channel_type to chandef. This is a good chance to change all remaining occurences. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: always use SIFS times from OFDM for 5/10 MHzSimon Wunderlich2013-08-161-3/+2Star
| | | | | | | | | | | | | | | | | | | | 5/10 MHz channels should always use SIFS times as defined in IEEE 802.11-2012 18.4.4 (OFDM PHY characteristics). This makes it compatible to ath5k, which does the same. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | brcmsmac: Fix WARNING caused by lack of calls to dma_mapping_error()John W. Linville2013-08-151-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver fails to check the results of DMA mapping in twp places, which results in the following warning: [ 28.078515] ------------[ cut here ]------------ [ 28.078529] WARNING: at lib/dma-debug.c:937 check_unmap+0x47e/0x930() [ 28.078533] bcma-pci-bridge 0000:0e:00.0: DMA-API: device driver failed to check map error[device address=0x00000000b5d60d6c] [size=1876 bytes] [mapped as single] [ 28.078536] Modules linked in: bnep bluetooth vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) ipv6 b43 brcmsmac rtl8192cu rtl8192c_common rtlwifi mac802 11 brcmutil cfg80211 snd_hda_codec_conexant rng_core snd_hda_intel kvm_amd snd_hda_codec ssb kvm mmc_core snd_pcm snd_seq snd_timer snd_seq_device snd k8temp cordic joydev serio_raw hwmon sr_mod sg pcmcia pcmcia_core soundcore cdrom i2c_nforce2 i2c_core forcedeth bcma snd_page_alloc autofs4 ext4 jbd2 mbcache crc1 6 scsi_dh_alua scsi_dh_hp_sw scsi_dh_rdac scsi_dh_emc scsi_dh ata_generic pata_amd [ 28.078602] CPU: 1 PID: 2570 Comm: NetworkManager Tainted: G O 3.10.0-rc7-wl+ #42 [ 28.078605] Hardware name: Hewlett-Packard HP Pavilion dv2700 Notebook PC/30D6, BIOS F.27 11/27/2008 [ 28.078607] 0000000000000009 ffff8800bbb03ad8 ffffffff8144f898 ffff8800bbb03b18 [ 28.078612] ffffffff8103e1eb 0000000000000002 ffff8800b719f480 ffff8800b7b9c010 [ 28.078617] ffffffff824204c0 ffffffff81754d57 0000000000000754 ffff8800bbb03b78 [ 28.078622] Call Trace: [ 28.078624] <IRQ> [<ffffffff8144f898>] dump_stack+0x19/0x1b [ 28.078634] [<ffffffff8103e1eb>] warn_slowpath_common+0x6b/0xa0 [ 28.078638] [<ffffffff8103e2c1>] warn_slowpath_fmt+0x41/0x50 [ 28.078650] [<ffffffff8122d7ae>] check_unmap+0x47e/0x930 [ 28.078655] [<ffffffff8122de4c>] debug_dma_unmap_page+0x5c/0x70 [ 28.078679] [<ffffffffa04a808c>] dma64_getnextrxp+0x10c/0x190 [brcmsmac] [ 28.078691] [<ffffffffa04a9042>] dma_rx+0x62/0x240 [brcmsmac] [ 28.078707] [<ffffffffa0479101>] brcms_c_dpc+0x211/0x9d0 [brcmsmac] [ 28.078717] [<ffffffffa046d927>] ? brcms_dpc+0x27/0xf0 [brcmsmac] [ 28.078731] [<ffffffffa046d947>] brcms_dpc+0x47/0xf0 [brcmsmac] [ 28.078736] [<ffffffff81047dcc>] tasklet_action+0x6c/0xf0 --snip-- [ 28.078974] [<ffffffff813891bd>] SyS_sendmsg+0xd/0x20 [ 28.078979] [<ffffffff81455c24>] tracesys+0xdd/0xe2 [ 28.078982] ---[ end trace 6164d1a08148e9c8 ]--- [ 28.078984] Mapped at: [ 28.078985] [<ffffffff8122c8fd>] debug_dma_map_page+0x9d/0x150 [ 28.078989] [<ffffffffa04a9322>] dma_rxfill+0x102/0x3d0 [brcmsmac] [ 28.079001] [<ffffffffa047a13d>] brcms_c_init+0x87d/0x1100 [brcmsmac] [ 28.079010] [<ffffffffa046d851>] brcms_init+0x21/0x30 [brcmsmac] [ 28.079018] [<ffffffffa04786e0>] brcms_c_up+0x150/0x430 [brcmsmac] As the patch adds a new failure mechanism to dma_rxfill(). When I changed the comment at the start of the routine to add that information, I also polished the wording. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Cc: Brett Rudley <brudley@broadcom.com> Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com> Cc: Hante Meuleman <meuleman@broadcom.com> Cc: brcm80211-dev-list@broadcom.com Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | rtlwifi: sparse warnings: cast to restricted typeMark Schulte2013-08-151-8/+8
| | | | | | | | | | | | | | | | | | Adding type casts to suppress sparse warnings: * warning: cast to restricted __le32/__le16 Signed-off-by: Mark Schulte <schultetwin@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Use lockless variant to initialize RX fifoSujith Manoharan2013-08-151-1/+1
| | | | | | | | | | | | | | | | | | Since the rx_fifo queue is accessed only using the various lockless SKB queue routines, there is no need to initialize the lock and __skb_queue_head_init() can be used. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Optimize LNA checkSujith Manoharan2013-08-151-30/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for antenna diversity says: "The decision of diversity is done at 802.11 preamble. So, for 11G/11B, for every MAC packet hardware will do a decision. But in 11N with aggregation, the decision is made only at the preamble and all other MPDUs will use the same LNA as the first MPDU." Make use of rs_firstaggr to avoid needlessly scanning for LNA changes. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Identify first subframe in an A-MPDUSujith Manoharan2013-08-153-2/+5
| | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Handle invalid RSSISujith Manoharan2013-08-151-16/+33
| | | | | | | | | | | | | | | | The combined RSSI can be invalid which is indicated by the value -128. Use RX_FLAG_NO_SIGNAL_VAL for such cases. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Remove unused function argumentSujith Manoharan2013-08-151-2/+1Star
| | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix error condition for corrupt descriptorsSujith Manoharan2013-08-151-10/+18
| | | | | | | | | | | | | | | | | | | | | | In case a descriptor has the "done" bit clear and the next descriptor has it set, we drop both of them. If the packet that is received after these two packets is dropped for some reason, "discard_next" will not cleared. Fix this. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Handle corrupt descriptors properlySujith Manoharan2013-08-151-2/+10
| | | | | | | | | | | | | | | | | | The MIC/PHYERR/CRC error bits are valid only for the last desc. for chained packets. Check this early in the preprocess() routine and bail out. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Move the RX poll check to preprocess()Sujith Manoharan2013-08-151-4/+4
| | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix RX beacon processingSujith Manoharan2013-08-151-26/+22Star
| | | | | | | | | | | | | | | | Make sure that chained descriptors are handled correctly before the packet is parsed to determine if it is a beacon. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix RX packet counterSujith Manoharan2013-08-151-4/+7
| | | | | | | | | | | | | | | | | | Handle chained descriptors and increment the RX counter only for valid packets. Since this is used only by MCI, use CONFIG_ATH9K_BTCOEX_SUPPORT. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix RX debug statisticsSujith Manoharan2013-08-151-2/+1Star
| | | | | | | | | | | | | | | | | | The various error bits that ath_debug_stat_rx() checks are valid only for the last descriptor for a chained packet, handle this correctly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix PHY error processingSujith Manoharan2013-08-151-11/+12
| | | | | | | | | | | | | | | | Parse the PHY error details only for the last fragment in case descriptors are chained. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Reorder some functionsSujith Manoharan2013-08-151-110/+110
| | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix TSF processingSujith Manoharan2013-08-151-13/+20
| | | | | | | | | | | | | | | | | | There is no need to calculate the mactime for chained descriptor packets, so make sure that this is done only for the last fragment of valid packets. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix RX crypto processingSujith Manoharan2013-08-151-8/+4Star
| | | | | | | | | | | | | | | | | | 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 <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Discard invalid frames earlySujith Manoharan2013-08-151-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 <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix phy error handling for DFSSujith Manoharan2013-08-151-2/+1Star
| | | | | | | | | | | | | | | | | | | | 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 <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Use a subroutine to check for "mybeacon"Sujith Manoharan2013-08-151-13/+23
| | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: do not use bulk on EP3 and EP4Oleksij Rempel2013-08-151-27/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wil6210: let IP stack re-check HW TCP/UDP csum errorsVladimir Kondratiev2013-08-151-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 <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: reset buffer stale flag in ath_tx_get_tid_subframeFelix Fietkau2013-08-151-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 <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: simplify ath_tid_drainFelix Fietkau2013-08-151-12/+0Star
| | | | | | | | | | | | | | | | | | 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 <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: avoid accessing MRC registers on single-chain devicesFelix Fietkau2013-08-151-0/+4
| | | | | | | | | | | | | | | | They are not implemented, and accessing them might trigger errors Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: simplify debugfs chainmask handlingFelix Fietkau2013-08-151-88/+4Star
| | | | | | | | | | | | | | | | 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 <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>