Lines Matching refs:sc

25 	struct ath_softc *sc = container_of(work, struct ath_softc,  in ath_tx_complete_poll_work()  local
32 if (sc->tx99_state) { in ath_tx_complete_poll_work()
33 ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, in ath_tx_complete_poll_work()
39 txq = sc->tx.txq_map[i]; in ath_tx_complete_poll_work()
41 ath_txq_lock(sc, txq); in ath_tx_complete_poll_work()
45 ath_txq_unlock(sc, txq); in ath_tx_complete_poll_work()
51 ath_txq_unlock(sc, txq); in ath_tx_complete_poll_work()
55 ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, in ath_tx_complete_poll_work()
57 ath9k_queue_reset(sc, RESET_TYPE_TX_HANG); in ath_tx_complete_poll_work()
61 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, in ath_tx_complete_poll_work()
68 bool ath_hw_check(struct ath_softc *sc) in ath_hw_check() argument
70 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_hw_check()
74 ath9k_ps_wakeup(sc); in ath_hw_check()
76 is_alive = ath9k_hw_check_alive(sc->sc_ah); in ath_hw_check()
82 ath9k_queue_reset(sc, type); in ath_hw_check()
85 ath9k_ps_restore(sc); in ath_hw_check()
93 static bool ath_hw_pll_rx_hang_check(struct ath_softc *sc, u32 pll_sqsum) in ath_hw_pll_rx_hang_check() argument
96 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_hw_pll_rx_hang_check()
102 ath9k_queue_reset(sc, RESET_TYPE_PLL_HANG); in ath_hw_pll_rx_hang_check()
116 struct ath_softc *sc = container_of(work, struct ath_softc, in ath_hw_pll_work() local
118 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_hw_pll_work()
128 if (sc->tx99_state) in ath_hw_pll_work()
131 ath9k_ps_wakeup(sc); in ath_hw_pll_work()
132 pll_sqsum = ar9003_get_pll_sqsum_dvc(sc->sc_ah); in ath_hw_pll_work()
133 ath9k_ps_restore(sc); in ath_hw_pll_work()
134 if (ath_hw_pll_rx_hang_check(sc, pll_sqsum)) in ath_hw_pll_work()
137 ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work, in ath_hw_pll_work()
144 static void ath_paprd_activate(struct ath_softc *sc) in ath_paprd_activate() argument
146 struct ath_hw *ah = sc->sc_ah; in ath_paprd_activate()
168 static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int chain) in ath_paprd_send_frame() argument
170 struct ieee80211_hw *hw = sc->hw; in ath_paprd_send_frame()
172 struct ath_hw *ah = sc->sc_ah; in ath_paprd_send_frame()
178 txctl.txq = sc->tx.txq_map[IEEE80211_AC_BE]; in ath_paprd_send_frame()
181 tx_info->band = sc->cur_chandef.chan->band; in ath_paprd_send_frame()
188 init_completion(&sc->paprd_complete); in ath_paprd_send_frame()
197 time_left = wait_for_completion_timeout(&sc->paprd_complete, in ath_paprd_send_frame()
210 struct ath_softc *sc = container_of(work, struct ath_softc, paprd_work); in ath_paprd_calibrate() local
211 struct ieee80211_hw *hw = sc->hw; in ath_paprd_calibrate()
212 struct ath_hw *ah = sc->sc_ah; in ath_paprd_calibrate()
230 ath9k_ps_wakeup(sc); in ath_paprd_calibrate()
258 if (!ath_paprd_send_frame(sc, skb, chain)) in ath_paprd_calibrate()
286 ath_paprd_activate(sc); in ath_paprd_calibrate()
290 ath9k_ps_restore(sc); in ath_paprd_calibrate()
302 struct ath_softc *sc = (struct ath_softc *)data; in ath_ani_calibrate() local
303 struct ath_hw *ah = sc->sc_ah; in ath_ani_calibrate()
321 if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) { in ath_ani_calibrate()
323 spin_lock_irqsave(&sc->sc_pm_lock, flags); in ath_ani_calibrate()
324 sc->ps_flags |= PS_WAIT_FOR_ANI; in ath_ani_calibrate()
325 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); in ath_ani_calibrate()
330 spin_lock_irqsave(&sc->sc_pm_lock, flags); in ath_ani_calibrate()
331 sc->ps_flags &= ~PS_WAIT_FOR_ANI; in ath_ani_calibrate()
332 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); in ath_ani_calibrate()
334 ath9k_ps_wakeup(sc); in ath_ani_calibrate()
368 ath_update_survey_stats(sc); in ath_ani_calibrate()
378 ath9k_queue_reset(sc, RESET_TYPE_CALIBRATION); in ath_ani_calibrate()
391 ath9k_ps_restore(sc); in ath_ani_calibrate()
408 ieee80211_queue_work(sc->hw, &sc->paprd_work); in ath_ani_calibrate()
410 ath9k_ps_wakeup(sc); in ath_ani_calibrate()
411 ath_paprd_activate(sc); in ath_ani_calibrate()
412 ath9k_ps_restore(sc); in ath_ani_calibrate()
417 void ath_start_ani(struct ath_softc *sc) in ath_start_ani() argument
419 struct ath_hw *ah = sc->sc_ah; in ath_start_ani()
425 sc->cur_chan->offchannel) in ath_start_ani()
437 void ath_stop_ani(struct ath_softc *sc) in ath_stop_ani() argument
439 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_stop_ani()
445 void ath_check_ani(struct ath_softc *sc) in ath_check_ani() argument
447 struct ath_hw *ah = sc->sc_ah; in ath_check_ani()
448 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_check_ani()
449 struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; in ath_check_ani()
474 ath_start_ani(sc); in ath_check_ani()
481 ath_stop_ani(sc); in ath_check_ani()
484 void ath_update_survey_nf(struct ath_softc *sc, int channel) in ath_update_survey_nf() argument
486 struct ath_hw *ah = sc->sc_ah; in ath_update_survey_nf()
488 struct survey_info *survey = &sc->survey[channel]; in ath_update_survey_nf()
502 int ath_update_survey_stats(struct ath_softc *sc) in ath_update_survey_stats() argument
504 struct ath_hw *ah = sc->sc_ah; in ath_update_survey_stats()
507 struct survey_info *survey = &sc->survey[pos]; in ath_update_survey_stats()
537 ath_update_survey_nf(sc, pos); in ath_update_survey_stats()