From fc410557b7e14d811755b719b7c1a31212340623 Mon Sep 17 00:00:00 2001 From: Nicolas Cavallari Date: Thu, 10 Nov 2022 16:39:52 +0100 Subject: [PATCH] wifi: mt76: mt7915: Fix VHT beamforming capabilities with DBDC Do not hardcode beamformee 4 space-time streams support, because DBDC can only support up to 2. Fixes: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Signed-off-by: Nicolas Cavallari Signed-off-by: Felix Fietkau --- mt7915/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mt7915/init.c b/mt7915/init.c index 6ddaaded..13decb23 100644 --- a/mt7915/init.c +++ b/mt7915/init.c @@ -738,7 +738,8 @@ void mt7915_set_stream_vht_txbf_caps(struct mt7915_phy *phy) *cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | - (3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT); + FIELD_PREP(IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK, + sts - 1); *cap &= ~(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK | IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |