blob: fdaa90b426c01f2c5ad6386eef86aa18d3deee82 [file] [log] [blame]
developerb85e8752023-09-25 14:16:05 +08001From fd4524824058ee584f62e5762935f012679d85b8 Mon Sep 17 00:00:00 2001
2From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Tue, 19 Sep 2023 11:21:23 +0800
4Subject: [PATCH 01/22] Revert "wifi: mt76: mt7996: fill txd by host driver"
5
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
12index c43839a20..1a1e21872 100644
13--- 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--
432.39.2
44