Commit ced1a0b8 authored by MeiChia Chiu's avatar MeiChia Chiu Committed by Felix Fietkau
Browse files

wifi: mt76: mt7915: fix beamforming availability check



Without this patch, when ap sets the tx stream number to 2,
ap won't send any beamforming packet.

Fixes: f89f297a ("mt76: mt7915: fix txbf starec TLV issues")
Signed-off-by: default avatarMeiChia Chiu <meichia.chiu@mediatek.com>
Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 3d5a4290
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1019,13 +1019,13 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
			struct ieee80211_sta *sta, bool bfee)
{
	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
	int tx_ant = hweight8(phy->mt76->chainmask) - 1;
	int sts = hweight16(phy->mt76->chainmask);

	if (vif->type != NL80211_IFTYPE_STATION &&
	    vif->type != NL80211_IFTYPE_AP)
		return false;

	if (!bfee && tx_ant < 2)
	if (!bfee && sts < 2)
		return false;

	if (sta->deflink.he_cap.has_he) {