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 --- 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