Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: drop check for DONT_REORDER in __ieee80211_select_queue

When __ieee80211_select_queue is called, skb->cb has not been cleared yet,
which means that info->control.flags can contain garbage.
In some cases this leads to IEEE80211_TX_CTRL_DONT_REORDER being set, causing
packets marked for other queues to randomly end up in BE instead.

This flag only needs to be checked in ieee80211_select_queue_80211, since
the radiotap parser is the only piece of code that sets it

Fixes: 66d06c84730c ("mac80211: adhere to Tx control flag that prevents frame reordering")
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20211110212201.35452-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Felix Fietkau and committed by
Johannes Berg
f6ab25d4 c033a38a

+1 -2
+1 -2
net/mac80211/wme.c
··· 143 143 u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 144 144 struct sta_info *sta, struct sk_buff *skb) 145 145 { 146 - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 147 146 struct mac80211_qos_map *qos_map; 148 147 bool qos; 149 148 ··· 155 156 else 156 157 qos = false; 157 158 158 - if (!qos || (info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER)) { 159 + if (!qos) { 159 160 skb->priority = 0; /* required for correct WPA/11i MIC */ 160 161 return IEEE80211_AC_BE; 161 162 }