blob: cb4d246c83298e0497e791c2dc5aa9d038dacbd9 [file] [log] [blame]
developer327aa322023-07-10 13:49:56 +08001From c3596dc615aed0ff22fe5eecc2962d5003deaeaa Mon Sep 17 00:00:00 2001
developer8effbd32023-04-17 15:57:28 +08002From: MeiChia Chiu <meichia.chiu@mediatek.com>
3Date: Wed, 12 Apr 2023 15:53:42 +0800
developer327aa322023-07-10 13:49:56 +08004Subject: [PATCH] wifi: mt76: mt7915: fix the beamformer issue
developer8effbd32023-04-17 15:57:28 +08005
6without this patch, when ap sets the tx stream number to 2,
7ap doesn't send any beamform packets.
8
9Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
10---
11 mt7915/mcu.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/mt7915/mcu.c b/mt7915/mcu.c
developer327aa322023-07-10 13:49:56 +080015index 79d2354..f2ffa6c 100644
developer8effbd32023-04-17 15:57:28 +080016--- a/mt7915/mcu.c
17+++ b/mt7915/mcu.c
developer327aa322023-07-10 13:49:56 +080018@@ -1015,13 +1015,13 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
developer8effbd32023-04-17 15:57:28 +080019 struct ieee80211_sta *sta, bool bfee)
20 {
developer327aa322023-07-10 13:49:56 +080021 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
developer8effbd32023-04-17 15:57:28 +080022- int tx_ant = hweight8(phy->mt76->chainmask) - 1;
23+ int sts = hweight16(phy->mt76->chainmask);
24
25 if (vif->type != NL80211_IFTYPE_STATION &&
26 vif->type != NL80211_IFTYPE_AP)
27 return false;
28
29- if (!bfee && tx_ant < 2)
30+ if (!bfee && sts < 2)
31 return false;
32
33 if (sta->deflink.he_cap.has_he) {
34--
352.18.0
36