| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The MCI initialization path has various points of failures,
handle these to ensure that we bail out correctly in such
cases.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whenever both WLAN and BT in/out sleep mode, sometimes WLAN
is not able to take back the shared LNA control after resumes
from sleep mode. The idea is that for WLAN to check if BT owns
LNA control and BT is in sleep mode when WLAN just resumes from
sleep mode. If the condition is true, do a BTCOEX_RC_WARM_RESET
for WLAN to take back the control of shared LNA.
Now the issue is the BT sleep value read from MCI register is
overlooked by assigning u32 into u8. Hence the above condition never
be met so that WLAN used to report beacon losses and frequent
connection drops.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Tested-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Before processing BT profiles or status messages, check whether
it is requested to flush BT profile. Otherwise it might increase
number of BT profiles that affects the WLAN performance. Also
flush the profiles when MCI is recovering from broken rx. After
flushing BT profiles, query BT topology to refetch them.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
When the 9462 is operating in 2G mode and MCI is enabled then
reduce the selfgen chain mask to chain 1. Otherwise poor performance
was reported at short range at Rx side when COEX is enabled.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
Whenever BT calibration requested, WLAN has to wait for the
calibration to be completed. But right now we defer the waiting
which might cause BT calibration to fail. Fix that.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There is a possibility that AR_MCI_GPM_1 register can
return 0xdeadbeef and this results in caching of invalid
GPM index in ar9003_mci_is_gpm_valid. Ensure we
have appropriate checks to avoid this.
Cc: xijin luo <xijin@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
Assign the MCI BT state locally, rather than unnecessarily calling
ar9003_mci_state and updating it.
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
| |
On full reset, mci reset will put LNA update on 2G mode. And
Whenever 2g5g_switch is forced at the end of full reset, lna
update should not be skipped. Not doing so, is affecting WLAN
rx and causing beacon loss when BTCOEX is enabled on AR9462.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
| |
When WLAN enter full sleep mode, WLAN HW should send out a LNA_TAKE
message for BT to take control of the shared LNA. Otherwise BT traffic
is completely stopped whenever the wlan interface is moved full sleep
mode.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WLAN driver initialization is muting BT which is terminating
the ongoing BT traffic. The reason to mute BT is to avoid any
incoming MCI messages from BT when MCI reset is in progress that
could corrupt WLAN MCI RX state machine. But we should not
dedicate radio completely to WLAN in driver init itself. So this
patch removes the wlan weightage changes from mute BT to retain
BT connection.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
| |
remove MCI_STATE_BT and use bt_state instead.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
| |
As p_data is unuse, lets remove it from ar9003_mci_state.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
| |
Add a MCI util function to send wlan channel info to BT.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
Add a utility function to set bluetooth version and remove
MCI_STATE_SET_BT_COEX_VERSION.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
Add utility functions to get and test GPM offset and
remove MCI_STATE*_GPM_OFFSET states.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
After a full reset, mci_reset will put LNA update to the setting
for 2G mode. Those registers need to be forced to update when
the channel is in 5G.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
Both "MAC Warm Reset" and "MCI Reset Rx" will reset GPM HW write_ptr.
We should check software cached write_ptr against HW write_ptr before
reset. Otherwise the pending DMA data will be lost.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
The HW statemachine is sometimes found stuck in the state
WL_LNA_CTRL_DISABLE when BT is in sleep, which will cause
TX_HOLD always asserted and resmgr stuck in PENDING_TX state
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
Use smaller aggregation limit and increasing aggregation threshold
for osla that could improve wlan performance when there is HID profile.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
When software rfkill is triggered, before put the chip in reset
state, give LNA and SPDT control to BT to make sure BT can have
good RF performance.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
Fix bad indentation & if nesting to lose about two levels
of unnecessary indentation.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
Exposed by sparse:
ar9003_mci.c:1134:31: warning: Using plain integer as NULL pointer
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
The default value that is being programmed to AR_RTC_KEEP_AWAKE
is 0x2, there is no need to program it manually in various
functions.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes multiple issues with the current RTT
implementation in ath9k.
* The data that is obtained from the RTT interface registers
are stored in 31:5 - mask out the extra bits when reading them.
* A history buffer is maintained which is not needed at all.
Remove this array and just store the baseband data for each
chain (or bank).
* A 'num_readings' variable was being used to handle the
last entry. But it was being used in an improper manner, with
the result that the RTT values were never being written
to the RTT Interface registers. Fix this by using a simple
flag.
* Stop baseband operations before programming the calibration values
to the HW.
* Do not restore RX gain settings as part of RTT.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
| |
This patch fixes indentation and the general coding style
in ar9003_mci.c. Also, minimize the amount of debug log
output generated by MCI.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
They are not needed since MCI will be enabled only for
AR9462 v2.0
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
| |
* Use a separate function to enable/disable
OneStepLookAhead.
* Remove unnecessary hardware SREV checks.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
With the ability to remove BTCOEX support at compile time,
these checks are no longer needed.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
This patch converts a few functions to static variants
and removes extraneous declarations.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
| |
This patch moves all the MCI-specific code in the main reset
function to helper functions.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch simplifies the buffer allocation functions
for MCI and removes unneeded memset calls. Also, a couple
of unused variables are removed and a memory leak in DMA
allocation is fixed.
[ 1263.788267] WARNING: at /home/sujith/dev/wireless-testing/lib/dma-debug.c:875 check_unmap+0x173/0x7e0()
[ 1263.788273] ath9k 0000:06:00.0: DMA-API: device driver frees DMA memory with different size
[device address=0x0000000071908000] [map size=512 bytes] [unmap size=256 bytes]
[ 1263.788345] Pid: 774, comm: rmmod Tainted: G W O 3.3.0-rc3-wl #18
[ 1263.788348] Call Trace:
[ 1263.788355] [<ffffffff8105110f>] warn_slowpath_common+0x7f/0xc0
[ 1263.788359] [<ffffffff81051206>] warn_slowpath_fmt+0x46/0x50
[ 1263.788363] [<ffffffff8125a713>] check_unmap+0x173/0x7e0
[ 1263.788368] [<ffffffff8123fc22>] ? prio_tree_left+0x32/0xc0
[ 1263.788373] [<ffffffff8125aded>] debug_dma_free_coherent+0x6d/0x80
[ 1263.788381] [<ffffffffa0701c3c>] ath_mci_cleanup+0x7c/0x110 [ath9k]
[ 1263.788387] [<ffffffffa06f4033>] ath9k_deinit_softc+0x113/0x120 [ath9k]
[ 1263.788392] [<ffffffffa06f55cc>] ath9k_deinit_device+0x5c/0x70 [ath9k]
[ 1263.788397] [<ffffffffa0704934>] ath_pci_remove+0x54/0xa0 [ath9k]
[ 1263.788401] [<ffffffff81267d06>] pci_device_remove+0x46/0x110
[ 1263.788406] [<ffffffff813102bc>] __device_release_driver+0x7c/0xe0
[ 1263.788410] [<ffffffff81310a00>] driver_detach+0xd0/0xe0
[ 1263.788414] [<ffffffff81310118>] bus_remove_driver+0x88/0xe0
[ 1263.788418] [<ffffffff813111c2>] driver_unregister+0x62/0xa0
[ 1263.788421] [<ffffffff812680c4>] pci_unregister_driver+0x44/0xc0
[ 1263.788427] [<ffffffffa0705015>] ath_pci_exit+0x15/0x20 [ath9k]
[ 1263.788432] [<ffffffffa070a92d>] ath9k_exit+0x15/0x31 [ath9k]
[ 1263.788436] [<ffffffff810b971c>] sys_delete_module+0x18c/0x270
[ 1263.788441] [<ffffffff81436edd>] ? retint_swapgs+0x13/0x1b
[ 1263.788446] [<ffffffff812483be>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 1263.788450] [<ffffffff814378e9>] system_call_fastpath+0x16/0x1b
[ 1263.788453] ---[ end trace 3ab4d030ffde40d4 ]---
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
| |
v1.0 chips are not available in the market.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|