developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 1 | From c3a050d2155dd5945d3d790256a82fb9a0b1bda5 Mon Sep 17 00:00:00 2001 |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Tue, 19 Sep 2023 11:21:23 +0800 |
developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 001/193] mtk: Revert "wifi: mt76: mt7996: fill txd by host |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 5 | driver" |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 6 | |
| 7 | This reverts commit 325a0c4931990d553487024c4f76c776492bdcc2. |
| 8 | --- |
| 9 | mt7996/mac.c | 13 +++++++++---- |
| 10 | 1 file changed, 9 insertions(+), 4 deletions(-) |
| 11 | |
| 12 | diff --git a/mt7996/mac.c b/mt7996/mac.c |
developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 13 | index 4706dde..29297c0 100644 |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 14 | --- a/mt7996/mac.c |
| 15 | +++ b/mt7996/mac.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 16 | @@ -958,8 +958,11 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 17 | 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++) { |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 30 | @@ -976,8 +979,10 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 31 | } |
| 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 | -- |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 44 | 2.45.2 |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 45 | |