mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
mac80211: add random BSS color setting (#9188)
Using BSS coloring is one way of improving performance on 802.11ax radios, currently its only enabled by users adding he_bss_color to their wireless UCI config. This made sense as one could easily get BSS color collision as BSS color range is 1-63. Hostapd now has a way of dealing with BSS color collisions so we can just assign a integer in the 1-63 range randomly if one is not set by users. Signed-off-by: Robert Marko <robimarko@gmail.com> Co-authored-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
be8077f517
commit
08a6577256
@ -419,7 +419,16 @@ mac80211_hostapd_setup_base() {
|
|||||||
he_mac_cap=${he_mac_cap:2}
|
he_mac_cap=${he_mac_cap:2}
|
||||||
|
|
||||||
append base_cfg "ieee80211ax=1" "$N"
|
append base_cfg "ieee80211ax=1" "$N"
|
||||||
[ -n "$he_bss_color" ] && append base_cfg "he_bss_color=$he_bss_color" "$N"
|
|
||||||
|
if [ -n "$he_bss_color" ]; then
|
||||||
|
append base_cfg "he_bss_color=$he_bss_color" "$N"
|
||||||
|
else
|
||||||
|
he_bss_color=$(head -1 /dev/urandom | tr -dc '0-9' | head -c2)
|
||||||
|
he_bss_color=$(($he_bss_color % 63))
|
||||||
|
he_bss_color=$(($he_bss_color + 1))
|
||||||
|
append base_cfg "he_bss_color=$he_bss_color" "$N"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "$hwmode" = "a" ] && {
|
[ "$hwmode" = "a" ] && {
|
||||||
append base_cfg "he_oper_chwidth=$vht_oper_chwidth" "$N"
|
append base_cfg "he_oper_chwidth=$vht_oper_chwidth" "$N"
|
||||||
append base_cfg "he_oper_centr_freq_seg0_idx=$vht_center_seg0" "$N"
|
append base_cfg "he_oper_centr_freq_seg0_idx=$vht_center_seg0" "$N"
|
||||||
|
Loading…
Reference in New Issue
Block a user