blob: 5995490e26ac9560bf7ea2d7488cbb03e8685307 [file] [log] [blame]
developer29808952023-11-18 07:50:06 +08001From 063ffcd8a8fdb835e3d74082b4dc411750f2a234 Mon Sep 17 00:00:00 2001
2From: Evelyn Tsai <evelyn.tsai@mediatek.com>
3Date: Sat, 18 Nov 2023 07:36:45 +0800
4Subject: [PATCH] wifi: mt76: ACS channel time too long on duty channel
5
6Step and issue:
71. Set channel to 36 in hostapd config;
82. Bootup;
93. Enable ACS through UCI command and reload;
104. Check hostapd log, channel 36 channel_time is much longer than other channels.
11
12Root cause:
13The reset chan_stat condition missed duty channel.
14
15Solution:
16When scan start, need to reset chan_stat in each channel switch.
17---
18 mac80211.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/mac80211.c b/mac80211.c
22index aaaf6a9..0b13602 100644
23--- a/mac80211.c
24+++ b/mac80211.c
25@@ -931,7 +931,7 @@ void mt76_set_channel(struct mt76_phy *phy)
26 if (!offchannel)
27 phy->main_chan = chandef->chan;
28
29- if (chandef->chan != phy->main_chan)
30+ if (chandef->chan != phy->main_chan || test_bit(MT76_SCANNING, &phy->state))
31 memset(phy->chan_state, 0, sizeof(*phy->chan_state));
32 }
33 EXPORT_SYMBOL_GPL(mt76_set_channel);
34--
352.18.0
36