Skip to content

Commit

Permalink
ath9k: Fix issues in the main btcoex timer
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Sujith Manoharan authored and Kalle Valo committed Mar 3, 2015
1 parent c7266e9 commit 6e6dd08
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions drivers/net/wireless/ath/ath9k/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6e6dd08

Please sign in to comment.