]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: connac: fix EHT phy mode check
authorMeiChia Chiu <meichia.chiu@mediatek.com>
Thu, 2 Nov 2023 10:03:02 +0000 (18:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:16:52 +0000 (20:16 +0000)
[ Upstream commit 2c2f50bf6407e1fd43a1a257916aeaa5ffdacd6c ]

Add a BSS eht_support check before returning EHT phy mode. Without this
patch, there might be an inconsistency where the softmac layer thinks
the BSS is in HE mode, while the FW thinks it is in EHT mode.

Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c

index ae6bf3c968dfb711429d86ead08c9fdd4a1994c0..b475555097ff2f1d5c49bdd6fbeb68f3f0089b52 100644 (file)
@@ -1359,7 +1359,7 @@ u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
        sband = phy->hw->wiphy->bands[band];
        eht_cap = ieee80211_get_eht_iftype_cap(sband, vif->type);
 
-       if (!eht_cap || !eht_cap->has_eht)
+       if (!eht_cap || !eht_cap->has_eht || !vif->bss_conf.eht_support)
                return mode;
 
        switch (band) {