blob: 59a5f5462e96389ec4c8c555665dfcc3604bd11a [file] [log] [blame]
developerbbd45e12023-05-19 08:22:06 +08001From dc866136370fb7ce58bbc27ba7e5fdf40b6138d9 Mon Sep 17 00:00:00 2001
developer4a24b5f2023-04-12 16:06:02 +08002From: MeiChia Chiu <meichia.chiu@mediatek.com>
3Date: Wed, 12 Apr 2023 15:53:42 +0800
developerbbd45e12023-05-19 08:22:06 +08004Subject: [PATCH 4/6] wifi: mt76: mt7915: fix the beamformer issue
developer4a24b5f2023-04-12 16:06:02 +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
developerbbd45e12023-05-19 08:22:06 +080015index 8ab4239..d374465 100644
developer4a24b5f2023-04-12 16:06:02 +080016--- a/mt7915/mcu.c
17+++ b/mt7915/mcu.c
developerbbd45e12023-05-19 08:22:06 +080018@@ -1008,13 +1008,13 @@ static inline bool
19 mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
developer4a24b5f2023-04-12 16:06:02 +080020 struct ieee80211_sta *sta, bool bfee)
21 {
developer4a24b5f2023-04-12 16:06:02 +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--
developer5bea7322023-04-13 18:50:55 +0800352.18.0
developer4a24b5f2023-04-12 16:06:02 +080036