Lines Matching defs:sc

23 static bool ath_tx_complete_check(struct ath_softc *sc)
28 if (sc->tx99_state)
32 txq = sc->tx.txq_map[i];
34 ath_txq_lock(sc, txq);
37 ath_txq_unlock(sc, txq);
43 ath_txq_unlock(sc, txq);
49 ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
51 ath9k_queue_reset(sc, RESET_TYPE_TX_HANG);
58 struct ath_softc *sc = container_of(work, struct ath_softc,
61 if (!ath_hw_check(sc) ||
62 !ath_tx_complete_check(sc))
65 ieee80211_queue_delayed_work(sc->hw, &sc->hw_check_work,
72 bool ath_hw_check(struct ath_softc *sc)
74 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
78 ath9k_ps_wakeup(sc);
80 is_alive = ath9k_hw_check_alive(sc->sc_ah);
86 ath9k_queue_reset(sc, type);
89 ath9k_ps_restore(sc);
97 static bool ath_hw_pll_rx_hang_check(struct ath_softc *sc, u32 pll_sqsum)
100 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
106 ath9k_queue_reset(sc, RESET_TYPE_PLL_HANG);
120 struct ath_softc *sc = container_of(work, struct ath_softc,
122 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
132 if (sc->tx99_state)
135 ath9k_ps_wakeup(sc);
136 pll_sqsum = ar9003_get_pll_sqsum_dvc(sc->sc_ah);
137 ath9k_ps_restore(sc);
138 if (ath_hw_pll_rx_hang_check(sc, pll_sqsum))
141 ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work,
148 static void ath_paprd_activate(struct ath_softc *sc)
150 struct ath_hw *ah = sc->sc_ah;
172 static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int chain)
174 struct ieee80211_hw *hw = sc->hw;
176 struct ath_hw *ah = sc->sc_ah;
182 txctl.txq = sc->tx.txq_map[IEEE80211_AC_BE];
185 tx_info->band = sc->cur_chandef.chan->band;
192 init_completion(&sc->paprd_complete);
201 time_left = wait_for_completion_timeout(&sc->paprd_complete,
214 struct ath_softc *sc = container_of(work, struct ath_softc, paprd_work);
215 struct ieee80211_hw *hw = sc->hw;
216 struct ath_hw *ah = sc->sc_ah;
234 ath9k_ps_wakeup(sc);
262 if (!ath_paprd_send_frame(sc, skb, chain))
290 ath_paprd_activate(sc);
294 ath9k_ps_restore(sc);
307 struct ath_softc *sc = common->priv;
308 struct ath_hw *ah = sc->sc_ah;
325 if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) {
327 spin_lock_irqsave(&sc->sc_pm_lock, flags);
328 sc->ps_flags |= PS_WAIT_FOR_ANI;
329 spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
334 spin_lock_irqsave(&sc->sc_pm_lock, flags);
335 sc->ps_flags &= ~PS_WAIT_FOR_ANI;
336 spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
338 ath9k_ps_wakeup(sc);
372 ath_update_survey_stats(sc);
382 ath9k_queue_reset(sc, RESET_TYPE_CALIBRATION);
395 ath9k_ps_restore(sc);
412 ieee80211_queue_work(sc->hw, &sc->paprd_work);
414 ath9k_ps_wakeup(sc);
415 ath_paprd_activate(sc);
416 ath9k_ps_restore(sc);
421 void ath_start_ani(struct ath_softc *sc)
423 struct ath_hw *ah = sc->sc_ah;
429 sc->cur_chan->offchannel)
441 void ath_stop_ani(struct ath_softc *sc)
443 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
449 void ath_check_ani(struct ath_softc *sc)
451 struct ath_hw *ah = sc->sc_ah;
452 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
453 struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon;
478 ath_start_ani(sc);
485 ath_stop_ani(sc);
488 void ath_update_survey_nf(struct ath_softc *sc, int channel)
490 struct ath_hw *ah = sc->sc_ah;
492 struct survey_info *survey = &sc->survey[channel];
506 int ath_update_survey_stats(struct ath_softc *sc)
508 struct ath_hw *ah = sc->sc_ah;
511 struct survey_info *survey = &sc->survey[pos];
541 ath_update_survey_nf(sc, pos);