提交 a039a993 编写于 作者: V Vivek Natarajan 提交者: John W. Linville

ath9k: Use ps wrappers for btcoex logic.

Use ps wrappers before accessing hw registers in btcoex.
Signed-off-by: NVivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 f78eb657
...@@ -179,6 +179,7 @@ static void ath_btcoex_period_timer(unsigned long data) ...@@ -179,6 +179,7 @@ static void ath_btcoex_period_timer(unsigned long data)
u32 timer_period; u32 timer_period;
bool is_btscan; bool is_btscan;
ath9k_ps_wakeup(sc);
ath_detect_bt_priority(sc); ath_detect_bt_priority(sc);
is_btscan = sc->sc_flags & SC_OP_BT_SCAN; is_btscan = sc->sc_flags & SC_OP_BT_SCAN;
...@@ -201,6 +202,7 @@ static void ath_btcoex_period_timer(unsigned long data) ...@@ -201,6 +202,7 @@ static void ath_btcoex_period_timer(unsigned long data)
btcoex->hw_timer_enabled = true; btcoex->hw_timer_enabled = true;
} }
ath9k_ps_restore(sc);
mod_timer(&btcoex->period_timer, jiffies + mod_timer(&btcoex->period_timer, jiffies +
msecs_to_jiffies(ATH_BTCOEX_DEF_BT_PERIOD)); msecs_to_jiffies(ATH_BTCOEX_DEF_BT_PERIOD));
} }
...@@ -220,6 +222,7 @@ static void ath_btcoex_no_stomp_timer(void *arg) ...@@ -220,6 +222,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
ath_dbg(common, ATH_DBG_BTCOEX, ath_dbg(common, ATH_DBG_BTCOEX,
"no stomp timer running\n"); "no stomp timer running\n");
ath9k_ps_wakeup(sc);
spin_lock_bh(&btcoex->btcoex_lock); spin_lock_bh(&btcoex->btcoex_lock);
if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan) if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan)
...@@ -228,6 +231,7 @@ static void ath_btcoex_no_stomp_timer(void *arg) ...@@ -228,6 +231,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW); ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW);
spin_unlock_bh(&btcoex->btcoex_lock); spin_unlock_bh(&btcoex->btcoex_lock);
ath9k_ps_restore(sc);
} }
int ath_init_btcoex_timer(struct ath_softc *sc) int ath_init_btcoex_timer(struct ath_softc *sc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册