Commit 8234324a authored by Peter Chiu's avatar Peter Chiu Committed by Felix Fietkau

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: default avatarPeter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c685034c
...@@ -225,7 +225,9 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3) ...@@ -225,7 +225,9 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
static void static void
mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) 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)
return;
ieee80211_csa_finish(vif); ieee80211_csa_finish(vif);
} }
...@@ -326,7 +328,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb) ...@@ -326,7 +328,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
static void static void
mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) 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; return;
ieee80211_color_change_finish(vif); ieee80211_color_change_finish(vif);
......
...@@ -324,7 +324,9 @@ int mt7996_mcu_wa_cmd(struct mt7996_dev *dev, int cmd, u32 a1, u32 a2, u32 a3) ...@@ -324,7 +324,9 @@ int mt7996_mcu_wa_cmd(struct mt7996_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
static void static void
mt7996_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) mt7996_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)
return;
ieee80211_csa_finish(vif); ieee80211_csa_finish(vif);
} }
...@@ -399,7 +401,7 @@ mt7996_mcu_rx_log_message(struct mt7996_dev *dev, struct sk_buff *skb) ...@@ -399,7 +401,7 @@ mt7996_mcu_rx_log_message(struct mt7996_dev *dev, struct sk_buff *skb)
static void static void
mt7996_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) mt7996_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; return;
ieee80211_color_change_finish(vif); ieee80211_color_change_finish(vif);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment