diff options
author | Peter Chiu <chui-hao.chiu@mediatek.com> | 2023-08-31 08:22:19 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-09-30 20:03:05 +0200 |
commit | 8234324ae90948a4e5bfaebe042c51c400cf017a (patch) | |
tree | 8c9539ecd5faf7759bb705347a9786c629d62f9c /drivers/net/wireless/mediatek/mt76/mt7915 | |
parent | wifi: mt76: fix per-band IEEE80211_CONF_MONITOR flag comparison (diff) | |
download | linux-8234324ae90948a4e5bfaebe042c51c400cf017a.tar.xz linux-8234324ae90948a4e5bfaebe042c51c400cf017a.zip |
wifi: mt76: check vif type before reporting cca and csa
Do not 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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index a203f90367f4..79d0a0f3cc57 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -225,8 +225,10 @@ 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) - ieee80211_csa_finish(vif); + if (!vif->bss_conf.csa_active || vif->type == NL80211_IFTYPE_STATION) + return; + + ieee80211_csa_finish(vif); } static void @@ -326,7 +328,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); |