summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/gpio.c
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2012-09-04 16:03:33 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 21:13:51 +0200
commit94ae77ea4600801233663e64025529ba43075643 (patch)
tree63a7f7c9b4dba88fac5e5dc99263cf968de13ac6 /drivers/net/wireless/ath/ath9k/gpio.c
parentath9k_hw: Fix invalid MCI GPM index access/caching (diff)
downloadlinux-94ae77ea4600801233663e64025529ba43075643.tar.xz
linux-94ae77ea4600801233663e64025529ba43075643.zip
ath9k: Fix BTCOEX timer triggering comparision
Its more correct to convert btcoex_period to 'us' while comparing with btcoex_no_stomp which is in 'us'. Did not find any functionality issues being fixed, as the generic hardware timer triggers are usually refreshed with the newer duty cycle. Cc: 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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 9f83f71742a5..5046ca4e30a8 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -228,7 +228,12 @@ static void ath_btcoex_period_timer(unsigned long data)
ath9k_hw_btcoex_enable(ah);
spin_unlock_bh(&btcoex->btcoex_lock);
- if (btcoex->btcoex_period != btcoex->btcoex_no_stomp) {
+ /*
+ * btcoex_period is in msec while (btocex/btscan_)no_stomp are in usec,
+ * ensure that we properly convert btcoex_period to usec
+ * for any comparision with (btcoex/btscan_)no_stomp.
+ */
+ if (btcoex->btcoex_period * 1000 != btcoex->btcoex_no_stomp) {
if (btcoex->hw_timer_enabled)
ath9k_gen_timer_stop(ah, btcoex->no_stomp_timer);