From: Andrei-Alexandru Bleortu <me@andrei-z.com>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: <ath11k@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<linux-wireless@vger.kernel.org>
Subject: [PATCH ath-next 5/5] wifi: ath11k: map DSCP to TID as cfg80211 does by default
Date: Sun, 4 Oct 2026 14:18:07 +0300 [thread overview]
Message-ID: <23e008aae70cc20169686c84f61139237fa1eb6e.1791111135.git.me@andrei-z.com> (raw)
In-Reply-To: <cover.1791111135.2.git.me@andrei-z.com>
Where the hardware classifies frames by their DSCP, it takes the TID
from the DSCP-TID tables ath11k programs, all of them with the DSCP's
class selector bits. cfg80211, which classifies the frames mac80211
queues, follows RFC 8325 section 4 instead (commit 6fdb8b8781d5
("wifi: cfg80211: Update the default DSCP-to-UP mapping")), as does
Wi-Fi QoS Management. The two disagree for AF1x and CS2 (UP 0, not 1
and 2), AF2x (UP 3, best effort, not 2, background), CS3 and AF3x (UP 4,
not 3), VA and EF (UP 6, voice, not 5, video) and CS6 (UP 7, not 6).
Program the tables with cfg80211's default mapping.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
Assisted-by: LLM
Signed-off-by: Andrei-Alexandru Bleortu <me@andrei-z.com>
---
drivers/net/wireless/ath/ath11k/hal_tx.c | 30 ++++++++++++------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.c b/drivers/net/wireless/ath/ath11k/hal_tx.c
index b7e9b1cdd7..c42d9d4f53 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
@@ -11,26 +11,26 @@
#define DSCP_TID_MAP_TBL_ENTRY_SIZE 64
-/* dscp_tid_map - Default DSCP-TID mapping
+/* dscp_tid_map - Default DSCP-TID mapping, the one cfg80211_classify8021d()
+ * uses without a QoS map: the DSCP's class selector bits, except where RFC 8325
+ * section 4 maps the DiffServ service class differently.
*
- * DSCP TID
- * 000000 0
- * 001000 1
- * 010000 2
- * 011000 3
- * 100000 4
- * 101000 5
- * 110000 6
- * 111000 7
+ * DSCP TID
+ * AF11-13, CS2 0
+ * AF21-23 3
+ * CS3, AF31-33 4
+ * VA, EF 6
+ * CS6 7
+ * any other DSCP >> 3
*/
static const u8 dscp_tid_map[DSCP_TID_MAP_TBL_ENTRY_SIZE] = {
0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 3, 3, 3, 3, 3, 3,
+ 1, 1, 0, 1, 0, 1, 0, 1,
+ 0, 2, 3, 2, 3, 2, 3, 2,
+ 4, 3, 4, 3, 4, 3, 4, 3,
4, 4, 4, 4, 4, 4, 4, 4,
- 5, 5, 5, 5, 5, 5, 5, 5,
- 6, 6, 6, 6, 6, 6, 6, 6,
+ 5, 5, 5, 5, 6, 5, 6, 5,
+ 7, 6, 6, 6, 6, 6, 6, 6,
7, 7, 7, 7, 7, 7, 7, 7,
};
--
2.47.3
prev parent reply other threads:[~2026-10-04 11:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 11:18 [PATCH ath-next 0/5] wifi: ath11k: WMI services debugfs and HE AP fixes Andrei-Alexandru Bleortu
2026-10-04 11:18 ` [PATCH ath-next 1/5] wifi: ath11k: add a debugfs file listing the firmware WMI services Andrei-Alexandru Bleortu
2026-10-04 11:18 ` [PATCH ath-next 2/5] wifi: ath11k: count down channel switch announcements in mac80211 Andrei-Alexandru Bleortu
2026-10-04 11:18 ` [PATCH ath-next 3/5] wifi: ath11k: leave OBSS PD off when spatial reuse is not configured Andrei-Alexandru Bleortu
2026-10-04 11:18 ` [PATCH ath-next 4/5] wifi: ath11k: set the 6 GHz transmit power limits of an AP Andrei-Alexandru Bleortu
2026-10-04 11:18 ` Andrei-Alexandru Bleortu [this message]
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=23e008aae70cc20169686c84f61139237fa1eb6e.1791111135.git.me@andrei-z.com \
--to=me@andrei-z.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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®