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()
75 if (sc->tx99_vif) { in ath9k_build_tx99_skb()
76 avp = (struct ath_vif *) sc->tx99_vif->drv_priv; in ath9k_build_tx99_skb()
83 tx_info->band = sc->cur_chan->chandef.chan->band; in ath9k_build_tx99_skb()
85 tx_info->control.vif = sc->tx99_vif; in ath9k_build_tx99_skb()
98 static void ath9k_tx99_deinit(struct ath_softc *sc) in ath9k_tx99_deinit() argument
100 ath_reset(sc, NULL); in ath9k_tx99_deinit()
102 ath9k_ps_wakeup(sc); in ath9k_tx99_deinit()
103 ath9k_tx99_stop(sc); in ath9k_tx99_deinit()
104 ath9k_ps_restore(sc); in ath9k_tx99_deinit()
107 static int ath9k_tx99_init(struct ath_softc *sc) in ath9k_tx99_init() argument
109 struct ieee80211_hw *hw = sc->hw; in ath9k_tx99_init()
110 struct ath_hw *ah = sc->sc_ah; in ath9k_tx99_init()
121 sc->tx99_skb = ath9k_build_tx99_skb(sc); in ath9k_tx99_init()
122 if (!sc->tx99_skb) in ath9k_tx99_init()
126 txctl.txq = sc->tx.txq_map[IEEE80211_AC_VO]; in ath9k_tx99_init()
128 ath_reset(sc, NULL); in ath9k_tx99_init()
130 ath9k_ps_wakeup(sc); in ath9k_tx99_init()
133 ath_drain_all_txq(sc); in ath9k_tx99_init()
134 ath_stoprecv(sc); in ath9k_tx99_init()
136 sc->tx99_state = true; in ath9k_tx99_init()
140 if (sc->tx99_power == MAX_RATE_POWER + 1) in ath9k_tx99_init()
141 sc->tx99_power = MAX_RATE_POWER; in ath9k_tx99_init()
143 ath9k_hw_tx99_set_txpower(ah, sc->tx99_power); in ath9k_tx99_init()
144 r = ath9k_tx99_send(sc, sc->tx99_skb, &txctl); in ath9k_tx99_init()
151 sc->tx99_power, in ath9k_tx99_init()
152 sc->tx99_power / 2); in ath9k_tx99_init()
162 struct ath_softc *sc = file->private_data; in read_file_tx99() local
166 len = sprintf(buf, "%d\n", sc->tx99_state); in read_file_tx99()
173 struct ath_softc *sc = file->private_data; in write_file_tx99() local
174 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_tx99()
182 if (sc->cur_chan->nvifs > 1) in write_file_tx99()
189 mutex_lock(&sc->mutex); in write_file_tx99()
191 if (start == sc->tx99_state) { in write_file_tx99()
195 ath9k_tx99_deinit(sc); in write_file_tx99()
199 ath9k_tx99_deinit(sc); in write_file_tx99()
203 r = ath9k_tx99_init(sc); in write_file_tx99()
205 mutex_unlock(&sc->mutex); in write_file_tx99()
209 mutex_unlock(&sc->mutex); in write_file_tx99()
225 struct ath_softc *sc = file->private_data; in read_file_tx99_power() local
230 sc->tx99_power, in read_file_tx99_power()
231 sc->tx99_power / 2); in read_file_tx99_power()
240 struct ath_softc *sc = file->private_data; in write_file_tx99_power() local
251 sc->tx99_power = tx_power; in write_file_tx99_power()
253 ath9k_ps_wakeup(sc); in write_file_tx99_power()
254 ath9k_hw_tx99_set_txpower(sc->sc_ah, sc->tx99_power); in write_file_tx99_power()
255 ath9k_ps_restore(sc); in write_file_tx99_power()
268 void ath9k_tx99_init_debug(struct ath_softc *sc) in ath9k_tx99_init_debug() argument
270 if (!AR_SREV_9280_20_OR_LATER(sc->sc_ah)) in ath9k_tx99_init_debug()
274 sc->debug.debugfs_phy, sc, in ath9k_tx99_init_debug()
277 sc->debug.debugfs_phy, sc, in ath9k_tx99_init_debug()