blob: 1beb25c9595b7294a23bcc9aab654c94d7672edf [file] [log] [blame]
From 4b81632a07367f9664158b52364caa3e1b522607 Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Fri, 1 Sep 2023 15:31:24 +0800
Subject: [PATCH] hostapd: mtk: avoid color switch when beacon is not set
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
---
src/ap/hostapd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 4b7ebc5..97b4a59 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -4299,7 +4299,8 @@ void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap)
{
struct os_reltime now;
- if (hapd->cca_in_progress || hapd->stopped_by_supplicant)
+ if (hapd->cca_in_progress || hapd->stopped_by_supplicant ||
+ !hapd->beacon_set_done)
return;
if (os_get_reltime(&now))
--
2.25.1