diff mbox series

[5/5] ath9k_htc: adhere to the DONT_REORDER transmit flag

Message ID 20201104061823.197407-6-Mathy.Vanhoef@kuleuven.be (mailing list archive)
State Accepted
Commit 8a71f34bb251d59e9d577df196c450cec14773ff
Delegated to: Kalle Valo
Headers show
Series mac80211: implement DONT_REORDER radiotap flag | expand

Commit Message

Mathy Vanhoef Nov. 4, 2020, 6:18 a.m. UTC
Assure that frames with the fixed order flag are not reordered
relative to each other. This is accomplished by transmitting them
using a fixed priority independent of their QoS field.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
---
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Kalle Valo Dec. 9, 2020, 7:05 a.m. UTC | #1
Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be> wrote:

> Assure that frames with the fixed order flag are not reordered
> relative to each other. This is accomplished by transmitting them
> using a fixed priority independent of their QoS field.
> 
> Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

8a71f34bb251 ath9k_htc: adhere to the DONT_REORDER transmit flag
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 0bdc4dcb7..8e69e8989 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -297,7 +297,12 @@  static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 		tx_hdr.data_type = ATH9K_HTC_NORMAL;
 	}
 
-	if (ieee80211_is_data_qos(hdr->frame_control)) {
+	/* Transmit all frames that should not be reordered relative
+	 * to each other using the same priority. For other QoS data
+	 * frames extract the priority from the header.
+	 */
+	if (!(tx_info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER) &&
+	    ieee80211_is_data_qos(hdr->frame_control)) {
 		qc = ieee80211_get_qos_ctl(hdr);
 		tx_hdr.tidno = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
 	}