blob: 22f89815c341a34d7e6a5b3e326805170096ad29 [file] [log] [blame]
developer8bb192d2023-08-31 11:46:57 +08001From 18d25338da14f4b7de5aabd86ebb066b45d7e916 Mon Sep 17 00:00:00 2001
developer23d6e272023-08-28 11:10:51 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Mon, 28 Aug 2023 10:59:23 +0800
developer8bb192d2023-08-31 11:46:57 +08004Subject: [PATCH 06/15] wifi: mt76: mt7915: check vif type before reporting cca
5 and csa
6
7Don't report cca and csa finish to upper layer on station type vif to
8prevent warnings caused by setting beacon.
developer23d6e272023-08-28 11:10:51 +08009
10Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
developer8bb192d2023-08-31 11:46:57 +080011Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
developer23d6e272023-08-28 11:10:51 +080012---
13 mt7915/mcu.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/mt7915/mcu.c b/mt7915/mcu.c
developer8bb192d2023-08-31 11:46:57 +080017index eae62b9c..cdd1f847 100644
developer23d6e272023-08-28 11:10:51 +080018--- a/mt7915/mcu.c
19+++ b/mt7915/mcu.c
20@@ -225,7 +225,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
21 static void
22 mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
23 {
24- if (vif->bss_conf.csa_active)
25+ if (vif->bss_conf.csa_active && vif->type != NL80211_IFTYPE_STATION)
26 ieee80211_csa_finish(vif);
27 }
28
29@@ -326,7 +326,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
30 static void
31 mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
32 {
33- if (!vif->bss_conf.color_change_active)
34+ if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
35 return;
36
37 ieee80211_color_change_finish(vif);
38--
developer8bb192d2023-08-31 11:46:57 +0800392.39.2
developer23d6e272023-08-28 11:10:51 +080040