diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 4a9a68bba324..133764069246 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -103,8 +103,8 @@ static int ath_register_led(struct ath_softc *sc, struct ath_led *led, | |||
103 | 103 | ||
104 | ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->led_cdev); | 104 | ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->led_cdev); |
105 | if (ret) | 105 | if (ret) |
106 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 106 | ath_err(ath9k_hw_common(sc->sc_ah), |
107 | "Failed to register led:%s", led->name); | 107 | "Failed to register led:%s", led->name); |
108 | else | 108 | else |
109 | led->registered = 1; | 109 | led->registered = 1; |
110 | return ret; | 110 | return ret; |
@@ -236,13 +236,13 @@ static void ath_detect_bt_priority(struct ath_softc *sc) | |||
236 | sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); | 236 | sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); |
237 | /* Detect if colocated bt started scanning */ | 237 | /* Detect if colocated bt started scanning */ |
238 | if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { | 238 | if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { |
239 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, | 239 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, |
240 | "BT scan detected"); | 240 | "BT scan detected\n"); |
241 | sc->sc_flags |= (SC_OP_BT_SCAN | | 241 | sc->sc_flags |= (SC_OP_BT_SCAN | |
242 | SC_OP_BT_PRIORITY_DETECTED); | 242 | SC_OP_BT_PRIORITY_DETECTED); |
243 | } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { | 243 | } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { |
244 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, | 244 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, |
245 | "BT priority traffic detected"); | 245 | "BT priority traffic detected\n"); |
246 | sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED; | 246 | sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED; |
247 | } | 247 | } |
248 | 248 | ||
@@ -259,7 +259,7 @@ static void ath9k_gen_timer_start(struct ath_hw *ah, | |||
259 | ath9k_hw_gen_timer_start(ah, timer, timer_next, timer_period); | 259 | ath9k_hw_gen_timer_start(ah, timer, timer_next, timer_period); |
260 | 260 | ||
261 | if ((ah->imask & ATH9K_INT_GENTIMER) == 0) { | 261 | if ((ah->imask & ATH9K_INT_GENTIMER) == 0) { |
262 | ath9k_hw_set_interrupts(ah, 0); | 262 | ath9k_hw_disable_interrupts(ah); |
263 | ah->imask |= ATH9K_INT_GENTIMER; | 263 | ah->imask |= ATH9K_INT_GENTIMER; |
264 | ath9k_hw_set_interrupts(ah, ah->imask); | 264 | ath9k_hw_set_interrupts(ah, ah->imask); |
265 | } | 265 | } |
@@ -273,7 +273,7 @@ static void ath9k_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer) | |||
273 | 273 | ||
274 | /* if no timer is enabled, turn off interrupt mask */ | 274 | /* if no timer is enabled, turn off interrupt mask */ |
275 | if (timer_table->timer_mask.val == 0) { | 275 | if (timer_table->timer_mask.val == 0) { |
276 | ath9k_hw_set_interrupts(ah, 0); | 276 | ath9k_hw_disable_interrupts(ah); |
277 | ah->imask &= ~ATH9K_INT_GENTIMER; | 277 | ah->imask &= ~ATH9K_INT_GENTIMER; |
278 | ath9k_hw_set_interrupts(ah, ah->imask); | 278 | ath9k_hw_set_interrupts(ah, ah->imask); |
279 | } | 279 | } |
@@ -310,10 +310,8 @@ static void ath_btcoex_period_timer(unsigned long data) | |||
310 | 310 | ||
311 | timer_period = is_btscan ? btcoex->btscan_no_stomp : | 311 | timer_period = is_btscan ? btcoex->btscan_no_stomp : |
312 | btcoex->btcoex_no_stomp; | 312 | btcoex->btcoex_no_stomp; |
313 | ath9k_gen_timer_start(ah, | 313 | ath9k_gen_timer_start(ah, btcoex->no_stomp_timer, 0, |
314 | btcoex->no_stomp_timer, | 314 | timer_period * 10); |
315 | (ath9k_hw_gettsf32(ah) + | ||
316 | timer_period), timer_period * 10); | ||
317 | btcoex->hw_timer_enabled = true; | 315 | btcoex->hw_timer_enabled = true; |
318 | } | 316 | } |
319 | 317 | ||
@@ -333,8 +331,8 @@ static void ath_btcoex_no_stomp_timer(void *arg) | |||
333 | struct ath_common *common = ath9k_hw_common(ah); | 331 | struct ath_common *common = ath9k_hw_common(ah); |
334 | bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN; | 332 | bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN; |
335 | 333 | ||
336 | ath_print(common, ATH_DBG_BTCOEX, | 334 | ath_dbg(common, ATH_DBG_BTCOEX, |
337 | "no stomp timer running\n"); | 335 | "no stomp timer running\n"); |
338 | 336 | ||
339 | spin_lock_bh(&btcoex->btcoex_lock); | 337 | spin_lock_bh(&btcoex->btcoex_lock); |
340 | 338 | ||
@@ -380,8 +378,8 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc) | |||
380 | struct ath_btcoex *btcoex = &sc->btcoex; | 378 | struct ath_btcoex *btcoex = &sc->btcoex; |
381 | struct ath_hw *ah = sc->sc_ah; | 379 | struct ath_hw *ah = sc->sc_ah; |
382 | 380 | ||
383 | ath_print(ath9k_hw_common(ah), ATH_DBG_BTCOEX, | 381 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, |
384 | "Starting btcoex timers"); | 382 | "Starting btcoex timers\n"); |
385 | 383 | ||
386 | /* make sure duty cycle timer is also stopped when resuming */ | 384 | /* make sure duty cycle timer is also stopped when resuming */ |
387 | if (btcoex->hw_timer_enabled) | 385 | if (btcoex->hw_timer_enabled) |