From: hhorace <hhoracehsu@gmail.com>
To: gnault@redhat.com
Cc: johannes@sipsolutions.net, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kvalo@kernel.org, horms@kernel.org,
idosch@nvidia.com, hhorace <hhoracehsu@gmail.com>
Subject: [PATCH wireless-next v2] wifi: cfg80211: fix bug of mapping AF3x to incorrect User Priority
Date: Wed, 7 Aug 2024 16:22:05 +0800 [thread overview]
Message-ID: <20240807082205.1369-1-hhoracehsu@gmail.com> (raw)
In-Reply-To: <20240805071743.2112-1-hhoracehsu@gmail.com>
According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26),
AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4
and AC_VI (Video).
However, the original code remain the default three Most Significant
Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3
and AC_BE (Best Effort).
Fixes: 6fdb8b8781d5 ("wifi: cfg80211: Update the default DSCP-to-UP mapping")
Signed-off-by: hhorace <hhoracehsu@gmail.com>
---
Changes in v2:
- Remove the useless entry for CS5 (case 40) since the value of the 3
high order bits is already 5.
net/wireless/util.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 082c6f9..c6d0397 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -998,10 +998,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
* Diffserv Service Classes no update is needed:
* - Standard: DF
* - Low Priority Data: CS1
- * - Multimedia Streaming: AF31, AF32, AF33
* - Multimedia Conferencing: AF41, AF42, AF43
* - Network Control Traffic: CS7
* - Real-Time Interactive: CS4
+ * - Signaling: CS5
*/
switch (dscp >> 2) {
case 10:
@@ -1026,9 +1026,11 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
/* Broadcasting video: CS3 */
ret = 4;
break;
- case 40:
- /* Signaling: CS5 */
- ret = 5;
+ case 26:
+ case 28:
+ case 30:
+ /* Multimedia Streaming: AF31, AF32, AF33 */
+ ret = 4;
break;
case 44:
/* Voice Admit: VA */
--
2.42.0.windows.2
next prev parent reply other threads:[~2024-08-07 8:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 7:17 [PATCH] wifi: cfg80211: fix bug of mapping AF3x to incorrect User Priority hhorace
2024-08-06 9:08 ` Simon Horman
2024-08-06 11:04 ` Guillaume Nault
2024-08-07 7:24 ` Kalle Valo
2024-08-07 8:13 ` 徐郁閎
2024-08-07 11:35 ` Guillaume Nault
2024-08-07 8:22 ` hhorace [this message]
2024-08-07 11:39 ` [PATCH wireless-next v2] " Guillaume Nault
2024-08-07 14:02 ` Ido Schimmel
2024-08-21 9:10 ` Johannes Berg
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=20240807082205.1369-1-hhoracehsu@gmail.com \
--to=hhoracehsu@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).