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, 12 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 44a0a886124d..0349b3a1cc58 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -46,6 +46,8 @@ void ath_init_leds(struct ath_softc *sc) | |||
46 | sc->sc_ah->led_pin = ATH_LED_PIN_9287; | 46 | sc->sc_ah->led_pin = ATH_LED_PIN_9287; |
47 | else if (AR_SREV_9485(sc->sc_ah)) | 47 | else if (AR_SREV_9485(sc->sc_ah)) |
48 | sc->sc_ah->led_pin = ATH_LED_PIN_9485; | 48 | sc->sc_ah->led_pin = ATH_LED_PIN_9485; |
49 | else if (AR_SREV_9300(sc->sc_ah)) | ||
50 | sc->sc_ah->led_pin = ATH_LED_PIN_9300; | ||
49 | else | 51 | else |
50 | sc->sc_ah->led_pin = ATH_LED_PIN_DEF; | 52 | sc->sc_ah->led_pin = ATH_LED_PIN_DEF; |
51 | } | 53 | } |
@@ -138,10 +140,10 @@ static void ath_detect_bt_priority(struct ath_softc *sc) | |||
138 | 140 | ||
139 | static void ath9k_gen_timer_start(struct ath_hw *ah, | 141 | static void ath9k_gen_timer_start(struct ath_hw *ah, |
140 | struct ath_gen_timer *timer, | 142 | struct ath_gen_timer *timer, |
141 | u32 timer_next, | 143 | u32 trig_timeout, |
142 | u32 timer_period) | 144 | u32 timer_period) |
143 | { | 145 | { |
144 | ath9k_hw_gen_timer_start(ah, timer, timer_next, timer_period); | 146 | ath9k_hw_gen_timer_start(ah, timer, trig_timeout, timer_period); |
145 | 147 | ||
146 | if ((ah->imask & ATH9K_INT_GENTIMER) == 0) { | 148 | if ((ah->imask & ATH9K_INT_GENTIMER) == 0) { |
147 | ath9k_hw_disable_interrupts(ah); | 149 | ath9k_hw_disable_interrupts(ah); |
@@ -174,17 +176,17 @@ static void ath_btcoex_period_timer(unsigned long data) | |||
174 | struct ath_softc *sc = (struct ath_softc *) data; | 176 | struct ath_softc *sc = (struct ath_softc *) data; |
175 | struct ath_hw *ah = sc->sc_ah; | 177 | struct ath_hw *ah = sc->sc_ah; |
176 | struct ath_btcoex *btcoex = &sc->btcoex; | 178 | struct ath_btcoex *btcoex = &sc->btcoex; |
177 | struct ath_common *common = ath9k_hw_common(ah); | ||
178 | u32 timer_period; | 179 | u32 timer_period; |
179 | bool is_btscan; | 180 | bool is_btscan; |
180 | 181 | ||
182 | ath9k_ps_wakeup(sc); | ||
181 | ath_detect_bt_priority(sc); | 183 | ath_detect_bt_priority(sc); |
182 | 184 | ||
183 | is_btscan = sc->sc_flags & SC_OP_BT_SCAN; | 185 | is_btscan = sc->sc_flags & SC_OP_BT_SCAN; |
184 | 186 | ||
185 | spin_lock_bh(&btcoex->btcoex_lock); | 187 | spin_lock_bh(&btcoex->btcoex_lock); |
186 | 188 | ||
187 | ath9k_cmn_btcoex_bt_stomp(common, is_btscan ? ATH_BTCOEX_STOMP_ALL : | 189 | ath9k_hw_btcoex_bt_stomp(ah, is_btscan ? ATH_BTCOEX_STOMP_ALL : |
188 | btcoex->bt_stomp_type); | 190 | btcoex->bt_stomp_type); |
189 | 191 | ||
190 | spin_unlock_bh(&btcoex->btcoex_lock); | 192 | spin_unlock_bh(&btcoex->btcoex_lock); |
@@ -195,11 +197,12 @@ static void ath_btcoex_period_timer(unsigned long data) | |||
195 | 197 | ||
196 | timer_period = is_btscan ? btcoex->btscan_no_stomp : | 198 | timer_period = is_btscan ? btcoex->btscan_no_stomp : |
197 | btcoex->btcoex_no_stomp; | 199 | btcoex->btcoex_no_stomp; |
198 | ath9k_gen_timer_start(ah, btcoex->no_stomp_timer, 0, | 200 | ath9k_gen_timer_start(ah, btcoex->no_stomp_timer, timer_period, |
199 | timer_period * 10); | 201 | timer_period * 10); |
200 | btcoex->hw_timer_enabled = true; | 202 | btcoex->hw_timer_enabled = true; |
201 | } | 203 | } |
202 | 204 | ||
205 | ath9k_ps_restore(sc); | ||
203 | mod_timer(&btcoex->period_timer, jiffies + | 206 | mod_timer(&btcoex->period_timer, jiffies + |
204 | msecs_to_jiffies(ATH_BTCOEX_DEF_BT_PERIOD)); | 207 | msecs_to_jiffies(ATH_BTCOEX_DEF_BT_PERIOD)); |
205 | } | 208 | } |
@@ -219,14 +222,16 @@ static void ath_btcoex_no_stomp_timer(void *arg) | |||
219 | ath_dbg(common, ATH_DBG_BTCOEX, | 222 | ath_dbg(common, ATH_DBG_BTCOEX, |
220 | "no stomp timer running\n"); | 223 | "no stomp timer running\n"); |
221 | 224 | ||
225 | ath9k_ps_wakeup(sc); | ||
222 | spin_lock_bh(&btcoex->btcoex_lock); | 226 | spin_lock_bh(&btcoex->btcoex_lock); |
223 | 227 | ||
224 | if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan) | 228 | if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan) |
225 | ath9k_cmn_btcoex_bt_stomp(common, ATH_BTCOEX_STOMP_NONE); | 229 | ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); |
226 | else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) | 230 | else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) |
227 | ath9k_cmn_btcoex_bt_stomp(common, ATH_BTCOEX_STOMP_LOW); | 231 | ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW); |
228 | 232 | ||
229 | spin_unlock_bh(&btcoex->btcoex_lock); | 233 | spin_unlock_bh(&btcoex->btcoex_lock); |
234 | ath9k_ps_restore(sc); | ||
230 | } | 235 | } |
231 | 236 | ||
232 | int ath_init_btcoex_timer(struct ath_softc *sc) | 237 | int ath_init_btcoex_timer(struct ath_softc *sc) |