ath9k: add fast-xmit support
PATCH 1/3 ath9k: add fast-xmit support
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/ath/ath9k/init.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath9k/init.c +1 -0
@@ -826,6 +826,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)ieee80211_hw_set (hw,SIGNAL_DBM );ieee80211_hw_set (hw,RX_INCLUDES_FCS );ieee80211_hw_set (hw,HOST_BROADCAST_PS_BUFFERING ); +ieee80211_hw_set (hw,SUPPORT_FAST_XMIT );if (ath9k_ps_enable)ieee80211_hw_set (hw,SUPPORTS_PS );
Signature · 1 line
2.2.2
PATCH 2/3 ath9k: remove struct ath_atx_ac
struct ath_atx_ac contains a list of active TIDs belonging to one WMM AC. This patch changes the code to track active station TIDs in the txq directly.
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/ath/ath9k/ath9k.h | 12 +--- drivers/net/wireless/ath/ath9k/xmit.c | 128 ++++++++++----------------------- 2 files changed, 41 insertions(+), 99 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +2 -10
@@ -173,14 +173,6 @@ struct ath_txq {struct sk_buff_head complete_q; }; -struct ath_atx_ac { -struct ath_txq *txq; -struct list_head list; -struct list_head tid_q; -bool clear_ps_filter; -bool sched; -}; -struct ath_frame_info {struct ath_buf *bf;u16 framelen;
@@ -243,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_atx_ac *ac; +struct ath_txq *txq;unsigned long tx_buf[BITS_TO_LONGS (ATH_TID_MAX_BUFS )];u16 seq_start;u16 seq_next;
@@ -255,6 +247,7 @@ struct ath_atx_tid {s8 bar_index;bool sched;bool active; +bool clear_ps_filter; };struct ath_node {
@@ -262,7 +255,6 @@ struct ath_node {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 ]; -struct ath_atx_ac ac[IEEE80211_NUM_ACS ];u16 maxampdu;u8 mpdudensity;
drivers/net/wireless/ath/ath9k/xmit.c +39 -89
308 lines not on this page · raw message
Signature · 1 line
2.2.2
PATCH 3/3 ath9k: remove the sched field in struct ath_atx_tid
In reply to Felix FietkauUse list_empty(&tid->list) instead
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 - drivers/net/wireless/ath/ath9k/xmit.c | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +0 -1
@@ -245,7 +245,6 @@ struct ath_atx_tid {int baw_tail;/* next unused tx buffer slot */ s8 bar_index; -bool sched;bool active;bool clear_ps_filter; };
drivers/net/wireless/ath/ath9k/xmit.c +8 -15
@@ -113,12 +113,9 @@ static void ath_tx_queue_tid(struct ath_softc *sc, struct ath_txq *txq,if (!ctx)return ; -if (tid->sched) -return ; - - tid->sched = true; list = &ctx->acq[TID_TO_WME_AC (tid->tidno)]; -list_add_tail (&tid->list, list); +if (list_empty (&tid->list)) +list_add_tail (&tid->list, list); }static struct ath_frame_info *get_frame_info (struct sk_buff *skb)
@@ -1541,15 +1538,14 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,ath_txq_lock (sc, txq); -if (!tid->sched) { +if (list_empty (&tid->list)) {ath_txq_unlock (sc, txq);continue ; } buffered =ath_tid_has_buffered (tid); - tid->sched = false; -list_del (&tid->list); +list_del_init (&tid->list);ath_txq_unlock (sc, txq);
@@ -1929,8 +1925,7 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)break ; tid = list_first_entry(tid_list, struct ath_atx_tid, list); -list_del (&tid->list); - tid->sched = false; +list_del_init (&tid->list);if (ath_tx_sched_aggr (sc, txq, tid, &stop)) sent = true;
@@ -2848,11 +2843,11 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an) tid->seq_start = tid->seq_next =0 ; tid->baw_size =WME_MAX_BA ; tid->baw_head = tid->baw_tail =0 ; - tid->sched = false; tid->active = false; tid->clear_ps_filter = true;__skb_queue_head_init (&tid->buf_q);__skb_queue_head_init (&tid->retry_q); +INIT_LIST_HEAD (&tid->list); acno =TID_TO_WME_AC (tidno); tid->txq = sc->tx.txq_map[acno]; }
@@ -2871,10 +2866,8 @@ void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an)ath_txq_lock (sc, txq); -if (tid->sched) { -list_del (&tid->list); - tid->sched = false; - } +if (!list_empty (&tid->list)) +list_del_init (&tid->list);ath_tid_drain (sc, txq, tid); tid->active = false;
Signature · 1 line
2.2.2
Quoted 2 lines
Signed-off-by Felix Fietkau <[email protected]>
Thanks, 3 patches applied to wireless-drivers-next.git:
f419c5f1d8d2 ath9k: add fast-xmit support592fa228f213 ath9k: remove struct ath_atx_ac d70d848a75fd ath9k: remove the sched field in struct ath_atx_tid
Kalle Valo