* [PATCH wireless-next] wifi: cfg80211: map LE DSCP to UP 1
@ 2026-10-16 19:42 Nick Hainke
0 siblings, 0 replies; only message in thread
From: Nick Hainke @ 2026-10-16 19:42 UTC (permalink / raw)
To: Johannes Berg, Miri Korenblit, Gregory Greenman, Ilan Peer
Cc: Nick Hainke, linux-wireless, linux-kernel
RFC 8622 [1] updates RFC 8325 [2] and recommends to map Low-Priority
Data marked with the Lower Effort DSCP (LE, 000001, 1) to User
Priority 1 and AC_BK (Background), the same as the legacy CS1 marking.
cfg80211_classify8021d() takes the three most significant bits of the
DSCP as User Priority and corrects some DSCP values in a switch
statement afterwards. LE is not handled there. For LE the DS field
without the ECN bits is 0x04, so:
ret = dscp >> 5; /* 0x04 >> 5 = 0 */
switch (dscp >> 2) /* 0x04 >> 2 = 1, no case for 1 */
As a result, LE ends up in User Priority 0 and AC_BE (Best Effort)
instead of User Priority 1 and AC_BK. Add a case for LE to the switch
statement.
OpenWrt already sets a QoS Map by default that maps LE to User
Priority 1 [3].
[1] https://www.rfc-editor.org/rfc/rfc8622#section-11
[2] https://www.rfc-editor.org/rfc/rfc8325#section-4.2.10
[3] https://github.com/openwrt/openwrt/commit/a5e3def18224
Fixes: 6fdb8b8781d5 ("wifi: cfg80211: Update the default DSCP-to-UP mapping")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Nick Hainke <vincent@systemli.org>
---
net/wireless/util.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 59912f4a93c8..3f8648b94179 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1154,13 +1154,17 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
* value. See section 4 in RFC8325. Specifically, for the following
* Diffserv Service Classes no update is needed:
* - Standard: DF
- * - Low Priority Data: CS1
+ * - Low Priority Data: CS1 (legacy)
* - Multimedia Conferencing: AF41, AF42, AF43
* - Network Control Traffic: CS7
* - Real-Time Interactive: CS4
* - Signaling: CS5
*/
switch (dscp >> 2) {
+ case 1:
+ /* Low Priority Data: LE, see section 11 in RFC8622 */
+ ret = 1;
+ break;
case 10:
case 12:
case 14:
--
2.56.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-16 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 19:42 [PATCH wireless-next] wifi: cfg80211: map LE DSCP to UP 1 Nick Hainke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®