mac80211: enable QoS support for nl80211 ctrl port
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Sat, 6 Feb 2021 11:51:12 +0000 (12:51 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 12 Feb 2021 07:52:48 +0000 (08:52 +0100)
commit10cb8e617560fc050a759a897a2dde07a5fe04cb
treef680bcd0412698e9ced4184079eaa3df90a082e8
parent258afa78661178d16288537ffe8ef863c7e5918a
mac80211: enable QoS support for nl80211 ctrl port

This patch unifies sending control port frames
over nl80211 and AF_PACKET sockets a little more.

Before this patch, EAPOL frames got QoS prioritization
only when using AF_PACKET sockets.

__ieee80211_select_queue only selects a QoS-enabled queue
for control port frames, when the control port protocol
is set correctly on the skb. For the AF_PACKET path this
works, but the nl80211 path used ETH_P_802_3.

Another check for injected frames in wme.c then prevented
the QoS TID to be copied in the frame.

In order to fix this, get rid of the frame injection marking
for nl80211 ctrl port and set the correct ethernet protocol.

Please note:
An erlier version of this path tried to prevent
frame aggregation for control port frames in order to speed up
the initial connection setup a little. This seemed to cause
issues on my older Intel dvm-based hardware, and was therefore
removed again. Future commits which try to reintroduce this
have to check carefully how hw behaves with aggregated and
non-aggregated traffic for the same TID.
My NIC: Intel(R) Centrino(R) Ultimate-N 6300 AGN, REV=0x74

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20210206115112.567881-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/status.c
net/mac80211/tx.c