developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 1 | From 919a124e164b3c1ba5fe4fde2ad48e0ef3961d17 Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 3 | Date: Thu, 22 Feb 2024 11:09:10 +0800 |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 4 | Subject: [PATCH 107/116] mtk: mt76: mt7996: hw_scan: ACS channel time too long |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | on duty channel |
| 6 | |
| 7 | This problem happens in SW scan and was already fixed. |
| 8 | (https://gerrit.mediatek.inc/c/gateway/WiFi7/mac80211/mt76/+/8312969) |
| 9 | |
| 10 | This commit applys same solution for HW scan. |
| 11 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 12 | Signed-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 | |
| 17 | diff --git a/mt7996/main.c b/mt7996/main.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 18 | index 8e44da7..233bf2a 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 19 | --- a/mt7996/main.c |
| 20 | +++ b/mt7996/main.c |
| 21 | @@ -497,6 +497,7 @@ static void ___mt7996_set_channel(struct mt7996_phy *phy, |
| 22 | 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); |
| 29 | @@ -511,7 +512,7 @@ static void ___mt7996_set_channel(struct mt7996_phy *phy, |
| 30 | 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 | -- |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 39 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 40 | |