blob: 9f0d62ef874f7944da5dc6d61b66851c06660bff [file] [log] [blame]
developerd0c89452024-10-11 16:53:27 +08001From 1e59567d865e9e23c193919f8ce2d84e8d4d52f5 Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Wed, 28 Aug 2024 13:58:30 +0800
4Subject: [PATCH 188/223] mtk: mt76: mt7996: fix ldpc setting
5
6The non-AP interfaces would not update conf->vht_ldpc so they never set
7STA_CAP_VHT_LDPC even if peer-station support LDPC.
8Check conf->vht_ldpc only if it is using AP interface.
9
10Without this patch, station only uses BCC to transmit packet in VHT mode.
11
12Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
13Change-Id: I00574c95a8cded18a3272e5aa27582ab4d618899
14---
15 mt7996/mcu.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/mt7996/mcu.c b/mt7996/mcu.c
19index 725f2f31..b0e9617d 100644
20--- a/mt7996/mcu.c
21+++ b/mt7996/mcu.c
22@@ -2994,7 +2994,7 @@ mt7996_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7996_dev *dev,
23 cap |= STA_CAP_VHT_TX_STBC;
24 if (link_sta->vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1)
25 cap |= STA_CAP_VHT_RX_STBC;
26- if (conf->vht_ldpc &&
27+ if ((conf->vif->type != NL80211_IFTYPE_AP || conf->vht_ldpc) &&
28 (link_sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC))
29 cap |= STA_CAP_VHT_LDPC;
30
31--
322.45.2
33