diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index e4ae08e0771..597c84e31ad 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -130,12 +130,12 @@ static void ath_detect_bt_priority(struct ath_softc *sc) | |||
130 | sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); | 130 | sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); |
131 | /* Detect if colocated bt started scanning */ | 131 | /* Detect if colocated bt started scanning */ |
132 | if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { | 132 | if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { |
133 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, | 133 | ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX, |
134 | "BT scan detected\n"); | 134 | "BT scan detected\n"); |
135 | sc->sc_flags |= (SC_OP_BT_SCAN | | 135 | sc->sc_flags |= (SC_OP_BT_SCAN | |
136 | SC_OP_BT_PRIORITY_DETECTED); | 136 | SC_OP_BT_PRIORITY_DETECTED); |
137 | } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { | 137 | } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { |
138 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, | 138 | ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX, |
139 | "BT priority traffic detected\n"); | 139 | "BT priority traffic detected\n"); |
140 | sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED; | 140 | sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED; |
141 | } | 141 | } |
@@ -230,8 +230,7 @@ static void ath_btcoex_no_stomp_timer(void *arg) | |||
230 | struct ath_common *common = ath9k_hw_common(ah); | 230 | struct ath_common *common = ath9k_hw_common(ah); |
231 | bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN; | 231 | bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN; |
232 | 232 | ||
233 | ath_dbg(common, ATH_DBG_BTCOEX, | 233 | ath_dbg(common, BTCOEX, "no stomp timer running\n"); |
234 | "no stomp timer running\n"); | ||
235 | 234 | ||
236 | ath9k_ps_wakeup(sc); | 235 | ath9k_ps_wakeup(sc); |
237 | spin_lock_bh(&btcoex->btcoex_lock); | 236 | spin_lock_bh(&btcoex->btcoex_lock); |
@@ -250,6 +249,9 @@ int ath_init_btcoex_timer(struct ath_softc *sc) | |||
250 | { | 249 | { |
251 | struct ath_btcoex *btcoex = &sc->btcoex; | 250 | struct ath_btcoex *btcoex = &sc->btcoex; |
252 | 251 | ||
252 | if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_NONE) | ||
253 | return 0; | ||
254 | |||
253 | btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD * 1000; | 255 | btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD * 1000; |
254 | btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * | 256 | btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * |
255 | btcoex->btcoex_period / 100; | 257 | btcoex->btcoex_period / 100; |
@@ -280,8 +282,10 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc) | |||
280 | struct ath_btcoex *btcoex = &sc->btcoex; | 282 | struct ath_btcoex *btcoex = &sc->btcoex; |
281 | struct ath_hw *ah = sc->sc_ah; | 283 | struct ath_hw *ah = sc->sc_ah; |
282 | 284 | ||
283 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, | 285 | ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex timers\n"); |
284 | "Starting btcoex timers\n"); | 286 | |
287 | if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE) | ||
288 | return; | ||
285 | 289 | ||
286 | /* make sure duty cycle timer is also stopped when resuming */ | 290 | /* make sure duty cycle timer is also stopped when resuming */ |
287 | if (btcoex->hw_timer_enabled) | 291 | if (btcoex->hw_timer_enabled) |
@@ -303,6 +307,9 @@ void ath9k_btcoex_timer_pause(struct ath_softc *sc) | |||
303 | struct ath_btcoex *btcoex = &sc->btcoex; | 307 | struct ath_btcoex *btcoex = &sc->btcoex; |
304 | struct ath_hw *ah = sc->sc_ah; | 308 | struct ath_hw *ah = sc->sc_ah; |
305 | 309 | ||
310 | if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE) | ||
311 | return; | ||
312 | |||
306 | del_timer_sync(&btcoex->period_timer); | 313 | del_timer_sync(&btcoex->period_timer); |
307 | 314 | ||
308 | if (btcoex->hw_timer_enabled) | 315 | if (btcoex->hw_timer_enabled) |