Skip to content

Commit

Permalink
hostapd: config: support random BSS color
Browse files Browse the repository at this point in the history
Configure the HE BSS color to a random value in case the config defines
a BSS color which exceeds the max BSS color (63).

Signed-off-by: David Bauer <mail@david-bauer.net>
  • Loading branch information
blocktrron authored and HikaruDY committed Nov 24, 2024
1 parent 8f2a278 commit a86ea8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hostapd/config_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "he_bss_color") == 0) {
conf->he_op.he_bss_color = atoi(pos) & 0x3f;
conf->he_op.he_bss_color_disabled = 0;
if (atoi(pos) > 63)
conf->he_op.he_bss_color = os_random() % 63 + 1;
} else if (os_strcmp(buf, "he_bss_color_partial") == 0) {
conf->he_op.he_bss_color_partial = atoi(pos);
} else if (os_strcmp(buf, "he_default_pe_duration") == 0) {
Expand Down

0 comments on commit a86ea8c

Please sign in to comment.