blob: 22f89815c341a34d7e6a5b3e326805170096ad29 [file] [log] [blame]
From 18d25338da14f4b7de5aabd86ebb066b45d7e916 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Mon, 28 Aug 2023 10:59:23 +0800
Subject: [PATCH 06/15] wifi: mt76: mt7915: check vif type before reporting cca
and csa
Don't report cca and csa finish to upper layer on station type vif to
prevent warnings caused by setting beacon.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
mt7915/mcu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
index eae62b9c..cdd1f847 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -225,7 +225,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
static void
mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
- if (vif->bss_conf.csa_active)
+ if (vif->bss_conf.csa_active && vif->type != NL80211_IFTYPE_STATION)
ieee80211_csa_finish(vif);
}
@@ -326,7 +326,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
static void
mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
- if (!vif->bss_conf.color_change_active)
+ if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
return;
ieee80211_color_change_finish(vif);
--
2.39.2