developer | 78848c6 | 2023-04-06 13:44:00 +0800 | [diff] [blame^] | 1 | From 3c5f2f053c8115e1a0a818c9f8ba270b30d69c88 Mon Sep 17 00:00:00 2001 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 2 | From: Bo Jiao <Bo.Jiao@mediatek.com> |
| 3 | Date: Mon, 6 Feb 2023 10:40:33 +0800 |
developer | d5789dc | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 4 | Subject: [PATCH 11/29] wifi: mt76: mt7996: set txd v1 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
| 7 | mt7996/mac.c | 3 +++ |
| 8 | mt7996/mac.h | 3 ++- |
| 9 | 2 files changed, 5 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | diff --git a/mt7996/mac.c b/mt7996/mac.c |
developer | 78848c6 | 2023-04-06 13:44:00 +0800 | [diff] [blame^] | 12 | index 198eb71..40ef5e4 100644 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 13 | --- a/mt7996/mac.c |
| 14 | +++ b/mt7996/mac.c |
| 15 | @@ -1096,6 +1096,7 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, |
| 16 | struct mt76_txwi_cache *t; |
| 17 | int id, i, pid, nbuf = tx_info->nbuf - 1; |
| 18 | bool is_8023 = info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP; |
| 19 | + __le32 *txd = (__le32 *)txwi_ptr; |
| 20 | u8 *txwi = (u8 *)txwi_ptr; |
| 21 | |
| 22 | if (unlikely(tx_info->skb->len <= ETH_HLEN)) |
| 23 | @@ -1127,6 +1128,8 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, |
| 24 | mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, qid, |
| 25 | pid, key, 0); |
| 26 | |
| 27 | + txd[0] |= le32_encode_bits(1, MT_TXD0_VER); |
| 28 | + |
| 29 | txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE); |
| 30 | for (i = 0; i < nbuf; i++) { |
| 31 | txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr); |
| 32 | diff --git a/mt7996/mac.h b/mt7996/mac.h |
developer | 78848c6 | 2023-04-06 13:44:00 +0800 | [diff] [blame^] | 33 | index 2cc218f..4914d3e 100644 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 34 | --- a/mt7996/mac.h |
| 35 | +++ b/mt7996/mac.h |
| 36 | @@ -183,7 +183,8 @@ enum tx_mgnt_type { |
| 37 | |
| 38 | #define MT_TXD0_Q_IDX GENMASK(31, 25) |
| 39 | #define MT_TXD0_PKT_FMT GENMASK(24, 23) |
| 40 | -#define MT_TXD0_ETH_TYPE_OFFSET GENMASK(22, 16) |
| 41 | +#define MT_TXD0_VER GENMASK(22, 19) |
| 42 | +#define MT_TXD0_ETH_TYPE_OFFSET GENMASK(18, 16) |
| 43 | #define MT_TXD0_TX_BYTES GENMASK(15, 0) |
| 44 | |
| 45 | #define MT_TXD1_FIXED_RATE BIT(31) |
| 46 | -- |
developer | 78848c6 | 2023-04-06 13:44:00 +0800 | [diff] [blame^] | 47 | 2.18.0 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 48 | |