]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wifi: mt76: fix 5 GHz connection regression on mt76x0/mt76x2
authorFelix Fietkau <nbd@nbd.name>
Wed, 7 Sep 2022 09:52:28 +0000 (11:52 +0200)
committerKalle Valo <kvalo@kernel.org>
Mon, 12 Sep 2022 11:26:02 +0000 (14:26 +0300)
Some users have reported being unable to connect to MT76x0 APs running mt76
after a commit enabling the VHT extneded NSS BW feature.
Fix this regression by ensuring that this feature only gets enabled on drivers
that support it

Cc: stable@vger.kernel.org
Fixes: af8386d7a287 ("mt76: enable the VHT extended NSS BW feature")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220907095228.82072-1-nbd@nbd.name
drivers/net/wireless/mediatek/mt76/mac80211.c

index 253cbc1956d19953ca16dd10b154cf5d5b64c34e..6de13d6414389b5d9873363418cc1d3cfedfeff4 100644 (file)
@@ -267,7 +267,8 @@ static void mt76_init_stream_cap(struct mt76_phy *phy,
        }
        vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
        vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
-       vht_cap->vht_mcs.tx_highest |=
+       if (ieee80211_hw_check(phy->hw, SUPPORTS_VHT_EXT_NSS_BW))
+               vht_cap->vht_mcs.tx_highest |=
                                cpu_to_le16(IEEE80211_VHT_EXT_NSS_BW_CAPABLE);
 }