wifi: mt76: mt7915: fix HE PHY capabilities IE for station mode
authorHoward Hsu <howard-yh.hsu@mediatek.com>
Wed, 6 Mar 2024 12:51:19 +0000 (20:51 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 2 May 2024 10:44:50 +0000 (12:44 +0200)
Set correct beamformer capabilities for station vif in HE PHY
capabilities IE.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/init.c

index cea2f6d..d9e391f 100644 (file)
@@ -934,11 +934,10 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy,
        /* the maximum cap is 4 x 3, (Nr, Nc) = (3, 2) */
        elem->phy_cap_info[7] |= min_t(int, sts - 1, 2) << 3;
 
-       if (vif != NL80211_IFTYPE_AP)
+       if (vif != NL80211_IFTYPE_AP && vif != NL80211_IFTYPE_STATION)
                return;
 
        elem->phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
-       elem->phy_cap_info[4] |= IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
 
        c = FIELD_PREP(IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK,
                       sts - 1);
@@ -947,6 +946,11 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy,
                                sts_160 - 1);
        elem->phy_cap_info[5] |= c;
 
+       if (vif != NL80211_IFTYPE_AP)
+               return;
+
+       elem->phy_cap_info[4] |= IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
+
        c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB |
            IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB;
        elem->phy_cap_info[6] |= c;