ath9k: rename struct ath_txq to struct ath_hwq
Subsystems (3)
PATCH 1/2 ath9k: rename struct ath_txq to struct ath_hwq
Also use hwq instead of txq to refer to it throughout ath9k/*. This is prep work for using mac80211's new intermediate queues, which are called txq, and it would be too confusing if both are called txq.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 50 +-- drivers/net/wireless/ath/ath9k/beacon.c | 10 +- drivers/net/wireless/ath/ath9k/debug.c | 34 +- drivers/net/wireless/ath/ath9k/debug.h | 8 +- drivers/net/wireless/ath/ath9k/debug_sta.c | 8 +- drivers/net/wireless/ath/ath9k/gpio.c | 6 +- drivers/net/wireless/ath/ath9k/init.c | 18 +- drivers/net/wireless/ath/ath9k/link.c | 18 +- drivers/net/wireless/ath/ath9k/main.c | 42 +-- drivers/net/wireless/ath/ath9k/xmit.c | 512 ++++++++++++++-------------- 10 files changed, 353 insertions(+), 353 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +25 -25
@@ -80,7 +80,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,/* RX / TX */ /***********/ -#define ATH_TXQ_SETUP (sc, i) ((sc)->tx.txqsetup & (1<<i)) +#define ATH_HWQ_SETUP (sc, i) ((sc)->tx.hwqsetup & (1<<i))/* increment with wrap-around */ #define INCR (_l, _sz) do { \
@@ -156,7 +156,7 @@ enum { WLAN_RC_PHY_CCK, }; -struct ath_txq { +struct ath_hwq {int mac80211_qnum;/* mac80211 queue number, -1 means not mac80211 Q */ u32 axq_qnum;/* ath9k hardware queue number */ void *axq_link;
@@ -166,9 +166,9 @@ struct ath_txq {u32 axq_ampdu_depth;bool stopped;bool axq_tx_inprogress; -struct list_head txq_fifo[ATH_TXFIFO_DEPTH ]; -u8 txq_headidx; -u8 txq_tailidx; +struct list_head hwq_fifo[ATH_TXFIFO_DEPTH ]; +u8 hwq_headidx; +u8 hwq_tailidx;int pending_frames;struct sk_buff_head complete_q; };
@@ -176,7 +176,7 @@ struct ath_txq {struct ath_frame_info {struct ath_buf *bf;u16 framelen; -s8 txq; +s8 hwq;u8 keyix;u8 rtscts_rate;u8 retries :7 ;
@@ -235,7 +235,7 @@ struct ath_atx_tid {struct sk_buff_head buf_q;struct sk_buff_head retry_q;struct ath_node *an; -struct ath_txq *txq; +struct ath_hwq *hwq;unsigned long tx_buf[BITS_TO_LONGS (ATH_TID_MAX_BUFS )];u16 seq_start;u16 seq_next;
@@ -272,7 +272,7 @@ struct ath_node { };struct ath_tx_control { -struct ath_txq *txq; +struct ath_hwq *hwq;struct ath_node *an;struct ieee80211_sta *sta;u8 paprd;
@@ -281,19 +281,19 @@ struct ath_tx_control {/** -* @txq_map: Index is mac80211 queue number. This is +* @hwq_map: Index is mac80211 queue number. This is * not necessarily the same as the hardware queue number * (axq_qnum). */ struct ath_tx { -u32 txqsetup; +u32 hwqsetup;spinlock_t txbuflock;struct list_head txbuf; -struct ath_txq txq[ATH9K_NUM_TX_QUEUES ]; +struct ath_hwq hwq[ATH9K_NUM_TX_QUEUES ];struct ath_descdma txdma; -struct ath_txq *txq_map[IEEE80211_NUM_ACS ]; -struct ath_txq *uapsdq; -u32 txq_max_pending[IEEE80211_NUM_ACS ]; +struct ath_hwq *hwq_map[IEEE80211_NUM_ACS ]; +struct ath_hwq *uapsdq; +u32 hwq_max_pending[IEEE80211_NUM_ACS ];u16 max_aggr_framelen[IEEE80211_NUM_ACS ][4 ][32 ]; };
@@ -550,19 +550,19 @@ u32 ath_calcrxfilter(struct ath_softc *sc);int ath_rx_init (struct ath_softc *sc,int nbufs);void ath_rx_cleanup (struct ath_softc *sc);int ath_rx_tasklet (struct ath_softc *sc,int flush,bool hp); -struct ath_txq *ath_txq_setup (struct ath_softc *sc,int qtype,int subtype); -void ath_txq_lock (struct ath_softc *sc,struct ath_txq *txq); -void ath_txq_unlock (struct ath_softc *sc,struct ath_txq *txq); -void ath_txq_unlock_complete (struct ath_softc *sc,struct ath_txq *txq); -void ath_tx_cleanupq (struct ath_softc *sc,struct ath_txq *txq); -bool ath_drain_all_txq (struct ath_softc *sc); -void ath_draintxq (struct ath_softc *sc,struct ath_txq *txq); +struct ath_hwq *ath_hwq_setup (struct ath_softc *sc,int qtype,int subtype); +void ath_hwq_lock (struct ath_softc *sc,struct ath_hwq *hwq); +void ath_hwq_unlock (struct ath_softc *sc,struct ath_hwq *hwq); +void ath_hwq_unlock_complete (struct ath_softc *sc,struct ath_hwq *hwq); +void ath_tx_cleanupq (struct ath_softc *sc,struct ath_hwq *hwq); +bool ath_drain_all_hwq (struct ath_softc *sc); +void ath_drainhwq (struct ath_softc *sc,struct ath_hwq *hwq);void ath_tx_node_init (struct ath_softc *sc,struct ath_node *an);void ath_tx_node_cleanup (struct ath_softc *sc,struct ath_node *an); -void ath_txq_schedule (struct ath_softc *sc,struct ath_txq *txq); -void ath_txq_schedule_all (struct ath_softc *sc); +void ath_hwq_schedule (struct ath_softc *sc,struct ath_hwq *hwq); +void ath_hwq_schedule_all (struct ath_softc *sc);int ath_tx_init (struct ath_softc *sc,int nbufs); -int ath_txq_update (struct ath_softc *sc,int qnum, +int ath_hwq_update (struct ath_softc *sc,int qnum,struct ath9k_tx_queue_info *q);void ath_update_max_aggr_framelen (struct ath_softc *sc,int queue,int txop);void ath_assign_seq (struct ath_common *common,struct sk_buff *skb);
@@ -677,7 +677,7 @@ struct ath_beacon {int slottime;int slotupdate;struct ath_descdma bdma; -struct ath_txq *cabq; +struct ath_hwq *cabq;struct list_head bbuf;bool tx_processed;
drivers/net/wireless/ath/ath9k/beacon.c +5 -5
@@ -35,7 +35,7 @@ static void ath9k_beaconq_config(struct ath_softc *sc)struct ath_hw *ah = sc->sc_ah;struct ath_common *common =ath9k_hw_common (ah);struct ath9k_tx_queue_info qi, qi_be; -struct ath_txq *txq; +struct ath_hwq *hwq;ath9k_hw_get_txq_props (ah, sc->beacon.beaconq, &qi);
@@ -47,8 +47,8 @@ static void ath9k_beaconq_config(struct ath_softc *sc) qi.tqi_cwmax =0 ; }else {/* Adhoc mode; important thing is to use 2x cwmin. */ - txq = sc->tx.txq_map[IEEE80211_AC_BE ]; -ath9k_hw_get_txq_props (ah, txq->axq_qnum, &qi_be); + hwq = sc->tx.hwq_map[IEEE80211_AC_BE ]; +ath9k_hw_get_txq_props (ah, hwq->axq_qnum, &qi_be); qi.tqi_aifs = qi_be.tqi_aifs;if (ah->slottime ==ATH9K_SLOT_TIME_20 ) qi.tqi_cwmin =2 *qi_be.tqi_cwmin;
@@ -117,7 +117,7 @@ static struct ath_buf *ath9k_beacon_generate(struct ieee80211_hw *hw,struct ath_buf *bf;struct ath_vif *avp = (void *)vif->drv_priv;struct sk_buff *skb; -struct ath_txq *cabq = sc->beacon.cabq; +struct ath_hwq *cabq = sc->beacon.cabq;struct ieee80211_tx_info *info;struct ieee80211_mgmt *mgmt_hdr;int cabq_depth;
@@ -180,7 +180,7 @@ static struct ath_buf *ath9k_beacon_generate(struct ieee80211_hw *hw,if (sc->cur_chan->nvifs >1 ) {ath_dbg (common,BEACON ,"Flushing previous cabq traffic\n" ); -ath_draintxq (sc, cabq); +ath_drainhwq (sc, cabq); } }
drivers/net/wireless/ath/ath9k/debug.c +17 -17
@@ -621,34 +621,34 @@ static int read_file_xmit(struct seq_file *file, void *data)return 0 ; } -static void print_queue (struct ath_softc *sc,struct ath_txq *txq, +static void print_queue (struct ath_softc *sc,struct ath_hwq *hwq,struct seq_file *file) { -ath_txq_lock (sc, txq); +ath_hwq_lock (sc, hwq); -seq_printf (file,"%s: %d " ,"qnum" , txq->axq_qnum); -seq_printf (file,"%s: %2d " ,"qdepth" , txq->axq_depth); -seq_printf (file,"%s: %2d " ,"ampdu-depth" , txq->axq_ampdu_depth); -seq_printf (file,"%s: %3d " ,"pending" , txq->pending_frames); -seq_printf (file,"%s: %d\n" ,"stopped" , txq->stopped); +seq_printf (file,"%s: %d " ,"qnum" , hwq->axq_qnum); +seq_printf (file,"%s: %2d " ,"qdepth" , hwq->axq_depth); +seq_printf (file,"%s: %2d " ,"ampdu-depth" , hwq->axq_ampdu_depth); +seq_printf (file,"%s: %3d " ,"pending" , hwq->pending_frames); +seq_printf (file,"%s: %d\n" ,"stopped" , hwq->stopped); -ath_txq_unlock (sc, txq); +ath_hwq_unlock (sc, hwq); }static int read_file_queues (struct seq_file *file,void *data) {struct ieee80211_hw *hw =dev_get_drvdata (file->private);struct ath_softc *sc = hw->priv; -struct ath_txq *txq; +struct ath_hwq *hwq;int i;static const char *qname[4 ] = {"VO" ,"VI" ,"BE" ,"BK" };for (i =0 ; i <IEEE80211_NUM_ACS ; i++) { - txq = sc->tx.txq_map[i]; + hwq = sc->tx.hwq_map[i];seq_printf (file,"(%s): " , qname[i]); -print_queue (sc, txq, file); +print_queue (sc, hwq, file); }seq_puts (file,"(CAB): " );
@@ -782,10 +782,10 @@ static int read_file_reset(struct seq_file *file, void *data) }void ath_debug_stat_tx (struct ath_softc *sc,struct ath_buf *bf, -struct ath_tx_status *ts,struct ath_txq *txq, +struct ath_tx_status *ts,struct ath_hwq *hwq,unsigned int flags) { -int qnum = txq->axq_qnum; +int qnum = hwq->axq_qnum;TX_STAT_INC (qnum, tx_pkts_all); sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len;
@@ -1329,13 +1329,13 @@ int ath9k_init_debug(struct ath_hw *ah)debugfs_create_devm_seqfile (sc->dev,"queues" , sc->debug.debugfs_phy, read_file_queues);debugfs_create_u32 ("qlen_bk" ,S_IRUSR |S_IWUSR , sc->debug.debugfs_phy, - &sc->tx.txq_max_pending[IEEE80211_AC_BK ]); + &sc->tx.hwq_max_pending[IEEE80211_AC_BK ]);debugfs_create_u32 ("qlen_be" ,S_IRUSR |S_IWUSR , sc->debug.debugfs_phy, - &sc->tx.txq_max_pending[IEEE80211_AC_BE ]); + &sc->tx.hwq_max_pending[IEEE80211_AC_BE ]);debugfs_create_u32 ("qlen_vi" ,S_IRUSR |S_IWUSR , sc->debug.debugfs_phy, - &sc->tx.txq_max_pending[IEEE80211_AC_VI ]); + &sc->tx.hwq_max_pending[IEEE80211_AC_VI ]);debugfs_create_u32 ("qlen_vo" ,S_IRUSR |S_IWUSR , sc->debug.debugfs_phy, - &sc->tx.txq_max_pending[IEEE80211_AC_VO ]); + &sc->tx.hwq_max_pending[IEEE80211_AC_VO ]);debugfs_create_devm_seqfile (sc->dev,"misc" , sc->debug.debugfs_phy, read_file_misc); debugfs_create_devm_seqfile(sc->dev, "reset", sc->debug.debugfs_phy,
drivers/net/wireless/ath/ath9k/debug.h +4 -4
@@ -20,7 +20,7 @@#include "hw.h" #include "dfs_debug.h" -struct ath_txq ; +struct ath_hwq ;struct ath_buf ;struct fft_sample_tlv ;
@@ -194,7 +194,7 @@ struct ath_tx_stats {/* * Various utility macros to print TX/Queue counters. */ -#define PR_QNUM (_n) sc->tx.txq_map[_n]->axq_qnum +#define PR_QNUM (_n) sc->tx.hwq_map[_n]->axq_qnum#define TXSTATS sc->debug.stats.txstats#define PR (str, elem) \ do { \
@@ -253,7 +253,7 @@ void ath9k_deinit_debug(struct ath_softc *sc);void ath_debug_stat_interrupt (struct ath_softc *sc,enum ath9k_int status);void ath_debug_stat_tx (struct ath_softc *sc,struct ath_buf *bf, -struct ath_tx_status *ts,struct ath_txq *txq, +struct ath_tx_status *ts,struct ath_hwq *hwq,unsigned int flags);void ath_debug_stat_rx (struct ath_softc *sc,struct ath_rx_status *rs); int ath9k_get_et_sset_count(struct ieee80211_hw *hw,
@@ -290,7 +290,7 @@ static inline void ath_debug_stat_interrupt(struct ath_softc *sc,static inline void ath_debug_stat_tx (struct ath_softc *sc,struct ath_buf *bf,struct ath_tx_status *ts, -struct ath_txq *txq, +struct ath_hwq *hwq,unsigned int flags) { }
drivers/net/wireless/ath/ath9k/debug_sta.c +4 -4
@@ -26,7 +26,7 @@ static ssize_t read_file_node_aggr(struct file *file, char __user *user_buf,struct ath_node *an = file->private_data;struct ath_softc *sc = an->sc;struct ath_atx_tid *tid; -struct ath_txq *txq; +struct ath_hwq *hwq;u32 len =0 , size =4096 ;char *buf;size_t retval;
@@ -54,8 +54,8 @@ static ssize_t read_file_node_aggr(struct file *file, char __user *user_buf,for (tidno =0 , tid = &an->tid[tidno]; tidno <IEEE80211_NUM_TIDS ; tidno++, tid++) { - txq = tid->txq; -ath_txq_lock (sc, txq); + hwq = tid->hwq; +ath_hwq_lock (sc, hwq);if (tid->active) { len += scnprintf(buf + len, size - len, "%3d%11d%10d%10d%10d%10d%9d%6d\n",
@@ -68,7 +68,7 @@ static ssize_t read_file_node_aggr(struct file *file, char __user *user_buf, tid->bar_index, !list_empty(&tid->list)); } -ath_txq_unlock (sc, txq); +ath_hwq_unlock (sc, hwq); } exit: retval =simple_read_from_buffer (user_buf, count, ppos, buf, len);
drivers/net/wireless/ath/ath9k/gpio.c +3 -3
@@ -406,7 +406,7 @@ void ath9k_deinit_btcoex(struct ath_softc *sc)int ath9k_init_btcoex (struct ath_softc *sc) { -struct ath_txq *txq; +struct ath_hwq *hwq;struct ath_hw *ah = sc->sc_ah;int r;
@@ -421,8 +421,8 @@ int ath9k_init_btcoex(struct ath_softc *sc)case ATH_BTCOEX_CFG_3WIRE :ath9k_hw_btcoex_init_3wire (sc->sc_ah);ath_init_btcoex_timer (sc); - txq = sc->tx.txq_map[IEEE80211_AC_BE ]; -ath9k_hw_init_btcoex_hw (sc->sc_ah, txq->axq_qnum); + hwq = sc->tx.hwq_map[IEEE80211_AC_BE ]; +ath9k_hw_init_btcoex_hw (sc->sc_ah, hwq->axq_qnum);break ;case ATH_BTCOEX_CFG_MCI :ath_init_btcoex_timer (sc);
drivers/net/wireless/ath/ath9k/init.c +9 -9
@@ -346,15 +346,15 @@ static int ath9k_init_queues(struct ath_softc *sc)int i =0 ; sc->beacon.beaconq =ath9k_hw_beaconq_setup (sc->sc_ah); - sc->beacon.cabq =ath_txq_setup (sc,ATH9K_TX_QUEUE_CAB ,0 ); + sc->beacon.cabq =ath_hwq_setup (sc,ATH9K_TX_QUEUE_CAB ,0 );ath_cabq_update (sc); - sc->tx.uapsdq =ath_txq_setup (sc,ATH9K_TX_QUEUE_UAPSD ,0 ); + sc->tx.uapsdq =ath_hwq_setup (sc,ATH9K_TX_QUEUE_UAPSD ,0 );for (i =0 ; i <IEEE80211_NUM_ACS ; i++) { - sc->tx.txq_map[i] =ath_txq_setup (sc,ATH9K_TX_QUEUE_DATA , i); - sc->tx.txq_map[i]->mac80211_qnum = i; - sc->tx.txq_max_pending[i] =ATH_MAX_QDEPTH ; + sc->tx.hwq_map[i] =ath_hwq_setup (sc,ATH9K_TX_QUEUE_DATA , i); + sc->tx.hwq_map[i]->mac80211_qnum = i; + sc->tx.hwq_max_pending[i] =ATH_MAX_QDEPTH ; }return 0 ; }
@@ -671,8 +671,8 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, err_btcoex:for (i =0 ; i <ATH9K_NUM_TX_QUEUES ; i++) -if (ATH_TXQ_SETUP (sc, i)) -ath_tx_cleanupq (sc, &sc->tx.txq[i]); +if (ATH_HWQ_SETUP (sc, i)) +ath_tx_cleanupq (sc, &sc->tx.hwq[i]); err_queues:ath9k_hw_deinit (ah); err_hw:
@@ -1001,8 +1001,8 @@ static void ath9k_deinit_softc(struct ath_softc *sc)ath9k_deinit_btcoex (sc);for (i =0 ; i <ATH9K_NUM_TX_QUEUES ; i++) -if (ATH_TXQ_SETUP (sc, i)) -ath_tx_cleanupq (sc, &sc->tx.txq[i]); +if (ATH_HWQ_SETUP (sc, i)) +ath_tx_cleanupq (sc, &sc->tx.hwq[i]);del_timer_sync (&sc->sleep_timer);ath9k_hw_deinit (sc->sc_ah);
drivers/net/wireless/ath/ath9k/link.c +9 -9
@@ -24,7 +24,7 @@ void ath_tx_complete_poll_work(struct work_struct *work) { struct ath_softc *sc = container_of(work, struct ath_softc, tx_complete_work.work); -struct ath_txq *txq; +struct ath_hwq *hwq;int i;bool needreset = false;
@@ -36,19 +36,19 @@ void ath_tx_complete_poll_work(struct work_struct *work) }for (i =0 ; i <IEEE80211_NUM_ACS ; i++) { - txq = sc->tx.txq_map[i]; + hwq = sc->tx.hwq_map[i]; -ath_txq_lock (sc, txq); -if (txq->axq_depth) { -if (txq->axq_tx_inprogress) { +ath_hwq_lock (sc, hwq); +if (hwq->axq_depth) { +if (hwq->axq_tx_inprogress) { needreset = true; -ath_txq_unlock (sc, txq); +ath_hwq_unlock (sc, hwq);break ; }else { - txq->axq_tx_inprogress = true; + hwq->axq_tx_inprogress = true; } } -ath_txq_unlock (sc, txq); +ath_hwq_unlock (sc, hwq); }if (needreset) {
@@ -175,7 +175,7 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, intunsigned long time_left;memset (&txctl,0 ,sizeof (txctl)); - txctl.txq = sc->tx.txq_map[IEEE80211_AC_BE ]; + txctl.hwq = sc->tx.hwq_map[IEEE80211_AC_BE ];memset (tx_info,0 ,sizeof (*tx_info)); tx_info->band = sc->cur_chandef.chan->band;
drivers/net/wireless/ath/ath9k/main.c +21 -21
134 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/xmit.c +256 -256
1,316 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Quoted 3 lines · Tim Shepard
Also use hwq instead of txq to refer to it throughout ath9k/*. This is prep work for using mac80211's new intermediate queues, which are called txq, and it would be too confusing if both are called txq.
You should add Signed-off-by to both patches in case someone else wants to work with these.
Signature · 5 lines
Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html