Lachlan Hodges
1860b1a825
wifi: mac80211: kunit: add kunit tests for S1G PVB decoding
...
Add support for testing the 6 examples mentioned in IEEE80211-2024
Annex L. These tests cover the 3 mandatory decoding modes being
block bitmap, single AID and OLB alongside their equivalent
inverses.
Test output:
1..6
s1g_tim_block_test: Block 0 (ENC=BLOCK, blk_off=0, inverse=0)
s1g_tim_block_test: octet 1 (ctrl) : 00000000 (0x00)
s1g_tim_block_test: octet 2 (blk-map) : 00000101 (0x05)
s1g_tim_block_test: octet 3 (SB 0) : 01000010 (0x42)
s1g_tim_block_test: octet 4 (SB 2) : 10100000 (0xa0)
ok 1 s1g_tim_block_test
s1g_tim_single_test: Block 0 (ENC=SINGLE, blk_off=0, inverse=0)
s1g_tim_single_test: octet 1 (ctrl) : 00000001 (0x01)
s1g_tim_single_test: octet 2 (single) : 00011111 (0x1f)
ok 2 s1g_tim_single_test
s1g_tim_olb_test: Block 0 (ENC=OLB, blk_off=0, inverse=0)
s1g_tim_olb_test: octet 1 (ctrl) : 00000010 (0x02)
s1g_tim_olb_test: octet 2 (len= 9) : 00001001 (0x09)
s1g_tim_olb_test: octet 3 (SB 0) : 01000010 (0x42)
s1g_tim_olb_test: octet 4 (SB 1) : 10100000 (0xa0)
s1g_tim_olb_test: octet 5 (SB 2) : 01000010 (0x42)
s1g_tim_olb_test: octet 6 (SB 3) : 10100000 (0xa0)
s1g_tim_olb_test: octet 7 (SB 4) : 01000010 (0x42)
s1g_tim_olb_test: octet 8 (SB 5) : 10100000 (0xa0)
s1g_tim_olb_test: octet 9 (SB 6) : 01000010 (0x42)
s1g_tim_olb_test: octet 10 (SB 7) : 10100000 (0xa0)
s1g_tim_olb_test: octet 11 (SB 8) : 01000010 (0x42)
ok 3 s1g_tim_olb_test
s1g_tim_inverse_block_test: Block 0 (ENC=BLOCK, blk_off=0, inverse=1)
s1g_tim_inverse_block_test: octet 1 (ctrl) : 00000100 (0x04)
s1g_tim_inverse_block_test: octet 2 (blk-map) : 00000101 (0x05)
s1g_tim_inverse_block_test: octet 3 (SB 0) : 01000010 (0x42)
s1g_tim_inverse_block_test: octet 4 (SB 2) : 10100000 (0xa0)
ok 4 s1g_tim_inverse_block_test
s1g_tim_inverse_single_test: Block 0 (ENC=SINGLE, blk_off=0, inverse=1)
s1g_tim_inverse_single_test: octet 1 (ctrl) : 00000101 (0x05)
s1g_tim_inverse_single_test: octet 2 (single) : 00011111 (0x1f)
ok 5 s1g_tim_inverse_single_test
s1g_tim_inverse_olb_test: Block 0 (ENC=OLB, blk_off=0, inverse=1)
s1g_tim_inverse_olb_test: octet 1 (ctrl) : 00000110 (0x06)
s1g_tim_inverse_olb_test: octet 2 (len= 9) : 00001001 (0x09)
s1g_tim_inverse_olb_test: octet 3 (SB 0) : 01000010 (0x42)
s1g_tim_inverse_olb_test: octet 4 (SB 1) : 10100000 (0xa0)
s1g_tim_inverse_olb_test: octet 5 (SB 2) : 01000010 (0x42)
s1g_tim_inverse_olb_test: octet 6 (SB 3) : 10100000 (0xa0)
s1g_tim_inverse_olb_test: octet 7 (SB 4) : 01000010 (0x42)
s1g_tim_inverse_olb_test: octet 8 (SB 5) : 10100000 (0xa0)
s1g_tim_inverse_olb_test: octet 9 (SB 6) : 01000010 (0x42)
s1g_tim_inverse_olb_test: octet 10 (SB 7) : 10100000 (0xa0)
s1g_tim_inverse_olb_test: octet 11 (SB 8) : 01000010 (0x42)
ok 6 s1g_tim_inverse_olb_test
mac80211-s1g-tim: pass:6 fail:0 skip:0 total:6
Totals: pass:6 fail:0 skip:0 total:6
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com >
Link: https://patch.msgid.link/20250725132221.258217-4-lachlan.hodges@morsemicro.com
[make tim_push() void, non-inline]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-09-04 11:19:01 +02:00
Johannes Berg
39dc8b8ea3
wifi: mac80211: pass parsed TPE data to drivers
...
Instead of passing the full TPE elements, in all their glory
and mixed up data formats for HE backward compatibility, parse
them fully into the right values, and pass that to the drivers.
Also introduce proper validation already in mac80211, so that
drivers don't need to do it, and parse the EHT portions.
The code now passes the values in the right order according to
the channel used by an interface, which could also be a subset
of the data advertised by the AP, if we couldn't connect with
the full bandwidth (for whatever reason.)
Also add kunit tests for the more complicated bits of it.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Acked-by: Kalle Valo <kvalo@kernel.org >
Link: https://msgid.link/20240506214536.2aa839969b60.I265b28209e0b29772b2f125f7f83de44a4da877b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:35:04 +02:00