summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/gpio.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2015-03-01 11:53:49 +0530
committerKalle Valo <kvalo@codeaurora.org>2015-03-03 15:46:59 +0200
commit6e6dd08dd3202d735143c973b888572955603391 (patch)
treed705dd81ea3d629002b6e510d75770868c621739 /drivers/net/wireless/ath/ath9k/gpio.c
parentc7266e99b1b0242496557b19a978d748e12a580b (diff)
downloadtalos-op-linux-6e6dd08dd3202d735143c973b888572955603391.tar.gz
talos-op-linux-6e6dd08dd3202d735143c973b888572955603391.zip
ath9k: Fix issues in the main btcoex timer
* ath9k_mci_update_rssi() is required only for cards that use MCI scheme. Make sure that it is not called for 3-wire cards. * Call ath9k_ps_wakeup() early since register accesses are made in ath9k_mci_update_rssi(). * Fix usage of btcoex_lock to handle no_stomp_timer. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 6e22d8085810..86d46c196966 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -202,17 +202,16 @@ static void ath_btcoex_period_timer(unsigned long data)
}
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
- ath9k_mci_update_rssi(sc);
-
ath9k_ps_wakeup(sc);
+ spin_lock_bh(&btcoex->btcoex_lock);
- if (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
- ath_detect_bt_priority(sc);
-
- if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI)
+ if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI) {
+ ath9k_mci_update_rssi(sc);
ath_mci_ftp_adjust(sc);
+ }
- spin_lock_bh(&btcoex->btcoex_lock);
+ if (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
+ ath_detect_bt_priority(sc);
stomp_type = btcoex->bt_stomp_type;
timer_period = btcoex->btcoex_no_stomp;
@@ -252,9 +251,6 @@ static void ath_btcoex_no_stomp_timer(unsigned long arg)
struct ath_softc *sc = (struct ath_softc *)arg;
struct ath_hw *ah = sc->sc_ah;
struct ath_btcoex *btcoex = &sc->btcoex;
- struct ath_common *common = ath9k_hw_common(ah);
-
- ath_dbg(common, BTCOEX, "no stomp timer running\n");
ath9k_ps_wakeup(sc);
spin_lock_bh(&btcoex->btcoex_lock);
OpenPOWER on IntegriCloud