From: Shayne Chen <shayne.chen@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Ryder Lee <ryder.lee@mediatek.com>,
Evelyn Tsai <evelyn.tsai@mediatek.com>,
Bo Jiao <Bo.Jiao@mediatek.com>,
linux-mediatek <linux-mediatek@lists.infradead.org>,
Benjamin Lin <benjamin-jw.lin@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>
Subject: [PATCH 7/8] wifi: mt76: connac: add new definition of tx descriptor
Date: Mon, 13 Nov 2023 15:06:18 +0800 [thread overview]
Message-ID: <20231113070619.19964-8-shayne.chen@mediatek.com> (raw)
In-Reply-To: <20231113070619.19964-1-shayne.chen@mediatek.com>
From: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Add MT_TXD6_MSDU_CNT_V2 bitfield, which is used by mt7992 chipsets.
This is a preliminary patch for mt7992 chipsets support.
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
index 36edf1d3dfca..ecd7889209f3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
@@ -245,6 +245,7 @@ enum tx_mgnt_type {
#define MT_TXD6_TIMESTAMP_OFS_EN BIT(15)
#define MT_TXD6_TIMESTAMP_OFS_IDX GENMASK(14, 10)
#define MT_TXD6_MSDU_CNT GENMASK(9, 4)
+#define MT_TXD6_MSDU_CNT_V2 GENMASK(15, 10)
#define MT_TXD6_DIS_MAT BIT(3)
#define MT_TXD6_DAS BIT(2)
#define MT_TXD6_AMSDU_CAP BIT(1)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 9db610e2645f..ed5b61e59b43 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -873,8 +873,11 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
val |= MT_TXD5_TX_STATUS_HOST;
txwi[5] = cpu_to_le32(val);
- val = MT_TXD6_DIS_MAT | MT_TXD6_DAS |
- FIELD_PREP(MT_TXD6_MSDU_CNT, 1);
+ val = MT_TXD6_DIS_MAT | MT_TXD6_DAS;
+ if (is_mt7996(&dev->mt76))
+ val |= FIELD_PREP(MT_TXD6_MSDU_CNT, 1);
+ else
+ val |= FIELD_PREP(MT_TXD6_MSDU_CNT_V2, 1);
txwi[6] = cpu_to_le32(val);
txwi[7] = 0;
--
2.39.2
next prev parent reply other threads:[~2023-11-13 7:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 7:06 [PATCH 0/8] Add MT7992 support Shayne Chen
2023-11-13 7:06 ` [PATCH 1/8] wifi: mt76: mt7996: introduce mt7996_band_valid() Shayne Chen
2023-11-13 7:06 ` [PATCH 2/8] wifi: mt76: connac: add firmware support for mt7992 Shayne Chen
2023-11-13 7:06 ` [PATCH 3/8] wifi: mt76: mt7996: add DMA " Shayne Chen
2023-11-13 7:06 ` [PATCH 4/8] wifi: mt76: mt7996: rework register offsets " Shayne Chen
2023-11-13 7:06 ` [PATCH 5/8] wifi: mt76: mt7996: support mt7992 eeprom loading Shayne Chen
2023-11-13 11:08 ` Lorenzo Bianconi
2023-11-13 7:06 ` [PATCH 6/8] wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992 Shayne Chen
2023-11-13 7:06 ` Shayne Chen [this message]
2023-11-13 7:06 ` [PATCH 8/8] wifi: mt76: mt7996: add PCI IDs " Shayne Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231113070619.19964-8-shayne.chen@mediatek.com \
--to=shayne.chen@mediatek.com \
--cc=Bo.Jiao@mediatek.com \
--cc=benjamin-jw.lin@mediatek.com \
--cc=evelyn.tsai@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox