ath9k: use mac80211 intermediate software queues
Subsystems (3)
PATCH 2/2 ath9k: use mac80211 intermediate software queues
This patch leaves the code for ath9k's internal per-node per-tid queues in place and just modifies the driver to also pull from the new mac80211 intermediate software queues, and implements the .wake_tx_queue method, which will cause mac80211 to deliver packets to be sent via the new intermediate queue.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 16 +++- drivers/net/wireless/ath/ath9k/debug_sta.c | 8 +- drivers/net/wireless/ath/ath9k/init.c | 1 + drivers/net/wireless/ath/ath9k/main.c | 1 + drivers/net/wireless/ath/ath9k/xmit.c | 122 ++++++++++++++++++++++++---- 5 files changed, 129 insertions(+), 19 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +13 -3
@@ -145,8 +145,6 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,#define BAW_WITHIN (_start, _bawsz, _seqno) \ ((((_seqno) - (_start)) & 4095) < (_bawsz)) -#define ATH_AN_2_TID (_an, _tidno) (&(_an)->tid[(_tidno)]) -#define IS_HT_RATE (rate) (rate & 0x80)#define IS_CCK_RATE (rate) ((rate >= 0x18) && (rate <= 0x1e))#define IS_OFDM_RATE (rate) ((rate >= 0x8) && (rate <= 0xf))
@@ -232,8 +230,10 @@ struct ath_buf {struct ath_atx_tid {struct list_head list; +struct sk_buff_head i_q;struct sk_buff_head buf_q;struct sk_buff_head retry_q; +struct ieee80211_txq *txq;struct ath_node *an;struct ath_hwq *hwq;unsigned long tx_buf[BITS_TO_LONGS (ATH_TID_MAX_BUFS )];
@@ -247,13 +247,13 @@ struct ath_atx_tid {s8 bar_index;bool active;bool clear_ps_filter; +bool txq_nonempty; };struct ath_node {struct ath_softc *sc;struct ieee80211_sta *sta;/* station struct we're part of */ struct ieee80211_vif *vif;/* interface with which we're associated */ -struct ath_atx_tid tid[IEEE80211_NUM_TIDS ];u16 maxampdu;u8 mpdudensity;
@@ -271,6 +271,15 @@ struct ath_node {struct list_head list; }; +static inline +struct ath_atx_tid *ath_an_2_tid (struct ath_node *an,u8 tidno) +{ +struct ieee80211_sta *sta = an->sta; +struct ieee80211_vif *vif = an->vif; +struct ieee80211_txq *txq = sta? sta->txq[tidno] : vif->txq; +return (struct ath_atx_tid *) txq->drv_priv; +} +struct ath_tx_control {struct ath_hwq *hwq;struct ath_node *an;
@@ -585,6 +594,7 @@ void ath9k_release_buffered_frames(struct ieee80211_hw *hw, u16 tids, int nframes, enum ieee80211_frame_release_type reason, bool more_data); +void ath9k_wake_tx_queue (struct ieee80211_hw *hw,struct ieee80211_txq *txq);/********/ /* VIFs */
drivers/net/wireless/ath/ath9k/debug_sta.c +6 -2
@@ -25,6 +25,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 ieee80211_txq *txq;struct ath_atx_tid *tid;struct ath_hwq *hwq;u32 len =0 , size =4096 ;
@@ -52,8 +53,11 @@ static ssize_t read_file_node_aggr(struct file *file, char __user *user_buf,"TID" ,"SEQ_START" ,"SEQ_NEXT" ,"BAW_SIZE" , "BAW_HEAD", "BAW_TAIL", "BAR_IDX", "SCHED", "PAUSED"); -for (tidno =0 , tid = &an->tid[tidno]; - tidno <IEEE80211_NUM_TIDS ; tidno++, tid++) { +for (tidno =0 ; + tidno <IEEE80211_NUM_TIDS ; tidno++) { + + txq = an->sta->txq[tidno]; + tid = (struct ath_atx_tid *) txq->drv_priv; hwq = tid->hwq;ath_hwq_lock (sc, hwq);if (tid->active) {
drivers/net/wireless/ath/ath9k/init.c +1 -0
@@ -882,6 +882,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) hw->max_rate_tries =10 ; hw->sta_data_size =sizeof (struct ath_node ); hw->vif_data_size =sizeof (struct ath_vif ); + hw->txq_data_size =sizeof (struct ath_atx_tid ); hw->extra_tx_headroom =4 ; hw->wiphy->available_antennas_rx =BIT (ah->caps.max_rxchains) -1 ;
drivers/net/wireless/ath/ath9k/main.c +1 -0
@@ -2668,4 +2668,5 @@ struct ieee80211_ops ath9k_ops = { .sw_scan_start = ath9k_sw_scan_start, .sw_scan_complete = ath9k_sw_scan_complete, .get_txpower = ath9k_get_txpower, + .wake_tx_queue = ath9k_wake_tx_queue, };
drivers/net/wireless/ath/ath9k/xmit.c +108 -14
243 lines not on this page · raw message
Signature · 1 line
1.7.10.4