History log of /linux-master/drivers/net/wireless/ath/ath9k/mci.c
Revision Date Author Comments
# b956e311 17-Apr-2023 Toke Høiland-Jørgensen <toke@toke.dk>

wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()

This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa.

Turns out the channelmap variable is not actually read-only, it's modified
through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
so making it read-only causes page faults when that code is hit.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
Fixes: e161d4b60ae3 ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
Cc: stable@vger.kernel.org
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk


# 0f2a4af2 13-Apr-2023 Toke Høiland-Jørgensen <toke@toke.dk>

wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()

This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa.

Turns out the channelmap variable is not actually read-only, it's modified
through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
so making it read-only causes page faults when that code is hit.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk
Fixes: e161d4b60ae3 ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
Cc: stable@vger.kernel.org
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# e161d4b6 05-Oct-2022 Colin Ian King <colin.i.king@gmail.com>

wifi: ath9k: Make arrays prof_prio and channelmap static const

Don't populate the read-only arrays prof_prio and channelmap
on the stack but instead make them static const. Also makes the
object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20221005155558.320556-1-colin.i.king@gmail.com


# 44d445c0 07-Mar-2022 Colin Ian King <colin.king@intel.com>

ath9k: make array voice_priority static const

Don't populate the read-only array voice_priority on the stack but
instead make it static const. Also makes the object code a little
smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220222121749.87513-1-colin.i.king@gmail.com


# 50c8cd44 31-Aug-2017 Himanshu Jha <himanshujha199640@gmail.com>

ath9k: remove cast to void pointer

casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.

Done using Coccinellle.
Semantic Patch used :

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)


Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 6788a383 26-Jun-2017 Gustavo A. R. Silva <garsilva@embeddedor.com>

ath9k: remove useless variable assignment in ath_mci_intr()

Value assigned to variable offset at line 551 is overwritten at line 562,
before it can be used. This makes such variable assignment useless.

Addresses-Coverity-ID: 1226941
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ad1dc638 15-Feb-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Fix GPM initialization

Handle MCI_STATE_INIT_GPM_OFFSET separately and do not
overload ar9003_mci_get_next_gpm_offset() with a special
case.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# b01459e8 11-Jun-2014 Felix Fietkau <nbd@openwrt.org>

ath9k: Move caldata into channel context

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# bc7e1be7 11-Jun-2014 Felix Fietkau <nbd@openwrt.org>

ath9k: Move txpower limit to channel context

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# eefa01dd 27-Feb-2014 Oleksij Rempel <linux@rempel-privat.de>

ath9k: move sc_flags to ath_common

we will need it for ath9k_htc, may be other drivers too

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 168c6f89 14-Dec-2013 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: use a software timer for btcoex no_stomp_timer

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>


# 8896934c 11-Oct-2013 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: remove direct accesses to channel mode flags

Use wrappers where available. Simplifies code and helps with further
improvements to the channel data structure

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# c67ba5e5 31-Jan-2013 Sven Eckelmann <sven@narfation.org>

ath9k: Remove unused variables in ath_mci_cleanup

Leaving the unused variables ath_mci_cleanup causes build warnings.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# b81950b1 12-Dec-2012 Felix Fietkau <nbd@openwrt.org>

ath9k: use the devres API for allocations/mappings

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# d6144d85 27-Nov-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: Fix buffer overflow error

The commit "ath9k: stomp audio profiles on weak signal
strength" failed to take care of new stomp type while
programming concurrent tx priority. That leads to array
index out of bounds access.

drivers/net/wireless/ath/ath9k/btcoex.c:414
ath9k_hw_btcoex_set_concur_txprio()
error: buffer overflow 'stomp_txprio' 4 <= 4

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 2884561a 20-Nov-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: stomp audio profiles on weak signal strength

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>


# b88083bf 20-Nov-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: Fix MCI reset in BT cal_req

This patch reverts the commit "ath9k_hw: Wait BT calibration to complete"
and bail out from MCI interrupt routine for chip reset. The above commit
stalls the WLAN TCP traffic while bringing up and down the BT interface
iteratively. Fixing this properly by queueing up chip reset and bailing
out properly from tasklet routine.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# f9401b1e 15-Oct-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: adjust duty cycle for FTP profile for AR9565

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# e82cb03f 12-Oct-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: adjust WLAN and BT concurrent transmission

The simulataneous transmission of both WLAN and BT might cause
increase in power levels. To avoid regulatory violation, WLAN tx
power will be adjusted according to BT power index based on avaliability
of BT scheduling messages. WLAN tx power reduction might affect its
performance. So WLAN tx power is only be lowered when the signal strength
is good enough. Otherwise concurrent tx will be disabled and WLAN uses
it default power levels. Also concurrent tx is disabled whenever WLAN is
moving to off-channel which might be used by BT.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# db60428b 12-Oct-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: Add concurrent WLAN and BT tx support for MCI based chips

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>


# 50072ebc 12-Oct-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: Send WLAN channel info to BT

WLAN updates channel bitmap when associated and disassociated. Channel
bitmap will reflect whare are the channels used or affected by WLAN and
BT should avoid using those. Not doing so, could affect BT traffic
as both WLAN and BT is operating on same channel.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 69c6ac60 25-Sep-2012 Sujith Manoharan <c_manoha@qualcomm.com>

ath9k: Handle errors properly in MCI initialization

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>


# 7a034146 12-Sep-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: fix queuing MCI work twice

Right now MCI work is being queued twice by profile and status
updation. Queue MCI work once when it is needed.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 9e62817b 12-Sep-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: move coex param updation within mci work

Update all coex parameters in sigle place. So that we can avoid
redoing the same operation in mutiple places and it eases debugging.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# d92bb98f 12-Sep-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: flush bt profile whenever it is requested

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>


# 83ad49a9 10-Sep-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: Wait BT calibration to complete

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>


# 4653356f 24-Aug-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath9k_hw: small optimization

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>


# 124b979b 17-Jul-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: Fix race in reset-work usage

Using work_pending() to defer certain operations when
a HW-reset work has been queued is racy since the check
would return false when the work item is actually in
execution. Use SC_OP_HW_RESET instead to fix this race.
Also, unify the reset debug statistics maintenance.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# c32cdbd8 06-Jul-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath9k: Stop the BTCOEX timers before disabling BTCOEX

Its safe to stop the BTCOEX timers 'period_timer' and
'no_stomp_timer' before disabling BTCOEX. These timers
can call ath9k_hw_btcoex_enable (or) change the BT
stomp type if they seem to be running after we had
called ath9k_hw_btcoex_disable, which is obviously
not correct.

Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# d8fffb4a 27-Jun-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath9k: Fix signedness in a MCI debug message

seems i got a message like this
ath: phy0: BT_Status_Update: is_link=0, linkId=2,
state=1, SEQ=-2085766476 initially.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 305dd09f 18-Jun-2012 Bala Shanmugam <bkamatch@qca.qualcomm.com>

ath9k: fix incorrect profile type manupulation

Two MCI interrupts are generated while adding A2DP and headset profiles
with different types and same connection handle. While disconnecting,
only one MCI interrupt is generated with last added profile type value
for both profiles.

While adding second profile type decrement first one.

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 9330969b 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: remove MCI_STATE_SET_BT_SLEEP

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 26e942b7 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: remove MCI_STATE_CONT_* state

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6d97be48 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: remove MCI_STATE_BT

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>


# b98ccec0 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: remove p_data argument from ar9003_mci_state

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>


# 2d340ac8 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: remove MCI_STATE_SEND_WLAN_CHANNELS

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>


# e1763d3f 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: add utility function to set BT version

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>


# 506847ad 12-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: cleanup MCI gpm offset state

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>


# a197b76c 11-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: fix btcoex duty cycle

* Reset duty cycle before updating btcoex scheme. Otherwise duty cycle
reaches max limit and never be reduced again
* Adjust duty cycle with proper BDR profile value

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 3c7992e3 11-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: defer btcoex scheme update

As btcoex scheme updation might sleep, remove the function call
from tasklet context and queue it up as a separate work.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# dfd0587a 10-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: keep btcoex period in milliseconds

btcoex periord is converted into micro seconds during initialization
and converted back to milli seconds while starting timer. As MCI code
handles btcoex period in msec, lets keep the btcoex timer in msec and
convert them into other form whenever needed.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 9e2e0c84 10-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: simplify btcoex profile management

This patch simplifies profile management utility functions.

* Separate find_profile from add/del functions
* Return correct values when the profile list is empty or
profile is ot found
* flush the profiles when there are entries in the list

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 0603143e 04-Jun-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: BT coex performance tuning for AR9462

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>


# e270e776 04-Jun-2012 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Setup MCI interrupts properly

MCI interrupts have to be enabled only when BTCOEX is
actually in use.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 682dd04b 22-Feb-2012 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Cleanup mci.c

Cleanup whitespace, fix indentation and coding style.
Also remove debug messages that were flooding the log.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 9a15858f 21-Feb-2012 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Remove ATH9K_HW_CAP_MCI checks

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>


# ea510e4b 21-Feb-2012 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Cleanup MCI init/deinit routines

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>


# 6ec414fd 21-Dec-2011 Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

ath9k: make ath_mci_duty_cycle static

This fixes this sparse warning:

CHECK drivers/net/wireless/ath/ath9k/mci.c
drivers/net/wireless/ath/ath9k/mci.c:23:4: warning: symbol 'ath_mci_duty_cycle' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 8a309305 17-Dec-2011 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: make bluetooth coexistence support optional at compile time

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>


# d2182b69 15-Dec-2011 Joe Perches <joe@perches.com>

ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOO

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>


# e5f0a276 10-Dec-2011 Felix Fietkau <nbd@openwrt.org>

ath9k: make two mci related functions static

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 19686ddf 29-Nov-2011 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath9k: MCI state machine based on MCI interrupt

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>


# 9e25365f 29-Nov-2011 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath9k: Add functions to allocate/free buffers for MCI

required buffers and dma allocation is done for GPM and SCHED
messages

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>


# 7dc181c2 24-Oct-2011 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k: Add btcoex profile management support for AR9462

AR9462 chips have the capabilities to provoide bluetooth
profile information. For non-AR9462 btcoex chips, the BT
priority traffic was identified by periodically polling
the respective registers and updated dutycycle, stomptype,
etc. As AR9462 chip offers the BT profile informations,
let us make use of that to update aggregation limit,
dutycycle, stomptype and wieghtages.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>