blob: 2883c1f9f3d2df587056845fcf64f3156d77fe8e [file] [log] [blame]
From 33117ec15f94315f7671cfdaf47e8d5eeddee4ae Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Fri, 1 Sep 2023 15:20:19 +0800
Subject: [PATCH] hostapd: mtk: avoid color switch when beacon is not set
Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
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 abc6156..f2eb638 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -4024,7 +4024,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.39.0