summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMathy Vanhoef <Mathy.Vanhoef@kuleuven.be>2020-11-04 07:18:22 +0100
committerJohannes Berg <johannes.berg@intel.com>2020-11-06 11:03:43 +0100
commit70c5e40ca959ad48e932a343116a76dd78859e5e (patch)
treeeac3472bf9788c06b5fc057f6c7b89490bdd1492 /net
parentmac80211: don't overwrite QoS TID of injected frames (diff)
downloadlinux-70c5e40ca959ad48e932a343116a76dd78859e5e.tar.xz
linux-70c5e40ca959ad48e932a343116a76dd78859e5e.zip
mac80211: assure that certain drivers adhere to DONT_REORDER flag
Some drivers use skb->priority to determine on which queue to send a frame. An example is mt76x2u (this was tested on an AWUS036ACM). This means these drivers currently do not adhere to the DONT_REORDER flag. To fix this, we do not set skb->priority based on the QoS TID of injected frames when the DONT_REORDER flag is set. Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be> Link: https://lore.kernel.org/r/20201104061823.197407-5-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/tx.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8bf80b6757dc..1651cf7b2500 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2271,8 +2271,13 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
payload[7]);
}
- /* Initialize skb->priority for QoS frames */
- if (ieee80211_is_data_qos(hdr->frame_control)) {
+ /* Initialize skb->priority for QoS frames. If the DONT_REORDER flag
+ * is set, stick to the default value for skb->priority to assure
+ * frames injected with this flag are not reordered relative to each
+ * other.
+ */
+ if (ieee80211_is_data_qos(hdr->frame_control) &&
+ !(info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER)) {
u8 *p = ieee80211_get_qos_ctl(hdr);
skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK;
}