blob: d3d52fd8f188592b206c9f44db3ab5bb6f24c7e4 [file] [log] [blame]
developer8bb192d2023-08-31 11:46:57 +08001From 47a2c8faf86bd3b3f3e7e0495015eebee53de0e9 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
developer8bb192d2023-08-31 11:46:57 +08004Subject: [PATCH 08/15] wifi: mt76: mt7915: fix beamforming availability check
developer4a24b5f2023-04-12 16:06:02 +08005
developer8bb192d2023-08-31 11:46:57 +08006Without this patch, when ap sets the tx stream number to 2,
7ap won't send any beamforming packet.
developer4a24b5f2023-04-12 16:06:02 +08008
9Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
developer8bb192d2023-08-31 11:46:57 +080010Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
developer4a24b5f2023-04-12 16:06:02 +080011---
12 mt7915/mcu.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/mt7915/mcu.c b/mt7915/mcu.c
developer8bb192d2023-08-31 11:46:57 +080016index cdd1f847..5c4a275c 100644
developer4a24b5f2023-04-12 16:06:02 +080017--- a/mt7915/mcu.c
18+++ b/mt7915/mcu.c
developer8bb192d2023-08-31 11:46:57 +080019@@ -1017,13 +1017,13 @@ 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 {
developerc1571f92023-07-04 22:11:24 +080022 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
developer4a24b5f2023-04-12 16:06:02 +080023- int tx_ant = hweight8(phy->mt76->chainmask) - 1;
24+ int sts = hweight16(phy->mt76->chainmask);
25
26 if (vif->type != NL80211_IFTYPE_STATION &&
27 vif->type != NL80211_IFTYPE_AP)
28 return false;
29
30- if (!bfee && tx_ant < 2)
31+ if (!bfee && sts < 2)
32 return false;
33
34 if (sta->deflink.he_cap.has_he) {
35--
developer8bb192d2023-08-31 11:46:57 +0800362.39.2
developer4a24b5f2023-04-12 16:06:02 +080037