Commit a30e0094 authored by Howard Hsu's avatar Howard Hsu Committed by Felix Fietkau

wifi: mt76: connac: enable HW CSO module for mt7996

For mt7996 chipsets, the HW CSO module can help to identify TCP traffic,
which assists the firmware in adjusting algorithms to improve overall
performance.
Signed-off-by: default avatarHoward Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 20199599
...@@ -610,6 +610,12 @@ struct sta_rec_ra_fixed { ...@@ -610,6 +610,12 @@ struct sta_rec_ra_fixed {
u8 mmps_mode; u8 mmps_mode;
} __packed; } __packed;
struct sta_rec_tx_proc {
__le16 tag;
__le16 len;
__le32 flag;
} __packed;
/* wtbl_rec */ /* wtbl_rec */
struct wtbl_req_hdr { struct wtbl_req_hdr {
...@@ -777,6 +783,7 @@ struct wtbl_raw { ...@@ -777,6 +783,7 @@ struct wtbl_raw {
sizeof(struct sta_rec_ra_fixed) + \ sizeof(struct sta_rec_ra_fixed) + \
sizeof(struct sta_rec_he_6g_capa) + \ sizeof(struct sta_rec_he_6g_capa) + \
sizeof(struct sta_rec_pn_info) + \ sizeof(struct sta_rec_pn_info) + \
sizeof(struct sta_rec_tx_proc) + \
sizeof(struct tlv) + \ sizeof(struct tlv) + \
MT76_CONNAC_WTBL_UPDATE_MAX_SIZE) MT76_CONNAC_WTBL_UPDATE_MAX_SIZE)
......
...@@ -1748,6 +1748,18 @@ mt7996_mcu_sta_bfee_tlv(struct mt7996_dev *dev, struct sk_buff *skb, ...@@ -1748,6 +1748,18 @@ mt7996_mcu_sta_bfee_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
bfee->fb_identity_matrix = (nrow == 1 && tx_ant == 2); bfee->fb_identity_matrix = (nrow == 1 && tx_ant == 2);
} }
static void
mt7996_mcu_sta_tx_proc_tlv(struct sk_buff *skb)
{
struct sta_rec_tx_proc *tx_proc;
struct tlv *tlv;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_TX_PROC, sizeof(*tx_proc));
tx_proc = (struct sta_rec_tx_proc *)tlv;
tx_proc->flag = cpu_to_le32(0);
}
static void static void
mt7996_mcu_sta_hdrt_tlv(struct mt7996_dev *dev, struct sk_buff *skb) mt7996_mcu_sta_hdrt_tlv(struct mt7996_dev *dev, struct sk_buff *skb)
{ {
...@@ -2159,6 +2171,8 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif, ...@@ -2159,6 +2171,8 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,
/* starec hdr trans */ /* starec hdr trans */
mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, sta); mt7996_mcu_sta_hdr_trans_tlv(dev, skb, vif, sta);
/* starec tx proc */
mt7996_mcu_sta_tx_proc_tlv(skb);
/* tag order is in accordance with firmware dependency. */ /* tag order is in accordance with firmware dependency. */
if (sta) { if (sta) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment