developer | 43a264f | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 1 | From 01b4af6ea238a69c90d136cdf4684869481d03b7 Mon Sep 17 00:00:00 2001 |
developer | 8935fc1 | 2024-01-11 14:08:37 +0800 | [diff] [blame] | 2 | From: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 3 | Date: Wed, 3 Jan 2024 15:21:44 +0800 |
developer | 43a264f | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 4 | Subject: [PATCH 05/17] mtk: wifi: mt76: mt7996: enable hw cso module |
developer | 8935fc1 | 2024-01-11 14:08:37 +0800 | [diff] [blame] | 5 | |
| 6 | The cso module needs to be enabled. The cso mudule can help identify if the traffic |
| 7 | is TCP traffic. This can assist the firmware in adjusting algorithms to |
| 8 | improve overall performance. |
| 9 | |
| 10 | Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 11 | --- |
| 12 | mt76_connac_mcu.h | 7 +++++++ |
| 13 | mt7996/mcu.c | 15 +++++++++++++++ |
| 14 | 2 files changed, 22 insertions(+) |
| 15 | |
| 16 | diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h |
developer | 43a264f | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 17 | index 2a4aa796..f1cd2e50 100644 |
developer | 8935fc1 | 2024-01-11 14:08:37 +0800 | [diff] [blame] | 18 | --- a/mt76_connac_mcu.h |
| 19 | +++ b/mt76_connac_mcu.h |
| 20 | @@ -610,6 +610,12 @@ struct sta_rec_ra_fixed { |
| 21 | u8 mmps_mode; |
| 22 | } __packed; |
| 23 | |
| 24 | +struct sta_rec_tx_proc { |
| 25 | + __le16 tag; |
| 26 | + __le16 len; |
| 27 | + __le32 flag; |
| 28 | +} __packed; |
| 29 | + |
| 30 | /* wtbl_rec */ |
| 31 | |
| 32 | struct wtbl_req_hdr { |
| 33 | @@ -777,6 +783,7 @@ struct wtbl_raw { |
| 34 | sizeof(struct sta_rec_ra_fixed) + \ |
| 35 | sizeof(struct sta_rec_he_6g_capa) + \ |
| 36 | sizeof(struct sta_rec_pn_info) + \ |
| 37 | + sizeof(struct sta_rec_tx_proc) + \ |
| 38 | sizeof(struct tlv) + \ |
| 39 | MT76_CONNAC_WTBL_UPDATE_MAX_SIZE) |
| 40 | |
| 41 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
developer | 43a264f | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 42 | index 0f1905f2..aa054167 100644 |
developer | 8935fc1 | 2024-01-11 14:08:37 +0800 | [diff] [blame] | 43 | --- a/mt7996/mcu.c |
| 44 | +++ b/mt7996/mcu.c |
developer | 43a264f | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 45 | @@ -1748,6 +1748,19 @@ mt7996_mcu_sta_bfee_tlv(struct mt7996_dev *dev, struct sk_buff *skb, |
developer | 8935fc1 | 2024-01-11 14:08:37 +0800 | [diff] [blame] | 46 | bfee->fb_identity_matrix = (nrow == 1 && tx_ant == 2); |
| 47 | } |
| 48 | |
| 49 | +static void |
| 50 | +mt7996_mcu_sta_tx_proc_tlv(struct sk_buff *skb) |
| 51 | +{ |
| 52 | + struct sta_rec_tx_proc *tx_proc; |
| 53 | + struct tlv *tlv; |
| 54 | + |
| 55 | + tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_TX_PROC, sizeof(*tx_proc)); |
| 56 | + |
| 57 | + tx_proc = (struct sta_rec_tx_proc *)tlv; |
| 58 | + /* CSO is enabled if this flag exists. */ |
| 59 | + tx_proc->flag = cpu_to_le32(0); |
| 60 | +} |
| 61 | + |
| 62 | static void |
| 63 | mt7996_mcu_sta_hdrt_tlv(struct mt7996_dev *dev, struct sk_buff *skb) |
| 64 | { |
developer | 43a264f | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 65 | @@ -2159,6 +2172,8 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif, |
developer | 8935fc1 | 2024-01-11 14:08:37 +0800 | [diff] [blame] | 66 | |
| 67 | /* starec hdr trans */ |
| 68 | mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, sta); |
| 69 | + /* starec tx proc */ |
| 70 | + mt7996_mcu_sta_tx_proc_tlv(skb); |
| 71 | |
| 72 | /* tag order is in accordance with firmware dependency. */ |
| 73 | if (sta) { |
| 74 | -- |
| 75 | 2.18.0 |
| 76 | |