aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ath9k.h
Commit message (Collapse)AuthorAge
* ath9k: Process GTT interruptsSujith Manoharan2014-01-13
| | | | | | | | | | | | | | | | | Global Transmission Timeout interrupts are generated by the HW when transmission of a frame fails - this is done based on the threshold programmed in the AR_GTXTO register. Currently, even though the interrupt is enabled for all chips, it is not handled in the driver. This patch handles GTT events for AR9003 and above chips, checking if the MAC/BB has hung after successive GTT interrupts crosses a threshold (5). This can be enabled for the older chips in the AR9002 family once appropriate HW hang checks are implemented for them. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a debugfs file "node_recv"Sujith Manoharan2014-01-13
| | | | | | | This would be useful when debugging RX performance issues. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove RX PollSujith Manoharan2014-01-03
| | | | | | | | | | | | This patch removes the convoluted and hacky method of monitoring for connectivity. We rely on mac80211's connection loss logic and doing it in the driver is not necessary. The HW check for MAC/BB hangs is also simplified, there is no need to have a separate work instance for it. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: call ath9k_set_tsfadjust from ath9k_beacon_configFelix Fietkau2013-12-19
| | | | | | | Make that function and ath9k_allow_beacon_config static Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Cleanup ath9k.hSujith Manoharan2013-12-18
| | | | | | | | * Remove unused macros. * Move definitions to appropriate sections. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Cleanup spectral scan codeSujith Manoharan2013-12-18
| | | | | | | | * Move definitions to spectral.h * Move processing/debug code to spectral.c Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: use a software timer for btcoex no_stomp_timerFelix Fietkau2013-12-18
| | | | | | | | TSF accuracy is not needed here, and there is only one usable generic timer that is supported by all chips and uses the primary TSF counter. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: optimize ath9k_flushFelix Fietkau2013-12-02
| | | | | | | | | Instead of checking the queues in a loop with hardcoded sleep times inbetween, use a wait queue to trigger queue checks after the tx processing tasklet has run. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use a timer to put hardware into full sleepFelix Fietkau2013-12-02
| | | | | | | | | | | | When operating in client mode, the short period of time between scanning and associating is often enough to put the hardware through several FULL-SLEEP <-> AWAKE transitions, each wakeup requiring a reset to fully recover the hardware. This is completely unnecessary and can easily be avoided by deferring the switch to full sleep. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add an initialization routine for WoWSujith Manoharan2013-12-02
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Use CONFIG_ATH9K_WOWSujith Manoharan2013-12-02
| | | | | | | | Move the WoW code to wow.c and compile it conditionally based on CONFIG_ATH9K_WOW. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix TX99 config option usageSujith Manoharan2013-12-02
| | | | | | | | | | | | | | Use CONFIG_ATH9K_TX99 to properly enclose the tx99 code and make sure that it is not compiled as part of the driver when it is not selected. Move the tx99 code to a new file tx99.c and also add ATH9K_DEBUGFS as a dependency in Kconfig. This reduces the module size on platforms like OpenWrt where ATH9K_DEBUGFS is selected, but TX99 might be disabled. Cc: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Identify Killer Wireless cardsSujith Manoharan2013-12-02
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Use correct PCIE initvals for AR9485Sujith Manoharan2013-11-11
| | | | | | | | | | | | | | | | | Currently, the PLL is turned off for AR9485 when switching to a low power state, but AR9485 has an issue where the card will become unresponsive if left idle for a long time without any traffic. To fix this, force the PLL to always be on using a different initval array, ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1. This is done for most of the AR9485 based cards like HB125, WB225 etc. but certain models require the feature to be turned off. Identify such cards and use default values for them. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2013-11-04
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
| * ath9k: add TX99 supportLuis R. Rodriguez2013-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TX99 support enables Specific Absorption Rate (SAR) testing. SAR is the unit of measurement for the amount of radio frequency(RF) absorbed by the body when using a wireless device. The RF exposure limits used are expressed in the terms of SAR, which is a measure of the electric and magnetic field strength and power density for transmitters operating at frequencies from 300 kHz to 100 GHz. Regulatory bodies around the world require that wireless device be evaluated to meet the RF exposure limits set forth in the governmental SAR regulations. In the examples below, for more bit rate options see the iw TX bitrate setting documentation: http://wireless.kernel.org/en/users/Documentation/iw#Modifying_transmit_bitrates Example usage: iw phy phy0 interface add moni0 type monitor ip link set dev moni0 up iw dev moni0 set channel 36 HT40+ iw set bitrates mcs-5 4 echo 10 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99_power echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: add HT40 spectral scan capabilityLorenzo Bianconi2013-10-18
| | | | | | | | | | | | | | | | | | | | Add spectral scan feature on HT40 channels for ath9k. This patch extends previous capability added by Simon Wunderlich Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Reviewed-by: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> Tested-by: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2013-10-17
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * ath9k: make ath9k_uses_beacons staticFelix Fietkau2013-10-14
| | | | | | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: remove sc->config.cabqReadyTimeFelix Fietkau2013-10-14
| | | | | | | | | | | | | | It is not exposed as a configuration option anyway Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: use a separate data structure for rx buffersFelix Fietkau2013-10-14
| | | | | | | | | | | | | | | | | | | | There's no shared code for handling both rx and tx buffers, and tx buffers require a lot more metadata than rx buffers. Using a separate data structure for rx reduces memory usage and improves cache footprint. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-nextDavid S. Miller2013-10-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h drivers/net/wireless/rtlwifi/rtl8188ee/phy.h drivers/net/wireless/rtlwifi/rtl8192ce/phy.h drivers/net/wireless/rtlwifi/rtl8192de/phy.h drivers/net/wireless/rtlwifi/rtl8723ae/phy.h Just some minor conflicts between the wireless-next changes and Joe Perches's "extern" removal from function prototypes in header files. John W. Linville says: ==================== Regarding the Bluetooth bits, Gustavo says: "The big work here is from Marcel and Johan. They did a lot of work in the L2CAP, HCI and MGMT layers. The most important ones are the addition of a new MGMT command to enable/disable LE advertisement and the introduction of the HCI user channel to allow applications to get directly and exclusive access to Bluetooth devices." As to the ath10k bits, Kalle says: "Bartosz dropped support for qca98xx hw1.0 hardware from ath10k, it's just too much to support it. Michal added support for the new firmware interface. Marek fixed WEP in AP and IBSS mode. Rest of the changes are minor fixes or cleanups." And also: "Major changes are: * throughput improvements including aligning the RX frames correctly and optimising HTT layer (Michal) * remove qca98xx hw1.0 support (Bartosz) * add support for firmware version 999.999.0.636 (Michal) * firmware htt statistics support (Kalle) * fix WEP in AP and IBSS mode (Marek) * fix a mutex unlock balance in debugfs file (Shafi) And of course there's a lot of smaller fixes and cleanup." For the wl12xx bits, Luca says: "Here are some patches intended for 3.13. Eliad is upstreaming a bunch of patches that have been pending in the internal tree. Mostly bugfixes and other small improvements." Along with that... Arend and friends bring us a batch of brcmfmac updates, Larry Finger offers some rtlwifi refactoring, and Sujith sends the usual batch of ath9k updates. As usual, there are a number of other small updates from a variety of players as well. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ath9k: replace snprintf() with scnprintf()Zefir Kurtisi2013-09-26
| | | | | | | | | | | | | | | | | | | | | | | | Whenever the return value of snprintf() is used to calculate remaining buffer-space, we wanted to use sncprintf() instead. Indentation is adapted where possible. Some lines exceed the line width limit, either they did it already before, or since they can not be broken reasonably well. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Identify WB335 Antenna configurationSujith Manoharan2013-09-26
| | | | | | | | | | | | | | | | | | There are 2 types of WB335 cards, 1-antenna and 2-antenna. Identify them based on PCI subsystem IDs, this will be used for MCI/BTCOEX tweaks. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Identify CUS252 cardsSujith Manoharan2013-09-26
| | | | | | | | | | | | | | These cards are based on WB335/AR9565. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Add support for AR9565 v1.0.1 LNA diversitySujith Manoharan2013-09-26
| | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath: Remove extern from function prototypesJoe Perches2013-09-24
|/ | | | | | | | | | | | There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com>
* ath9k: Fix ASPM workaround usageSujith Manoharan2013-08-26
| | | | | | | | | | | | | | The PCIE Workaround register (AR_WA/0x4004) is used to handle various hardware quirks. For AR9002 chips, AR_WA_D3_L1_DISABLE is used to prevent the HW from automatically entering L1 state when D3 is enforced. AR_WA_D3_L1_DISABLE has to be enabled for a few AR9280 based cards, mark them based on their PCI subdevice/subvendor IDs and enforce it in ar9002_hw_configpcipowersave(). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: enable CSA functionality in ath9kSimon Wunderlich2013-08-16
| | | | | | | | | | | 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>
* ath9k: remove ath9k_sta_remove_debugfsFelix Fietkau2013-08-15
| | | | | | | | 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 <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: shrink a few data structures by reordering fieldsFelix Fietkau2013-08-15
| | | | | | | Also reduce the size of a few fields where possible Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix rx descriptor related race conditionFelix Fietkau2013-08-15
| | | | | | | | | | | | | 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: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use software queueing for multicast trafficFelix Fietkau2013-08-09
| | | | | | | | | Create a per-vif dummy node entry for keeping the multicast software queues. This helps in setups with a lot of mulitcast traffic that could otherwise potentially drown out unicast traffic to stations. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use software queues for un-aggregated data packetsFelix Fietkau2013-08-09
| | | | | | | | | | | | | | | | | This is a first step for improving fairness between legacy and 802.11n traffic, and it should also improve reliability of resets and channel changes by keeping the hardware queue depth very short. When an aggregation session is torn down, all packets in the retry queue will be removed from the BAW and freed. For all subframes that have not been transmitted yet, the A-MPDU flag will be cleared, and a sequence number allocated. This ensures that the next A-MPDU session will get the correct initial sequence number. This happens both on aggregation session start and stop. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix block ack window tracking checkFelix Fietkau2013-08-09
| | | | | | | | | | When a packet has been tracked as part of the BlockAck window and added to the hardware queue, it can end up back in the TID queue again with fi->retries still set to 0 (e.g. if the frame was filtered). Keep an extra bit for the BAW tracking status to fix this corner case. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: simplify ath_tx_form_aggrFelix Fietkau2013-08-09
| | | | | | | | | The check for ATH_AMPDU_SUBFRAME_DEFAULT is unnecessary, since it's set to half the maximum BlockAck Window size, which is already the maximum value that h_baw could possibly have. Also remove unnecessary variables. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: split tid retry packets into a separate queueFelix Fietkau2013-08-09
| | | | | | | | Improves packet retry order and helps with further tx queueing improvements. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove ath_ant_comb_update()Sujith Manoharan2013-08-05
| | | | | | | | | | | | During a HW reset, the diversity config is programmed in the set_board_values() eeprom callback, there is no need to do it again by calling ath_ant_comb_update(). Fixed antenna support is not fully handled for 1-stream cards, it can be done later. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a HW capability for WLAN/BT RX diversitySujith Manoharan2013-08-05
| | | | | | | | | Make use of this capability to restrict the usage of the debugfs file and modparam using which this feature can be enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix antenna diversity for CUS198Sujith Manoharan2013-08-05
| | | | | | | | | | CUS198/CUS230 need a few tweaks in the antenna diversity algorithm to accomodate RSSI variation. Add a couple of knobs to control low RSSI threshold and fast antenna diversity bias values. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Do a quick scan only when scan_not_start is trueSujith Manoharan2013-08-01
| | | | | | | Right now, it is being done for all cases. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix diversity combining for AR9285Sujith Manoharan2013-07-24
| | | | | | | | | | | | | When antenna diversity combining is enabled in the EEPROM, the initial values for the MAIN/ALT config have to be programmed correctly. This patch adds it for AR9285. Since the diversity combining macros are common to all chip families, remove the redundant AR9285 macros and move the definitions to phy.h. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Enable WoW only for supported modelsSujith Manoharan2013-06-24
| | | | | | | | Since platform support is required for WoW, identify and and enable Wow only for supported cards. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add PCI IDs for CUS217Sujith Manoharan2013-06-18
| | | | | | | CUS217 is a card based on AR9462. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Modify IDs to identify CUS230Sujith Manoharan2013-06-18
| | | | | | | | | | CUS198 and CUS230 are similar cards, both are AR9485 + xLNA solutions. But, the subsystem IDs differ - identify CUS230 explicitly to make things clearer. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add custom parameters for CUS198Sujith Manoharan2013-06-14
| | | | | | | | | | | | | | CUS198 is a card based on AR9485. There are differences between the base reference design HB125 and CUS198. Identify such cards based on the PCI subsystem IDs and set HW parameters appropriately. Addresses this bug - https://bugzilla.kernel.org/show_bug.cgi?id=49201 Cc: jkp@iki.fi Cc: gfmichaud@gmail.com Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: limit multicast buffer hardware queue depthFelix Fietkau2013-06-12
| | | | | | | | | | | The CAB (Content after Beacon) queue is used for beacon-triggered transmission of buffered multicast frames. If lots of multicast frames were buffered and this queue fills up, it drowns out all regular traffic. To limit the damage that buffered traffic can do, try to limit the queued data to becaon_interval / 8. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: implement support for .release_buffered_frames()Felix Fietkau2013-06-12
| | | | | | | | This adds support for PS-Poll and U-APSD driver-buffered frames (part of an aggregation session). Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add support for IEEE80211_TX_CTL_PS_RESPONSEFelix Fietkau2013-06-12
| | | | | | | | Use the UAPSD hardware queue to get PS-Poll responses out as fast as possible and without backoff. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2013-06-12
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/ath/ath9k/Kconfig net/mac80211/iface.c