gpio.c (d2182b69dcb6a68b1ef6070b2efd094e13dea3f1) | gpio.c (8a30930563521c9dba73c93b5631be1d0993f78f) |
---|---|
1/* 2 * Copyright (c) 2008-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 235 unchanged lines hidden (view full) --- 244 spin_unlock_bh(&btcoex->btcoex_lock); 245 ath9k_ps_restore(sc); 246} 247 248int ath_init_btcoex_timer(struct ath_softc *sc) 249{ 250 struct ath_btcoex *btcoex = &sc->btcoex; 251 | 1/* 2 * Copyright (c) 2008-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 235 unchanged lines hidden (view full) --- 244 spin_unlock_bh(&btcoex->btcoex_lock); 245 ath9k_ps_restore(sc); 246} 247 248int ath_init_btcoex_timer(struct ath_softc *sc) 249{ 250 struct ath_btcoex *btcoex = &sc->btcoex; 251 |
252 if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_NONE) 253 return 0; 254 |
|
252 btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD * 1000; 253 btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * 254 btcoex->btcoex_period / 100; 255 btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) * 256 btcoex->btcoex_period / 100; 257 258 setup_timer(&btcoex->period_timer, ath_btcoex_period_timer, 259 (unsigned long) sc); --- 16 unchanged lines hidden (view full) --- 276 */ 277void ath9k_btcoex_timer_resume(struct ath_softc *sc) 278{ 279 struct ath_btcoex *btcoex = &sc->btcoex; 280 struct ath_hw *ah = sc->sc_ah; 281 282 ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex timers\n"); 283 | 255 btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD * 1000; 256 btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * 257 btcoex->btcoex_period / 100; 258 btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) * 259 btcoex->btcoex_period / 100; 260 261 setup_timer(&btcoex->period_timer, ath_btcoex_period_timer, 262 (unsigned long) sc); --- 16 unchanged lines hidden (view full) --- 279 */ 280void ath9k_btcoex_timer_resume(struct ath_softc *sc) 281{ 282 struct ath_btcoex *btcoex = &sc->btcoex; 283 struct ath_hw *ah = sc->sc_ah; 284 285 ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex timers\n"); 286 |
287 if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE) 288 return; 289 |
|
284 /* make sure duty cycle timer is also stopped when resuming */ 285 if (btcoex->hw_timer_enabled) 286 ath9k_gen_timer_stop(sc->sc_ah, btcoex->no_stomp_timer); 287 288 btcoex->bt_priority_cnt = 0; 289 btcoex->bt_priority_time = jiffies; 290 sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); 291 --- 4 unchanged lines hidden (view full) --- 296/* 297 * Pause btcoex timer and bt duty cycle timer 298 */ 299void ath9k_btcoex_timer_pause(struct ath_softc *sc) 300{ 301 struct ath_btcoex *btcoex = &sc->btcoex; 302 struct ath_hw *ah = sc->sc_ah; 303 | 290 /* make sure duty cycle timer is also stopped when resuming */ 291 if (btcoex->hw_timer_enabled) 292 ath9k_gen_timer_stop(sc->sc_ah, btcoex->no_stomp_timer); 293 294 btcoex->bt_priority_cnt = 0; 295 btcoex->bt_priority_time = jiffies; 296 sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); 297 --- 4 unchanged lines hidden (view full) --- 302/* 303 * Pause btcoex timer and bt duty cycle timer 304 */ 305void ath9k_btcoex_timer_pause(struct ath_softc *sc) 306{ 307 struct ath_btcoex *btcoex = &sc->btcoex; 308 struct ath_hw *ah = sc->sc_ah; 309 |
310 if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE) 311 return; 312 |
|
304 del_timer_sync(&btcoex->period_timer); 305 306 if (btcoex->hw_timer_enabled) 307 ath9k_gen_timer_stop(ah, btcoex->no_stomp_timer); 308 309 btcoex->hw_timer_enabled = false; 310} | 313 del_timer_sync(&btcoex->period_timer); 314 315 if (btcoex->hw_timer_enabled) 316 ath9k_gen_timer_stop(ah, btcoex->no_stomp_timer); 317 318 btcoex->hw_timer_enabled = false; 319} |