Lines Matching refs:sc
33 static u8 ath9k_wow_map_triggers(struct ath_softc *sc, in ath9k_wow_map_triggers() argument
50 static int ath9k_wow_add_disassoc_deauth_pattern(struct ath_softc *sc) in ath9k_wow_add_disassoc_deauth_pattern() argument
52 struct ath_hw *ah = sc->sc_ah; in ath9k_wow_add_disassoc_deauth_pattern()
138 static int ath9k_wow_add_pattern(struct ath_softc *sc, in ath9k_wow_add_pattern() argument
141 struct ath_hw *ah = sc->sc_ah; in ath9k_wow_add_pattern()
170 struct ath_softc *sc = hw->priv; in ath9k_suspend() local
171 struct ath_hw *ah = sc->sc_ah; in ath9k_suspend()
176 ath9k_deinit_channel_context(sc); in ath9k_suspend()
178 mutex_lock(&sc->mutex); in ath9k_suspend()
192 if (sc->cur_chan->nvifs > 1) { in ath9k_suspend()
213 triggers = ath9k_wow_map_triggers(sc, wowlan); in ath9k_suspend()
220 ath_cancel_work(sc); in ath9k_suspend()
221 ath_stop_ani(sc); in ath9k_suspend()
223 ath9k_ps_wakeup(sc); in ath9k_suspend()
225 ath9k_stop_btcoex(sc); in ath9k_suspend()
231 ret = ath9k_wow_add_disassoc_deauth_pattern(sc); in ath9k_suspend()
239 ret = ath9k_wow_add_pattern(sc, wowlan); in ath9k_suspend()
247 spin_lock_bh(&sc->sc_pcu_lock); in ath9k_suspend()
253 sc->wow_intr_before_sleep = ah->imask; in ath9k_suspend()
260 spin_unlock_bh(&sc->sc_pcu_lock); in ath9k_suspend()
266 synchronize_irq(sc->irq); in ath9k_suspend()
267 tasklet_kill(&sc->intr_tq); in ath9k_suspend()
271 ath9k_ps_restore(sc); in ath9k_suspend()
276 mutex_unlock(&sc->mutex); in ath9k_suspend()
282 struct ath_softc *sc = hw->priv; in ath9k_resume() local
283 struct ath_hw *ah = sc->sc_ah; in ath9k_resume()
287 mutex_lock(&sc->mutex); in ath9k_resume()
289 ath9k_ps_wakeup(sc); in ath9k_resume()
291 spin_lock_bh(&sc->sc_pcu_lock); in ath9k_resume()
294 ah->imask = sc->wow_intr_before_sleep; in ath9k_resume()
298 spin_unlock_bh(&sc->sc_pcu_lock); in ath9k_resume()
303 ath_restart_work(sc); in ath9k_resume()
304 ath9k_start_btcoex(sc); in ath9k_resume()
308 ath9k_ps_restore(sc); in ath9k_resume()
309 mutex_unlock(&sc->mutex); in ath9k_resume()
316 struct ath_softc *sc = hw->priv; in ath9k_set_wakeup() local
317 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath9k_set_wakeup()
319 mutex_lock(&sc->mutex); in ath9k_set_wakeup()
320 device_set_wakeup_enable(sc->dev, enabled); in ath9k_set_wakeup()
321 mutex_unlock(&sc->mutex); in ath9k_set_wakeup()
329 struct ath_softc *sc = hw->priv; in ath9k_init_wow() local
330 struct ath_hw *ah = sc->sc_ah; in ath9k_init_wow()
332 if ((sc->driver_data & ATH9K_PCI_WOW) || sc->force_wow) { in ath9k_init_wow()
338 device_init_wakeup(sc->dev, 1); in ath9k_init_wow()
344 struct ath_softc *sc = hw->priv; in ath9k_deinit_wow() local
346 if ((sc->driver_data & ATH9K_PCI_WOW) || sc->force_wow) in ath9k_deinit_wow()
347 device_init_wakeup(sc->dev, 0); in ath9k_deinit_wow()