summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/btcoex.c
AgeCommit message (Collapse)Author
2016-03-11ath9k: fix BTCoex configuration for SOC chipsMiaoqing Pan
Allow to set wl_active_time and wl_qc_time for SOC chips, also adjust bt_time_extend and bt_first_slot_time. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-11ath9k: fix BTCoex access invalid registers for SOC chipsMiaoqing Pan
The registers of AR_GPIO_INPUT_MUX1 and AR_GPIO_PDPU were removed from SOC chips, fix invalid accessing Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-11ath9k: Allow platform override BTCoex pinMiaoqing Pan
Add new platform data to allow override BTCoex default pin. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-11ath9k: free GPIO resource for SOC GPIOsMiaoqing Pan
For SOC GPIOs, should call ath9k_hw_gpio_free() to release the GPIO resource. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-11ath9k: make GPIO API to support both of WMAC and SOCMiaoqing Pan
commit 61b559dea40e ("ath9k: add extra GPIO led support") added ath9k to support access SOC's GPIOs, but implemented in a separated API: ath9k_hw_request_gpio(). So this patch make the APIs more common, to support both of WMAC and SOC GPIOs. The new APIs as below, void ath9k_hw_gpio_request_in(); void ath9k_hw_gpio_request_out(); void ath9k_hw_gpio_free(); NOTE, the BSP of the SOC chips(AR9340, AR9531, AR9550, AR9561) should set the corresponding MUX registers correctly. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-03ath9k: Fix wlan-active gpio for the AR9003 familySujith Manoharan
When disabling BTCOEX, clearing the wlanactive gpio line is required only for pre-AR9003 cards. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03ath9k: Fix MCI scheme initializationSujith Manoharan
Commit "ath9k_hw: remove ATH_BTCOEX_CFG_MCI" removed MCI as a separate coex scheme, but we need it to avoid fiddling with GPIO registers during ath9k_init_btcoex() that are meant only for 3-wire cards. Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2013-12-18ath9k_hw: clean up generic timer codeFelix Fietkau
- Use generic bitops instead of custom hackery - Move interrupt enable/disable logic from ath9k to ath9k_hw - Decouple ISR call from btcoex - Make the overflow callback optional (to prevent IRQ storms) Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: stomp audio profiles on weak signal strengthRajkumar Manoharan
On lower WLAN signal strength, WLAN downlink traffic might suffer from retransmissions. At the mean time, playing SCO/A2DP profiles is affecting WLAN stability. In such scenario, by stomping SCO/A2DP BT traffic completely for a BTCOEX period, gives WLAN traffic an oppertunity to recover PHY rate. It also improves WLAN stability at lower RSSI without sacificing BT traffic. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-29ath9k_hw: Set default MCI config for AR9565Rajkumar Manoharan
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-29ath9k: Add concurrent WLAN and BT tx support for MCI based chipsRajkumar Manoharan
This feature enables both WLAN and BT can transmit simultaneously by setting WLAN and BT to equal priorities. Whenever both are transmitting, it might violate regulatory power limits. To avoid regulatory violation, WLAN tx power will be adjusted according to BT power index based on avaliability of BT scheduling message. If the combined power exceeds threshold, BT transmission will be held off. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-28ath9k: Fix BTCOEX weight initializationSujith Manoharan
The WLAN/BT weights have to set correctly before BTCOEX is initialized. Currently, this is not done for all chips in the AR9003 family. This patch fixes this issue by setting the weights in the init path. While at it, rename ar9462_wlan_weights to mci_wlan_weights since it is common to both AR9462 and AR9565. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-28ath9k: Enable MCI for AR9565Bala Shanmugam
Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: improve BT FTP/PAN performanceRajkumar Manoharan
When BT FTP/PAN transmits while WLAN is idle, the one of 9462 chain often picks up BT's tx signal and starts receiving. If the current weight is set to be higher than BT tx, BT tx will be aborted and this also degrades BT performance. Hence lower WLAN rx priority in this case only when there are no WLAN traffic. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-23ath9k_hw: remove ATH_BTCOEX_CFG_MCIRajkumar Manoharan
AR9462 uses modified version of 3-Wire hw scheme for btcoex. MCI itself is not a separate hw scheme but it aids to manage multiple bt profiles. In ar9462, bt priority traffic is identified by the number of bt profile types instead of gpio. So that this patch removes MCI hw scheme. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27ath9k: Remove ATH_BTCOEX_CFG_NONE checksSujith Manoharan
Since BTCOEX code can be compiled out cleanly now, remove these checks. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27ath9k: Initialize BTCOEX scheme using a helperSujith Manoharan
Setting up the required scheme can be done as part of the BTCOEX initialization path and it doesn't belong in ath9k_hw_fill_cap_info() anyway. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27ath9k: Initialize MCI params using a helperSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19ath9k_hw: make bluetooth coexistence support optional at compile timeFelix Fietkau
Many systems (e.g. embedded systems) do not have wifi modules connected to bluetooth modules, so bluetooth coexistence is irrelevant there. With the addition of MCI support, ath9k picked up quite a bit of extra code that can be compiled out this way. This patch redefines ATH9K_HW_CAP_MCI and adds an inline wrapper for querying the bluetooth coexistence scheme, allowing the compiler to eliminate code that uses it, with only very little use of #ifdef. On MIPS this reduces the total size for the modules by about 20k. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOOJoe Perches
Add ATH_DBG_ to macros to shorten the uses and reduce the line count. Coalesce ath_dbg formats. Add missing spaces to coalesced formats. Add missing newline terminations to ath_dbg formats. Align ath_dbg arguments where appropriate. Standardize ath_dbg formats without periods. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-30ath9k: fix a typoMohammed Shafi Shajakhan
Cc: Wilson Tsao <wtsao@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-22Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Conflicts: drivers/net/wireless/iwlegacy/iwl-debugfs.c drivers/net/wireless/iwlegacy/iwl-rx.c drivers/net/wireless/iwlegacy/iwl-scan.c drivers/net/wireless/iwlegacy/iwl-tx.c include/net/bluetooth/bluetooth.h
2011-11-17ath9k_hw: set btcoex weights for AR9462Rajkumar Manoharan
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17ath9k_hw: Cleanup btcoex wlan weightsRajkumar Manoharan
Remove all wlan weight macros and group it together for better understanding & readability. It makes the code reusable for AR9462 wlan weights. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17ath9k: Remove enabling btcoex from stomp type changeRajkumar Manoharan
This patch removes btcoex_enable from stomp type change and let it be called from callee functions that makes the code can be reusable for MCI changes. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-31drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker
These were getting the macros from an implicit module.h include via device.h, but we are planning to clean that up. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: Add export.h to wireless/brcm80211/brcmfmac/bcmsdh.c This relatively recently added file uses EXPORT_SYMBOL and hence needs export.h included so that it is compatible with the module.h split up work. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-07-18ath9k: Fix some smatch warningsRajkumar Manoharan
drivers/net/wireless/ath/ath9k/hif_usb.c +135 hif_usb_mgmt_cb(6) warn: variable dereferenced before check 'cmd' drivers/net/wireless/ath/ath9k/btcoex.c +77 ath9k_hw_init_btcoex_hw(38) error: buffer overflow 'ah->hw_gen_timers.gen_timer_index' 32 <= 2009813776 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-19ath9k: Drag the driver to the year 2011Sujith Manoharan
The Times They Are a-Changin'. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-28ath9k_hw: Add support for btcoexistence in AR9300.Vivek Natarajan
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-28ath9k_hw: Move bt_stomp to hw from common.Vivek Natarajan
Move bt_stomp to ath9k_hw and add its support for latest chipsets. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-29ath9k: Remove code which enables btcoex based on subsys idVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24ath9k_htc: Add support for bluetooth coexistence.Vivek Natarajan
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: move hw code to its own moduleLuis R. Rodriguez
hw code for Atheros 802.11n hardware is commmon between different chipsets. This moves this code into a separate module, the next expected user of this code will be the ath9k_htc module. The ath9k/ dir is now selected by ATH9K_HW, an option which gets selected by either ath9k or ath9k_htc, but remains invisible for user menuconfig configuration. If either ath9k or ath9k_htc will be compiled into the kernel ath9k_hw will also be compiled in. Cc: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: clarify what hw code is and remove ath9k.h from a few filesLuis R. Rodriguez
hw code will be shared between ath9k and ath9k_htc. Just a few more files are left to clean up, mark them as well. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: rename ath_btcoex_supported() to ath9k_hw_btcoex_supported()Luis R. Rodriguez
Also just pass the ath_hw as the parameter. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: move ath_btcoex_config and ath_bt_mode to btcoex.cLuis R. Rodriguez
These are only used by btcoex.c on one routine, so stuff them into that file. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: now move ath9k_hw_btcoex_set_weight() to btcoex.cLuis R. Rodriguez
After some necessary cleanups we now move ath9k_hw_btcoex_set_weight() to where it belongs. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: rename ath_btcoex_info to ath_btcoex_hwLuis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: rename btcoex_scheme to just schemeLuis R. Rodriguez
btcoex_scheme is already part of a btcoex struct, its implied this is btcoex related. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: move bt_stomp_type to driver coreLuis R. Rodriguez
The bt_stomp_type defines the bt coex weight, it has a one-to-one mapping. In the future we may want to just use the weight directly. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: replaces SC_OP_BTCOEX_ENABLED with a boolLuis R. Rodriguez
Whether or not bluetooth coex has been enabled is a hardware state and only the hardware helpers will be able to set this. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: split ath9k_hw_btcoex_enable() into two helpersLuis R. Rodriguez
One for 2-wire and another for 3-wire. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: move driver core helpers to main.cLuis R. Rodriguez
Keep on btcoex.c only hardware access helpers, move the driver core specific code to main.c. To accomplish this we had to split ath_init_btcoex_info() into two parts, the driver core part -- ath_init_btcoex_timer() and the hw specific part -- ath9k_hw_init_btcoex_hw_info(). This highlights how ath_gen_timer is part of the driver core, not hw related, so stuff that into ath_btcoex struct. The ath9k_hw_btcoex_init() code is now put inline on ath_init_softc() through a switch to it easier to follow, since we did that we can now call ath_tx_get_qnum() from the main.c instead of btcoex.c Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: split bluetooth hardware coex init into two helpersLuis R. Rodriguez
Use a helper for 2-wire and another for 3-wire. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: move hw specific btcoex info to ath_hwLuis R. Rodriguez
Since we now access it via the ath_hw declare the ath_hw pointer at the header of some routines and se it. ath9k.h no longer needs to access btcoex.h and to adjust for this move ath_btcoex_set_weight() into btcoex.h and instead give main.c a helper for setting initial values upon drv_start() Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: move btcoex core driver info to its own structLuis R. Rodriguez
There is some bluetooth coexistance data which is driver specific, stuff that into its own structure. Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: use ath_hw for DPRINTF() and debug init/exitLuis R. Rodriguez
DPRINTF() is used in hw specific related code, as such ensure we don't rely on the private driver core ath_softc struct when calling it. Drivers can then implement their own DPRINTF() as they see fit. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-09ath9k: Enable btcoex based on the subsystem id of the deviceVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01ath9k: Call spin_lock_bh() on btcoex_lockVasanthakumar Thiagarajan
As generic hw timer interrupt handler is moved to tasklet, we no more need to call spin_lock_irqsave(). Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28ath9k: Add Bluetooth Coexistence 3-wire supportVasanthakumar Thiagarajan
This patch adds 3-wire bluetooth coex support for AR9285. This support can be enabled through btcoex_enable modparam. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>