blob: 84e8b9796d5dc3b3c38c7e93e81dc8f3f5b8c6ac [file] [log] [blame]
developer9237f442024-06-14 17:13:04 +08001From 803b79d47849d9f35f797f86efc63d57758a1dbd Mon Sep 17 00:00:00 2001
developerbd9fa1e2023-10-16 11:04:00 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Tue, 19 Sep 2023 11:21:23 +0800
developer66e89bc2024-04-23 14:50:01 +08004Subject: [PATCH 001/116] mtk: Revert "wifi: mt76: mt7996: fill txd by host
developer1a173672023-12-21 14:49:33 +08005 driver"
developerbd9fa1e2023-10-16 11:04:00 +08006
7This reverts commit 325a0c4931990d553487024c4f76c776492bdcc2.
8---
9 mt7996/mac.c | 13 +++++++++----
10 1 file changed, 9 insertions(+), 4 deletions(-)
11
12diff --git a/mt7996/mac.c b/mt7996/mac.c
developer9237f442024-06-14 17:13:04 +080013index bc7111a..3afdd7e 100644
developerbd9fa1e2023-10-16 11:04:00 +080014--- a/mt7996/mac.c
15+++ b/mt7996/mac.c
developer753619c2024-02-22 13:42:45 +080016@@ -938,8 +938,11 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
developerbd9fa1e2023-10-16 11:04:00 +080017 return id;
18
19 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
20- mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
21- pid, qid, 0);
22+ memset(txwi_ptr, 0, MT_TXD_SIZE);
23+ /* Transmit non qos data by 802.11 header and need to fill txd by host*/
24+ if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
25+ mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
26+ pid, qid, 0);
27
28 txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
29 for (i = 0; i < nbuf; i++) {
developer753619c2024-02-22 13:42:45 +080030@@ -956,8 +959,10 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
developerbd9fa1e2023-10-16 11:04:00 +080031 }
32 txp->fw.nbuf = nbuf;
33
34- txp->fw.flags =
35- cpu_to_le16(MT_CT_INFO_FROM_HOST | MT_CT_INFO_APPLY_TXD);
36+ txp->fw.flags = cpu_to_le16(MT_CT_INFO_FROM_HOST);
37+
38+ if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
39+ txp->fw.flags |= cpu_to_le16(MT_CT_INFO_APPLY_TXD);
40
41 if (!key)
42 txp->fw.flags |= cpu_to_le16(MT_CT_INFO_NONE_CIPHER_FRAME);
43--
developer9237f442024-06-14 17:13:04 +0800442.18.0
developerbd9fa1e2023-10-16 11:04:00 +080045