ath9k_htc: adhere to the DONT_REORDER transmit flag
authorMathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Wed, 4 Nov 2020 06:18:23 +0000 (10:18 +0400)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Dec 2020 07:05:20 +0000 (09:05 +0200)
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>
Link: https://lore.kernel.org/r/20201104061823.197407-6-Mathy.Vanhoef@kuleuven.be
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c

index 0bdc4dcb7b8fee33dadcf97bab27fd66600eefed..8e69e8989f6d343337218b7b6ea3de2f1061d5cc 100644 (file)
@@ -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;
        }