Lines Matching refs:sc

19 static void ath9k_tx99_stop(struct ath_softc *sc)  in ath9k_tx99_stop()  argument
21 struct ath_hw *ah = sc->sc_ah; in ath9k_tx99_stop()
24 ath_drain_all_txq(sc); in ath9k_tx99_stop()
25 ath_startrecv(sc); in ath9k_tx99_stop()
30 ieee80211_wake_queues(sc->hw); in ath9k_tx99_stop()
32 kfree_skb(sc->tx99_skb); in ath9k_tx99_stop()
33 sc->tx99_skb = NULL; in ath9k_tx99_stop()
34 sc->tx99_state = false; in ath9k_tx99_stop()
36 ath9k_hw_tx99_stop(sc->sc_ah); in ath9k_tx99_stop()
40 static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc) in ath9k_build_tx99_skb() argument
52 struct ieee80211_hw *hw = sc->hw; in ath9k_build_tx99_skb()
53 struct ath_hw *ah = sc->sc_ah; in ath9k_build_tx99_skb()
59 if (!sc->tx99_vif) in ath9k_build_tx99_skb()
62 avp = (struct ath_vif *)sc->tx99_vif->drv_priv; in ath9k_build_tx99_skb()
85 tx_info->band = sc->cur_chan->chandef.chan->band; in ath9k_build_tx99_skb()
87 tx_info->control.vif = sc->tx99_vif; in ath9k_build_tx99_skb()
100 static void ath9k_tx99_deinit(struct ath_softc *sc) in ath9k_tx99_deinit() argument
102 ath_reset(sc, NULL); in ath9k_tx99_deinit()
104 ath9k_ps_wakeup(sc); in ath9k_tx99_deinit()
105 ath9k_tx99_stop(sc); in ath9k_tx99_deinit()
106 ath9k_ps_restore(sc); in ath9k_tx99_deinit()
109 static int ath9k_tx99_init(struct ath_softc *sc) in ath9k_tx99_init() argument
111 struct ieee80211_hw *hw = sc->hw; in ath9k_tx99_init()
112 struct ath_hw *ah = sc->sc_ah; in ath9k_tx99_init()
123 sc->tx99_skb = ath9k_build_tx99_skb(sc); in ath9k_tx99_init()
124 if (!sc->tx99_skb) in ath9k_tx99_init()
128 txctl.txq = sc->tx.txq_map[IEEE80211_AC_VO]; in ath9k_tx99_init()
130 ath_reset(sc, NULL); in ath9k_tx99_init()
132 ath9k_ps_wakeup(sc); in ath9k_tx99_init()
135 ath_drain_all_txq(sc); in ath9k_tx99_init()
136 ath_stoprecv(sc); in ath9k_tx99_init()
138 sc->tx99_state = true; in ath9k_tx99_init()
142 if (sc->tx99_power == MAX_RATE_POWER + 1) in ath9k_tx99_init()
143 sc->tx99_power = MAX_RATE_POWER; in ath9k_tx99_init()
145 ath9k_hw_tx99_set_txpower(ah, sc->tx99_power); in ath9k_tx99_init()
146 r = ath9k_tx99_send(sc, sc->tx99_skb, &txctl); in ath9k_tx99_init()
153 sc->tx99_power, in ath9k_tx99_init()
154 sc->tx99_power / 2); in ath9k_tx99_init()
164 struct ath_softc *sc = file->private_data; in read_file_tx99() local
168 len = sprintf(buf, "%d\n", sc->tx99_state); in read_file_tx99()
175 struct ath_softc *sc = file->private_data; in write_file_tx99() local
176 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_tx99()
185 if (sc->cur_chan->nvifs > 1) in write_file_tx99()
197 mutex_lock(&sc->mutex); in write_file_tx99()
199 if (start == sc->tx99_state) { in write_file_tx99()
203 ath9k_tx99_deinit(sc); in write_file_tx99()
207 ath9k_tx99_deinit(sc); in write_file_tx99()
211 r = ath9k_tx99_init(sc); in write_file_tx99()
213 mutex_unlock(&sc->mutex); in write_file_tx99()
217 mutex_unlock(&sc->mutex); in write_file_tx99()
233 struct ath_softc *sc = file->private_data; in read_file_tx99_power() local
238 sc->tx99_power, in read_file_tx99_power()
239 sc->tx99_power / 2); in read_file_tx99_power()
248 struct ath_softc *sc = file->private_data; in write_file_tx99_power() local
259 sc->tx99_power = tx_power; in write_file_tx99_power()
261 ath9k_ps_wakeup(sc); in write_file_tx99_power()
262 ath9k_hw_tx99_set_txpower(sc->sc_ah, sc->tx99_power); in write_file_tx99_power()
263 ath9k_ps_restore(sc); in write_file_tx99_power()
276 void ath9k_tx99_init_debug(struct ath_softc *sc) in ath9k_tx99_init_debug() argument
278 if (!AR_SREV_9280_20_OR_LATER(sc->sc_ah)) in ath9k_tx99_init_debug()
282 sc->debug.debugfs_phy, sc, in ath9k_tx99_init_debug()
285 sc->debug.debugfs_phy, sc, in ath9k_tx99_init_debug()