blob: 1e2e712a7ee85cde6d36459cc323e3ee88f974aa [file] [log] [blame]
developer23d6e272023-08-28 11:10:51 +08001From 83629860fe17ebc27cda2c91ce43c1bc064b85b4 Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Mon, 28 Aug 2023 10:59:23 +0800
4Subject: [PATCH] wifi: mt76: mt7915: check vif type before reporting cca and
5 csa
6
7Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
8---
9 mt7915/mcu.c | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/mt7915/mcu.c b/mt7915/mcu.c
13index 502610fc..ab337c6b 100644
14--- a/mt7915/mcu.c
15+++ b/mt7915/mcu.c
16@@ -225,7 +225,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
17 static void
18 mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
19 {
20- if (vif->bss_conf.csa_active)
21+ if (vif->bss_conf.csa_active && vif->type != NL80211_IFTYPE_STATION)
22 ieee80211_csa_finish(vif);
23 }
24
25@@ -326,7 +326,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
26 static void
27 mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
28 {
29- if (!vif->bss_conf.color_change_active)
30+ if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
31 return;
32
33 ieee80211_color_change_finish(vif);
34--
352.18.0
36