blob: a9b41f9b3f15c1667ad3e4eb875303fcc6c1d46c [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 43de0e905d116dc16cf7cacadeddcc352695913d Mon Sep 17 00:00:00 2001
developer66e89bc2024-04-23 14:50:01 +08002From: Michael-CY Lee <michael-cy.lee@mediatek.com>
3Date: Thu, 22 Feb 2024 11:09:10 +0800
developer05f3b2b2024-08-19 19:17:34 +08004Subject: [PATCH 112/199] mtk: mt76: mt7996: ACS channel time too long on duty
5 channel
developer66e89bc2024-04-23 14:50:01 +08006
7This problem happens in SW scan and was already fixed.
8(https://gerrit.mediatek.inc/c/gateway/WiFi7/mac80211/mt76/+/8312969)
9
10This commit applys same solution for HW scan.
11
developer66e89bc2024-04-23 14:50:01 +080012Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
13---
14 mt7996/main.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/mt7996/main.c b/mt7996/main.c
developer05f3b2b2024-08-19 19:17:34 +080018index 7012aa96..c4eba315 100644
developer66e89bc2024-04-23 14:50:01 +080019--- a/mt7996/main.c
20+++ b/mt7996/main.c
developer05f3b2b2024-08-19 19:17:34 +080021@@ -499,6 +499,7 @@ static void ___mt7996_set_channel(struct mt7996_phy *phy,
developer66e89bc2024-04-23 14:50:01 +080022 struct mt76_phy *mphy = phy->mt76;
23 bool offchannel = phy->scan_chan != NULL;
24 int timeout = HZ / 5;
25+ unsigned long was_scanning = ieee80211_get_scanning(mphy->hw);
26
27 wait_event_timeout(mdev->tx_wait, !mt76_has_tx_pending(mphy), timeout);
28 mt76_update_survey(mphy);
developer05f3b2b2024-08-19 19:17:34 +080029@@ -513,7 +514,7 @@ static void ___mt7996_set_channel(struct mt7996_phy *phy,
developer66e89bc2024-04-23 14:50:01 +080030 if (!offchannel)
31 mphy->main_chan = chandef->chan;
32
33- if (chandef->chan != mphy->main_chan)
34+ if (chandef->chan != mphy->main_chan || was_scanning)
35 memset(mphy->chan_state, 0, sizeof(*mphy->chan_state));
36 }
37
38--
developer9237f442024-06-14 17:13:04 +0800392.18.0
developer66e89bc2024-04-23 14:50:01 +080040