public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests: Modify the QoS mapping tests
@ 2023-12-13 11:37 Andrei Otcheretianski
  2023-12-23 10:40 ` Jouni Malinen
  0 siblings, 1 reply; 4+ messages in thread
From: Andrei Otcheretianski @ 2023-12-13 11:37 UTC (permalink / raw)
  To: hostap; +Cc: johannes, linux-wireless, Ilan Peer

From: Ilan Peer <ilan.peer@intel.com>

The cfg80211 default QoS mapping was updated to align
with the recommendations in section 4 in RFC8325. Align the QoS
mapping test accordingly.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
This patch depends on the corresponding pending kernel change:
https://patchwork.kernel.org/project/linux-wireless/patch/20231211085121.8a1c7d1f0034.I50aed38be78ae9aea052938e2cb6b5800010ecd4@changeid/
---
 tests/hwsim/test_ap_qosmap.py | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/tests/hwsim/test_ap_qosmap.py b/tests/hwsim/test_ap_qosmap.py
index fb26474871..8ed3fe4734 100644
--- a/tests/hwsim/test_ap_qosmap.py
+++ b/tests/hwsim/test_ap_qosmap.py
@@ -89,8 +89,20 @@ def test_ap_qosmap_default(dev, apdev):
     dev[0].request("DATA_TEST_CONFIG 1")
     hapd.request("DATA_TEST_CONFIG 1")
     Wlantest.setup(hapd)
+
+    # build initial default mapping
+    dscp_to_tid = {}
     for dscp in [0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63]:
-        check_qos_map(apdev[0], hapd, dev[0], addr, dscp, dscp >> 3)
+        dscp_to_tid[dscp] = dscp >> 3
+
+    # update the mapping based on the recommendations in section 4 in RFC8325
+    dscp_to_tid[16] = 0
+    dscp_to_tid[24] = 4
+    dscp_to_tid[48] = 7
+
+    for dscp, tid in dscp_to_tid.items():
+        check_qos_map(apdev[0], hapd, dev[0], addr, dscp, tid)
+
     dev[0].request("DATA_TEST_CONFIG 0")
     hapd.request("DATA_TEST_CONFIG 0")
 
@@ -127,9 +139,19 @@ def test_ap_qosmap_default_acm(dev, apdev):
     dev[0].request("DATA_TEST_CONFIG 1")
     hapd.request("DATA_TEST_CONFIG 1")
     Wlantest.setup(hapd)
+    # build initial default mapping
+    dscp_to_tid = {}
     for dscp in [0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63]:
-        ap_tid = dscp >> 3
-        tid = ap_tid
+        dscp_to_tid[dscp] = dscp >> 3
+
+    # update the mapping based on the recommendations in section 4 in RFC8325
+    dscp_to_tid[16] = 0
+    dscp_to_tid[24] = 4
+    dscp_to_tid[48] = 7
+
+    for dscp, tid in dscp_to_tid.items():
+        ap_tid = tid
+
         # downgrade VI/VO to BE
         if tid in [4, 5, 6, 7]:
             tid = 3
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-04  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 11:37 [PATCH] tests: Modify the QoS mapping tests Andrei Otcheretianski
2023-12-23 10:40 ` Jouni Malinen
2023-12-23 17:30   ` Johannes Berg
2024-01-04  9:11     ` Jouni Malinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox