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>,
Shayne Chen <shayne.chen@mediatek.com>,
Peter Chiu <chui-hao.chiu@mediatek.com>
Subject: [PATCH v2 1/9] wifi: mt76: connac: rework macros for unified command
Date: Thu, 10 Nov 2022 17:35:17 +0800 [thread overview]
Message-ID: <20221110093525.29649-2-shayne.chen@mediatek.com> (raw)
In-Reply-To: <20221110093525.29649-1-shayne.chen@mediatek.com>
Rework some macros for connac3 unified command.
This is a preliminary patch to add mt7996 chipset support.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
.../wireless/mediatek/mt76/mt76_connac_mcu.h | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index 8166722d4717..d3d5ba2d47ad 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -63,7 +63,7 @@ struct mt76_connac2_mcu_txd {
} __packed __aligned(4);
/**
- * struct mt76_connac2_mcu_uni_txd - mcu command descriptor for firmware v3
+ * struct mt76_connac2_mcu_uni_txd - mcu command descriptor for connac2 and connac3
* @txd: hardware descriptor
* @len: total length not including txd
* @cid: command identifier
@@ -1074,10 +1074,11 @@ enum {
#define MCU_CMD_ACK BIT(0)
#define MCU_CMD_UNI BIT(1)
-#define MCU_CMD_QUERY BIT(2)
+#define MCU_CMD_SET BIT(2)
#define MCU_CMD_UNI_EXT_ACK (MCU_CMD_ACK | MCU_CMD_UNI | \
- MCU_CMD_QUERY)
+ MCU_CMD_SET)
+#define MCU_CMD_UNI_QUERY_ACK (MCU_CMD_ACK | MCU_CMD_UNI)
#define __MCU_CMD_FIELD_ID GENMASK(7, 0)
#define __MCU_CMD_FIELD_EXT_ID GENMASK(15, 8)
@@ -1085,6 +1086,7 @@ enum {
#define __MCU_CMD_FIELD_UNI BIT(17)
#define __MCU_CMD_FIELD_CE BIT(18)
#define __MCU_CMD_FIELD_WA BIT(19)
+#define __MCU_CMD_FIELD_WM BIT(20)
#define MCU_CMD(_t) FIELD_PREP(__MCU_CMD_FIELD_ID, \
MCU_CMD_##_t)
@@ -1106,6 +1108,16 @@ enum {
FIELD_PREP(__MCU_CMD_FIELD_EXT_ID, \
MCU_WA_PARAM_CMD_##_t))
+#define MCU_WM_UNI_CMD(_t) (MCU_UNI_CMD(_t) | \
+ __MCU_CMD_FIELD_WM)
+#define MCU_WM_UNI_CMD_QUERY(_t) (MCU_UNI_CMD(_t) | \
+ __MCU_CMD_FIELD_QUERY | \
+ __MCU_CMD_FIELD_WM)
+#define MCU_WA_UNI_CMD(_t) (MCU_UNI_CMD(_t) | \
+ __MCU_CMD_FIELD_WA)
+#define MCU_WMWA_UNI_CMD(_t) (MCU_WM_UNI_CMD(_t) | \
+ __MCU_CMD_FIELD_WA)
+
enum {
MCU_EXT_CMD_EFUSE_ACCESS = 0x01,
MCU_EXT_CMD_RF_REG_ACCESS = 0x02,
--
2.25.1
next prev parent reply other threads:[~2022-11-10 9:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 9:35 [PATCH v2 0/9] Add driver for MediaTek Wi-Fi 7 devices Shayne Chen
2022-11-10 9:35 ` Shayne Chen [this message]
2022-11-10 9:35 ` [PATCH v2 2/9] wifi: mt76: connac: update struct sta_rec_phy Shayne Chen
2022-11-10 9:35 ` [PATCH v2 3/9] wifi: mt76: connac: rework fields for larger bandwidth support in sta_rec_bf Shayne Chen
2022-11-10 9:35 ` [PATCH v2 4/9] wifi: mt76: connac: add more unified command IDs Shayne Chen
2022-11-10 9:35 ` [PATCH v2 5/9] wifi: mt76: connac: introduce unified event table Shayne Chen
2022-11-10 9:35 ` [PATCH v2 6/9] wifi: mt76: connac: add more bss info command tags Shayne Chen
2022-11-10 9:35 ` [PATCH v2 7/9] wifi: mt76: connac: add more starec " Shayne Chen
2022-11-10 9:35 ` [PATCH v2 8/9] wifi: mt76: connac: introduce helper for mt7996 chipset Shayne Chen
2022-11-10 9:35 ` [PATCH v2 9/9] wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices Shayne Chen
2022-11-21 15:07 ` Kalle Valo
2022-11-21 19:45 ` Ryder Lee
2022-11-23 7:36 ` Kalle Valo
2022-11-22 9:04 ` shayne.chen
2022-11-23 7:37 ` Kalle Valo
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=20221110093525.29649-2-shayne.chen@mediatek.com \
--to=shayne.chen@mediatek.com \
--cc=Bo.Jiao@mediatek.com \
--cc=chui-hao.chiu@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;
as well as URLs for NNTP newsgroup(s).