diff mbox series

[v2,01/19] mt76: move MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO defs in dma.h

Message ID bcf24fdbf8a3d023fc716e65dc190756232f0645.1533023328.git.lorenzo.bianconi@redhat.com (mailing list archive)
State Accepted
Commit 66fc44b71c59165597afd751c5b2825a4d8e1456
Delegated to: Kalle Valo
Headers show
Series add mt76x2u support to mt76 driver | expand

Commit Message

Lorenzo Bianconi July 31, 2018, 8:09 a.m. UTC
Since MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO definitions are in
common between mt76x2u, mt76x2 and mt76x0u move them in dma.h in order
to reuse usb code supporting mt76x2u and mt76x0u based devices

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/dma.h      | 38 +++++++++++++++++++
 .../net/wireless/mediatek/mt76/mt76x2_dma.h   | 38 -------------------
 2 files changed, 38 insertions(+), 38 deletions(-)

Comments

Kalle Valo Aug. 2, 2018, 6:49 p.m. UTC | #1
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:

> Since MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO definitions are in
> common between mt76x2u, mt76x2 and mt76x0u move them in dma.h in order
> to reuse usb code supporting mt76x2u and mt76x0u based devices
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

19 patches applied to wireless-drivers-next.git, thanks.

66fc44b71c59 mt76: move MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO defs in dma.h
35ecee1f6755 mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h
2edb2ae5e60a mt76x2: move utility routines in mt76x2.h
15fdb7a07bbe mt76x2: introduce mt76x2_init_device routine
4681e0c79e43 mt76x2: move interface_modes definition in mt76x2_init
d3c94b40460b mt76x2: introduce mt76x2_mac_load_tx_status routine
81e850ef2625 mt76x2: add napi struct to mt76_rx_poll_complete/mt76_rx_complete signatures
bbd89d948108 mt76x2: add buffer len to mt76x2_mac_write_txwi signature
fcdd99ce7267 mt76: rename mt76_tx_queue_skb in mt76_dma_tx_queue_skb
469d48188625 mt76: introduce tx_queue_skb function pointer in mt76_bus_ops
d20ad5816962 mt76: introduce mt76x2-common module
9367a9c7f956 mt76: add mt76x2_tx_common to mt76x2-common module
b9c45e1c42b7 mt76: add mt76x2_mac_common to mt76x2-common module
43930193a874 mt76: add mt76x2_init_common to mt76x2-common module
2de8c3eb7ed7 mt76: add mt76x2_common to mt76x2-common module
5f0d10ceee47 mt76: add mt76x2_phy_common to mt76x2-common module
037804002b8a mt76: move mt76x2_debugfs in mt76-common module
b40b15e1521f mt76: add usb support to mt76 layer
ee676cd5017c mt76: add driver code for MT76x2u based devices
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/dma.h b/drivers/net/wireless/mediatek/mt76/dma.h
index 1dad39697929..14cfb2dbca25 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.h
+++ b/drivers/net/wireless/mediatek/mt76/dma.h
@@ -25,6 +25,34 @@ 
 #define MT_DMA_CTL_LAST_SEC0		BIT(30)
 #define MT_DMA_CTL_DMA_DONE		BIT(31)
 
+#define MT_TXD_INFO_LEN			GENMASK(15, 0)
+#define MT_TXD_INFO_NEXT_VLD		BIT(16)
+#define MT_TXD_INFO_TX_BURST		BIT(17)
+#define MT_TXD_INFO_80211		BIT(19)
+#define MT_TXD_INFO_TSO			BIT(20)
+#define MT_TXD_INFO_CSO			BIT(21)
+#define MT_TXD_INFO_WIV			BIT(24)
+#define MT_TXD_INFO_QSEL		GENMASK(26, 25)
+#define MT_TXD_INFO_DPORT		GENMASK(29, 27)
+#define MT_TXD_INFO_TYPE		GENMASK(31, 30)
+
+#define MT_RX_FCE_INFO_LEN		GENMASK(13, 0)
+#define MT_RX_FCE_INFO_SELF_GEN		BIT(15)
+#define MT_RX_FCE_INFO_CMD_SEQ		GENMASK(19, 16)
+#define MT_RX_FCE_INFO_EVT_TYPE		GENMASK(23, 20)
+#define MT_RX_FCE_INFO_PCIE_INTR	BIT(24)
+#define MT_RX_FCE_INFO_QSEL		GENMASK(26, 25)
+#define MT_RX_FCE_INFO_D_PORT		GENMASK(29, 27)
+#define MT_RX_FCE_INFO_TYPE		GENMASK(31, 30)
+
+/* MCU request message header  */
+#define MT_MCU_MSG_LEN			GENMASK(15, 0)
+#define MT_MCU_MSG_CMD_SEQ		GENMASK(19, 16)
+#define MT_MCU_MSG_CMD_TYPE		GENMASK(26, 20)
+#define MT_MCU_MSG_PORT			GENMASK(29, 27)
+#define MT_MCU_MSG_TYPE			GENMASK(31, 30)
+#define MT_MCU_MSG_TYPE_CMD		BIT(30)
+
 struct mt76_desc {
 	__le32 buf0;
 	__le32 ctrl;
@@ -32,6 +60,16 @@  struct mt76_desc {
 	__le32 info;
 } __packed __aligned(4);
 
+enum dma_msg_port {
+	WLAN_PORT,
+	CPU_RX_PORT,
+	CPU_TX_PORT,
+	HOST_PORT,
+	VIRTUAL_CPU_RX_PORT,
+	VIRTUAL_CPU_TX_PORT,
+	DISCARD,
+};
+
 int mt76_dma_attach(struct mt76_dev *dev);
 void mt76_dma_cleanup(struct mt76_dev *dev);
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dma.h b/drivers/net/wireless/mediatek/mt76/mt76x2_dma.h
index e9d426bbf91a..da294558c268 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_dma.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dma.h
@@ -19,34 +19,6 @@ 
 
 #include "dma.h"
 
-#define MT_TXD_INFO_LEN			GENMASK(15, 0)
-#define MT_TXD_INFO_NEXT_VLD		BIT(16)
-#define MT_TXD_INFO_TX_BURST		BIT(17)
-#define MT_TXD_INFO_80211		BIT(19)
-#define MT_TXD_INFO_TSO			BIT(20)
-#define MT_TXD_INFO_CSO			BIT(21)
-#define MT_TXD_INFO_WIV			BIT(24)
-#define MT_TXD_INFO_QSEL		GENMASK(26, 25)
-#define MT_TXD_INFO_DPORT		GENMASK(29, 27)
-#define MT_TXD_INFO_TYPE		GENMASK(31, 30)
-
-#define MT_RX_FCE_INFO_LEN		GENMASK(13, 0)
-#define MT_RX_FCE_INFO_SELF_GEN		BIT(15)
-#define MT_RX_FCE_INFO_CMD_SEQ		GENMASK(19, 16)
-#define MT_RX_FCE_INFO_EVT_TYPE		GENMASK(23, 20)
-#define MT_RX_FCE_INFO_PCIE_INTR	BIT(24)
-#define MT_RX_FCE_INFO_QSEL		GENMASK(26, 25)
-#define MT_RX_FCE_INFO_D_PORT		GENMASK(29, 27)
-#define MT_RX_FCE_INFO_TYPE		GENMASK(31, 30)
-
-/* MCU request message header  */
-#define MT_MCU_MSG_LEN			GENMASK(15, 0)
-#define MT_MCU_MSG_CMD_SEQ		GENMASK(19, 16)
-#define MT_MCU_MSG_CMD_TYPE		GENMASK(26, 20)
-#define MT_MCU_MSG_PORT			GENMASK(29, 27)
-#define MT_MCU_MSG_TYPE			GENMASK(31, 30)
-#define MT_MCU_MSG_TYPE_CMD		BIT(30)
-
 enum mt76x2_qsel {
 	MT_QSEL_MGMT,
 	MT_QSEL_HCCA,
@@ -54,14 +26,4 @@  enum mt76x2_qsel {
 	MT_QSEL_EDCA_2,
 };
 
-enum dma_msg_port {
-	WLAN_PORT,
-	CPU_RX_PORT,
-	CPU_TX_PORT,
-	HOST_PORT,
-	VIRTUAL_CPU_RX_PORT,
-	VIRTUAL_CPU_TX_PORT,
-	DISCARD,
-};
-
 #endif