mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Hainke <vincent@systemli.org>
To: Johannes Berg <johannes@sipsolutions.net>,
	Miri Korenblit <miriam.rachel.korenblit@intel.com>,
	Gregory Greenman <gregory.greenman@intel.com>,
	Ilan Peer <ilan.peer@intel.com>
Cc: Nick Hainke <vincent@systemli.org>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH wireless-next] wifi: cfg80211: map LE DSCP to UP 1
Date: Fri, 16 Oct 2026 21:42:48 +0200	[thread overview]
Message-ID: <20261016194248.3508952-1-vincent@systemli.org> (raw)

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


                 reply	other threads:[~2026-10-16 19:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261016194248.3508952-1-vincent@systemli.org \
    --to=vincent@systemli.org \
    --cc=gregory.greenman@intel.com \
    --cc=ilan.peer@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®