developer | c2cfe0f | 2023-09-22 04:11:09 +0800 | [diff] [blame] | 1 | From 9db4d791dab1d0500c13475ee704965aa0d779ab Mon Sep 17 00:00:00 2001 |
| 2 | From: "Allen.Ye" <allen.ye@mediatek.com> |
| 3 | Date: Thu, 8 Jun 2023 17:32:33 +0800 |
| 4 | Subject: [PATCH 1001/1024] wifi: mt76: mt7996: add check for hostapd config |
| 5 | he_ldpc |
| 6 | |
| 7 | Add check for hostapd config he_ldpc. |
| 8 | This capabilities is checked in mcu_beacon_check_caps in 7915. |
| 9 | |
| 10 | Signed-off-by: Allen.Ye <allen.ye@mediatek.com> |
| 11 | Change-Id: I6d6f59df8897e3c00f2e0a1e3c6e5701e31c5e4b |
| 12 | --- |
| 13 | mt7996/mcu.c | 11 ++++++++--- |
| 14 | 1 file changed, 8 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| 17 | index 3d6792259..867818825 100644 |
| 18 | --- a/mt7996/mcu.c |
| 19 | +++ b/mt7996/mcu.c |
| 20 | @@ -1097,7 +1097,8 @@ int mt7996_mcu_add_rx_ba(struct mt7996_dev *dev, |
| 21 | } |
| 22 | |
| 23 | static void |
| 24 | -mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) |
| 25 | +mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, |
| 26 | + struct ieee80211_sta *sta) |
| 27 | { |
| 28 | struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem; |
| 29 | struct ieee80211_he_mcs_nss_supp mcs_map; |
| 30 | @@ -1117,6 +1118,10 @@ mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) |
| 31 | he->he_phy_cap[i] = elem->phy_cap_info[i]; |
| 32 | } |
| 33 | |
| 34 | + if (vif->type == NL80211_IFTYPE_AP) |
| 35 | + u8p_replace_bits(&he->he_phy_cap[1], vif->bss_conf.he_ldpc, |
| 36 | + IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD); |
| 37 | + |
| 38 | mcs_map = sta->deflink.he_cap.he_mcs_nss_supp; |
| 39 | switch (sta->deflink.bandwidth) { |
| 40 | case IEEE80211_STA_RX_BW_160: |
| 41 | @@ -2029,7 +2034,7 @@ int mt7996_mcu_add_rate_ctrl(struct mt7996_dev *dev, struct ieee80211_vif *vif, |
| 42 | * update sta_rec_he here. |
| 43 | */ |
| 44 | if (changed) |
| 45 | - mt7996_mcu_sta_he_tlv(skb, sta); |
| 46 | + mt7996_mcu_sta_he_tlv(skb, vif, sta); |
| 47 | |
| 48 | /* sta_rec_ra accommodates BW, NSS and only MCS range format |
| 49 | * i.e 0-{7,8,9} for VHT. |
| 50 | @@ -2117,7 +2122,7 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif, |
| 51 | /* starec amsdu */ |
| 52 | mt7996_mcu_sta_amsdu_tlv(dev, skb, vif, sta); |
| 53 | /* starec he */ |
| 54 | - mt7996_mcu_sta_he_tlv(skb, sta); |
| 55 | + mt7996_mcu_sta_he_tlv(skb, vif, sta); |
| 56 | /* starec he 6g*/ |
| 57 | mt7996_mcu_sta_he_6g_tlv(skb, sta); |
| 58 | /* starec eht */ |
| 59 | -- |
| 60 | 2.39.2 |
| 61 | |