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()
136 ath_drain_all_txq(sc); in ath9k_tx99_init()
137 ath_stoprecv(sc); in ath9k_tx99_init()
139 sc->tx99_state = true; in ath9k_tx99_init()
143 if (sc->tx99_power == MAX_RATE_POWER + 1) in ath9k_tx99_init()
144 sc->tx99_power = MAX_RATE_POWER; in ath9k_tx99_init()
146 ath9k_hw_tx99_set_txpower(ah, sc->tx99_power); in ath9k_tx99_init()
147 r = ath9k_tx99_send(sc, sc->tx99_skb, &txctl); in ath9k_tx99_init()
154 sc->tx99_power, in ath9k_tx99_init()
155 sc->tx99_power / 2); in ath9k_tx99_init()
165 struct ath_softc *sc = file->private_data; in read_file_tx99() local
169 len = sprintf(buf, "%d\n", sc->tx99_state); in read_file_tx99()
176 struct ath_softc *sc = file->private_data; in write_file_tx99() local
177 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_tx99()
183 if (sc->cur_chan->nvifs > 1) in write_file_tx99()
193 if (start == sc->tx99_state) { in write_file_tx99()
197 ath9k_tx99_deinit(sc); in write_file_tx99()
201 ath9k_tx99_deinit(sc); in write_file_tx99()
205 r = ath9k_tx99_init(sc); in write_file_tx99()
224 struct ath_softc *sc = file->private_data; in read_file_tx99_power() local
229 sc->tx99_power, in read_file_tx99_power()
230 sc->tx99_power / 2); in read_file_tx99_power()
239 struct ath_softc *sc = file->private_data; in write_file_tx99_power() local
250 sc->tx99_power = tx_power; in write_file_tx99_power()
252 ath9k_ps_wakeup(sc); in write_file_tx99_power()
253 ath9k_hw_tx99_set_txpower(sc->sc_ah, sc->tx99_power); in write_file_tx99_power()
254 ath9k_ps_restore(sc); in write_file_tx99_power()
267 void ath9k_tx99_init_debug(struct ath_softc *sc) in ath9k_tx99_init_debug() argument
269 if (!AR_SREV_9300_20_OR_LATER(sc->sc_ah)) in ath9k_tx99_init_debug()
273 sc->debug.debugfs_phy, sc, in ath9k_tx99_init_debug()
276 sc->debug.debugfs_phy, sc, in ath9k_tx99_init_debug()