Skip to contentSkip to conversation

ath9k: add support for IEEE80211_TX_CTL_NO_PS_BUFFER

PATCH Superseded Felix Fietkau 1 participant 3 messages Jun 3, 2013 – Jun 4, 2013 Qualcomm Atheros ATH9K wireless driver

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ath9k: add support for IEEE80211_TX_CTL_NO_PS_BUFFER

Use the UAPSD hardware queue to get PS-Poll responses out as fast as possible and without backoff.

---
 drivers/net/wireless/ath/ath9k/ath9k.h |  1 +
 drivers/net/wireless/ath/ath9k/init.c  |  2 ++
 drivers/net/wireless/ath/ath9k/xmit.c  | 43 +++++++++++++++++++++-------------
 3 files changed, 30 insertions(+), 16 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +1 -0
index 18fcee4..4f79827 100644
@@ -296,6 +296,7 @@ struct ath_tx {
 	struct ath_txq txq[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];
 	u16 max_aggr_framelen[IEEE80211_NUM_ACS][4][32];
 };
drivers/net/wireless/ath/ath9k/init.c +2 -0
index f908dc1..21aa0519 100644
@@ -432,6 +432,8 @@ static int ath9k_init_queues(struct ath_softc *sc)
 	sc->config.cabqReadytime = ATH_CABQ_READY_TIME;
 	ath_cabq_update(sc);
 
+	sc->tx.uapsdq = ath_txq_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;
drivers/net/wireless/ath/ath9k/xmit.c +27 -16

105 lines not on this page · raw message

Signature · 1 line
1.8.0.2
#1 lore raw

PATCH v2 2/2 ath9k: implement support for .release_buffered_frames()

This adds support for PS-Poll and U-APSD driver-buffered frames (part of an aggregation session).

---
 drivers/net/wireless/ath/ath9k/ath9k.h |   5 +
 drivers/net/wireless/ath/ath9k/main.c  |   1 +
 drivers/net/wireless/ath/ath9k/xmit.c  | 162 +++++++++++++++++++++++++++------
 3 files changed, 138 insertions(+), 30 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +5 -0
index 4f79827..bd35a54 100644
@@ -354,6 +354,11 @@ void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid
 void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an);
 void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
 		       struct ath_node *an);
+void ath9k_release_buffered_frames(struct ieee80211_hw *hw,
+				   struct ieee80211_sta *sta,
+				   u16 tids, int nframes,
+				   enum ieee80211_frame_release_type reason,
+				   bool more_data);
 
 /********/
 /* VIFs */
drivers/net/wireless/ath/ath9k/main.c +1 -0
index 6c147b8..13bda4f 100644
@@ -2375,6 +2375,7 @@ struct ieee80211_ops ath9k_ops = {
 	.flush		    = ath9k_flush,
 	.tx_frames_pending  = ath9k_tx_frames_pending,
 	.tx_last_beacon     = ath9k_tx_last_beacon,
+	.release_buffered_frames = ath9k_release_buffered_frames,
 	.get_stats	    = ath9k_get_stats,
 	.set_antenna	    = ath9k_set_antenna,
 	.get_antenna	    = ath9k_get_antenna,
drivers/net/wireless/ath/ath9k/xmit.c +132 -30

244 lines not on this page · raw message

Signature · 1 line
1.8.0.2
#2 lore raw

Re: [PATCH v2 2/2] ath9k: implement support for .release_buffered_frames()

Quoted 4 lines · Felix Fietkau

This adds support for PS-Poll and U-APSD driver-buffered frames (part of an aggregation session).

Don't merge this just yet, found some issues that I need to fix first.

- Felix