hostapd: randomize default BSS color

In case no specific BSS color is configured, set it to a random value.

Signed-off-by: David Bauer <mail@david-bauer.net>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
David Bauer
2022-05-14 21:43:15 +02:00
parent c35ff1affe
commit 6c152ce5b0
3 changed files with 28 additions and 2 deletions

View File

@@ -419,12 +419,14 @@ mac80211_hostapd_setup_base() {
he_mac_cap=${he_mac_cap:2}
append base_cfg "ieee80211ax=1" "$N"
[ -n "$he_bss_color" ] && append base_cfg "he_bss_color=$he_bss_color" "$N"
[ "$hwmode" = "a" ] && {
append base_cfg "he_oper_chwidth=$vht_oper_chwidth" "$N"
append base_cfg "he_oper_centr_freq_seg0_idx=$vht_center_seg0" "$N"
}
set_default he_bss_color 128
append base_cfg "he_bss_color=$he_bss_color" "$N"
mac80211_add_he_capabilities \
he_su_beamformer:${he_phy_cap:6:2}:0x80:$he_su_beamformer \
he_su_beamformee:${he_phy_cap:8:2}:0x1:$he_su_beamformee \