blob: bef1050fc151792cb84bfce521882e7653c0c506 [file] [log] [blame]
developer7e2761e2023-10-12 08:11:13 +08001From 455955959ceaabf80454570c2dfaa3128d524791 Mon Sep 17 00:00:00 2001
developerc2cfe0f2023-09-22 04:11:09 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Tue, 19 Sep 2023 11:21:23 +0800
developer7e2761e2023-10-12 08:11:13 +08004Subject: [PATCH 01/98] Revert "wifi: mt76: mt7996: fill txd by host driver"
developerc2cfe0f2023-09-22 04:11:09 +08005
6This reverts commit 325a0c4931990d553487024c4f76c776492bdcc2.
7---
8 mt7996/mac.c | 13 +++++++++----
9 1 file changed, 9 insertions(+), 4 deletions(-)
10
11diff --git a/mt7996/mac.c b/mt7996/mac.c
developer7e2761e2023-10-12 08:11:13 +080012index c43839a..1a1e218 100644
developerc2cfe0f2023-09-22 04:11:09 +080013--- a/mt7996/mac.c
14+++ b/mt7996/mac.c
15@@ -967,8 +967,11 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
16 return id;
17
18 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
19- mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
20- pid, qid, 0);
21+ memset(txwi_ptr, 0, MT_TXD_SIZE);
22+ /* Transmit non qos data by 802.11 header and need to fill txd by host*/
23+ if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
24+ mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
25+ pid, qid, 0);
26
27 txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
28 for (i = 0; i < nbuf; i++) {
29@@ -977,8 +980,10 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
30 }
31 txp->fw.nbuf = nbuf;
32
33- txp->fw.flags =
34- cpu_to_le16(MT_CT_INFO_FROM_HOST | MT_CT_INFO_APPLY_TXD);
35+ txp->fw.flags = cpu_to_le16(MT_CT_INFO_FROM_HOST);
36+
37+ if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
38+ txp->fw.flags |= cpu_to_le16(MT_CT_INFO_APPLY_TXD);
39
40 if (!key)
41 txp->fw.flags |= cpu_to_le16(MT_CT_INFO_NONE_CIPHER_FRAME);
42--
developer7e2761e2023-10-12 08:11:13 +0800432.18.0
developerc2cfe0f2023-09-22 04:11:09 +080044