Commit 361b59b6 authored by StanleyYP Wang's avatar StanleyYP Wang Committed by Felix Fietkau
Browse files

wifi: mt76: mt7996: fix max nss value when getting rx chainmask



Since wiphy->available_antennas_tx now accumulates the chainmask of all
the radios of a wiphy, use phy->orig_antenna_mask to get the original
max nss for comparison.

Fixes: 69d54ce7 ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: default avatarStanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Link: https://patch.msgid.link/20251106064203.1000505-1-shayne.chen@mediatek.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 2a035ae2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -786,7 +786,7 @@ void mt7996_memcpy_fromio(struct mt7996_dev *dev, void *buf, u32 offset,

static inline u16 mt7996_rx_chainmask(struct mt7996_phy *phy)
{
	int max_nss = hweight8(phy->mt76->hw->wiphy->available_antennas_tx);
	int max_nss = hweight16(phy->orig_antenna_mask);
	int cur_nss = hweight8(phy->mt76->antenna_mask);
	u16 tx_chainmask = phy->mt76->chainmask;