mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-22 13:14:37 +04:00
wifi-scripts: pass the SRG spatial reuse settings to hostapd
The Spatial Reuse Parameter Set takes SRG OBSS PD offsets and the SRG BSS colour and partial BSSID bitmaps (IEEE Std 802.11-2024 9.4.2.251), and hostapd reads them as he_spr_srg_obss_pd_min_offset, he_spr_srg_obss_pd_max_offset, he_spr_srg_bss_colors and he_spr_srg_partial_bssid. The schema had none of them, so a radio could not run with SRG information. Add the four options. Either offset sets SR Control bit 3 (SRG Information Present). The non-SRG offset now sets bit 2 by its presence: an offset of 0 is a valid offset, and before it left the field out of the element. Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
1 parent
5cf1c09da2
commit
5bcbf3aa77
2 files changed
+33
-2
No files matched your search
+22
@@ -334,6 +334,28 @@
|
||||
"type": "number",
|
||||
"default": 3
|
||||
},
|
||||
"he_spr_srg_bss_colors": {
|
||||
"description": "BSS colors (0-63) of the Spatial Reuse Group",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"he_spr_srg_obss_pd_max_offset": {
|
||||
"description": "SRG OBSS PD Max Offset",
|
||||
"type": "number"
|
||||
},
|
||||
"he_spr_srg_obss_pd_min_offset": {
|
||||
"description": "SRG OBSS PD Min Offset",
|
||||
"type": "number"
|
||||
},
|
||||
"he_spr_srg_partial_bssid": {
|
||||
"description": "Partial BSSID values (0-63) of the Spatial Reuse Group",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"he_su_beamformee": {
|
||||
"description": "",
|
||||
"type": "boolean",
|
||||
|
||||
@@ -406,11 +406,20 @@ function device_htmode_append(config) {
|
||||
}
|
||||
|
||||
if (config.he_bss_color_enabled) {
|
||||
if (config.he_spr_non_srg_obss_pd_max_offset)
|
||||
/* An offset of 0 is a valid offset, so the presence of the
|
||||
* option sets the Present bit, and not its value. */
|
||||
if (config.he_spr_non_srg_obss_pd_max_offset != null)
|
||||
config.he_spr_sr_control |= 1 << 2;
|
||||
if (config.he_spr_srg_obss_pd_min_offset != null ||
|
||||
config.he_spr_srg_obss_pd_max_offset != null)
|
||||
config.he_spr_sr_control |= 1 << 3;
|
||||
if (!config.he_spr_psr_enabled)
|
||||
config.he_spr_sr_control |= 1;
|
||||
append_vars(config, [ 'he_bss_color', 'he_spr_non_srg_obss_pd_max_offset', 'he_spr_sr_control' ]);
|
||||
append_vars(config, [
|
||||
'he_bss_color', 'he_spr_non_srg_obss_pd_max_offset', 'he_spr_sr_control',
|
||||
'he_spr_srg_obss_pd_min_offset', 'he_spr_srg_obss_pd_max_offset',
|
||||
'he_spr_srg_bss_colors', 'he_spr_srg_partial_bssid'
|
||||
]);
|
||||
}
|
||||
|
||||
if (!(he_phy_cap[3] & 0x80))
|
||||
|
||||
Reference in new issue
Block a user