qca-wifi-7/hostapd: keep BSS coloring enabled with the same color if there is no free colors

Fixes: WIFI-15279

Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
This commit is contained in:
Sebastian Huang
2025-12-12 15:35:10 +08:00
committed by John Crispin
parent 5c5eb7891c
commit ee601508d9

View File

@@ -0,0 +1,20 @@
diff -urp a/src/ap/hostapd.c b/src/ap/hostapd.c
--- a/src/ap/hostapd.c 2025-10-28 15:50:59.024346272 +0800
+++ b/src/ap/hostapd.c 2025-12-09 23:03:55.351738472 +0800
@@ -5115,14 +5115,11 @@ static void hostapd_switch_color_timeout
}
if (i == HE_OPERATION_BSS_COLOR_MAX) {
- /* There are no free colors so turn BSS coloring off */
+ /* There are no free colors so do not change color and wait for next check */
wpa_printf(MSG_INFO,
- "No free colors left, turning off BSS coloring");
+ "No free colors left, stay at the same color");
hapd->iface->conf->he_op.he_bss_color_disabled = 1;
- hapd->iface->conf->he_op.he_bss_color = os_random() % 63 + 1;
hapd->no_free_color = 1;
- for (b = 0; b < hapd->iface->num_bss; b++)
- ieee802_11_set_beacon(hapd->iface->bss[b]);
/* Enabling for next check after timeout*/
hapd->iface->conf->he_op.he_bss_color_disabled = 0;