blob: a7a80381cf49907b891ed6208178407dd62ac470 [file] [log] [blame]
From 9db4d791dab1d0500c13475ee704965aa0d779ab Mon Sep 17 00:00:00 2001
From: "Allen.Ye" <allen.ye@mediatek.com>
Date: Thu, 8 Jun 2023 17:32:33 +0800
Subject: [PATCH 1001/1024] wifi: mt76: mt7996: add check for hostapd config
he_ldpc
Add check for hostapd config he_ldpc.
This capabilities is checked in mcu_beacon_check_caps in 7915.
Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
Change-Id: I6d6f59df8897e3c00f2e0a1e3c6e5701e31c5e4b
---
mt7996/mcu.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/mt7996/mcu.c b/mt7996/mcu.c
index 3d6792259..867818825 100644
--- a/mt7996/mcu.c
+++ b/mt7996/mcu.c
@@ -1097,7 +1097,8 @@ int mt7996_mcu_add_rx_ba(struct mt7996_dev *dev,
}
static void
-mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta)
{
struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
struct ieee80211_he_mcs_nss_supp mcs_map;
@@ -1117,6 +1118,10 @@ mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
he->he_phy_cap[i] = elem->phy_cap_info[i];
}
+ if (vif->type == NL80211_IFTYPE_AP)
+ u8p_replace_bits(&he->he_phy_cap[1], vif->bss_conf.he_ldpc,
+ IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD);
+
mcs_map = sta->deflink.he_cap.he_mcs_nss_supp;
switch (sta->deflink.bandwidth) {
case IEEE80211_STA_RX_BW_160:
@@ -2029,7 +2034,7 @@ int mt7996_mcu_add_rate_ctrl(struct mt7996_dev *dev, struct ieee80211_vif *vif,
* update sta_rec_he here.
*/
if (changed)
- mt7996_mcu_sta_he_tlv(skb, sta);
+ mt7996_mcu_sta_he_tlv(skb, vif, sta);
/* sta_rec_ra accommodates BW, NSS and only MCS range format
* i.e 0-{7,8,9} for VHT.
@@ -2117,7 +2122,7 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,
/* starec amsdu */
mt7996_mcu_sta_amsdu_tlv(dev, skb, vif, sta);
/* starec he */
- mt7996_mcu_sta_he_tlv(skb, sta);
+ mt7996_mcu_sta_he_tlv(skb, vif, sta);
/* starec he 6g*/
mt7996_mcu_sta_he_6g_tlv(skb, sta);
/* starec eht */
--
2.39.2