linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] mt7663u preparation series
@ 2020-02-28 13:29 Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 1/6] mt76: mt7615: introduce mt7663u support to mt7615_write_txwi Lorenzo Bianconi
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

This is the first series to rework mt7615 code for mt7663u
driver integration.
This series is based on "Introduce mt7663e support to mt7615 driver"
https://patchwork.kernel.org/cover/11395095/

Lorenzo Bianconi (6):
  mt76: mt7615: introduce mt7663u support to mt7615_write_txwi
  mt76: mt7615: introduce mt7615_mcu_fill_msg
  mt76: mt7615: introduce mt7615_mcu_wait_response
  mt76: mt7615: cleanup fw queue just for mmio devices
  mt76: mt7615: introduce mt7615_init_device routine
  mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h

 .../net/wireless/mediatek/mt76/mt7615/init.c  | 27 ++++----
 .../net/wireless/mediatek/mt76/mt7615/mac.c   | 17 +++--
 .../net/wireless/mediatek/mt76/mt7615/mac.h   |  6 ++
 .../net/wireless/mediatek/mt76/mt7615/mcu.c   | 62 ++++++++++++-------
 .../wireless/mediatek/mt76/mt7615/mt7615.h    |  3 +
 5 files changed, 72 insertions(+), 43 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] mt76: mt7615: introduce mt7663u support to mt7615_write_txwi
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
@ 2020-02-28 13:29 ` Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 2/6] mt76: mt7615: introduce mt7615_mcu_fill_msg Lorenzo Bianconi
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

Extend mt7615_write_txwi routine to support usb txwi configuration

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 12 ++++++++----
 drivers/net/wireless/mediatek/mt76/mt7615/mac.h |  1 +
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index c5244006cd9c..a14ca0825582 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -512,11 +512,12 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
 	struct ieee80211_vif *vif = info->control.vif;
 	struct mt76_phy *mphy = &dev->mphy;
 	bool ext_phy = info->hw_queue & MT_TX_HW_QUEUE_EXT_PHY;
+	bool is_usb = mt76_is_usb(&dev->mt76);
 	int tx_count = 8;
 	u8 fc_type, fc_stype, p_fmt, q_idx, omac_idx = 0, wmm_idx = 0;
 	__le16 fc = hdr->frame_control;
+	u32 val, sz_txd = is_usb ? MT_USB_TXD_SIZE : MT_TXD_SIZE;
 	u16 seqno = 0;
-	u32 val;
 
 	if (vif) {
 		struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
@@ -540,7 +541,7 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
 	if (ieee80211_is_data(fc) || ieee80211_is_bufferable_mmpdu(fc)) {
 		q_idx = wmm_idx * MT7615_MAX_WMM_SETS +
 			skb_get_queue_mapping(skb);
-		p_fmt = MT_TX_TYPE_CT;
+		p_fmt = is_usb ? MT_TX_TYPE_SF : MT_TX_TYPE_CT;
 	} else if (ieee80211_is_beacon(fc)) {
 		if (ext_phy)
 			q_idx = MT_LMAC_BCN1;
@@ -552,10 +553,10 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
 			q_idx = MT_LMAC_ALTX1;
 		else
 			q_idx = MT_LMAC_ALTX0;
-		p_fmt = MT_TX_TYPE_CT;
+		p_fmt = is_usb ? MT_TX_TYPE_SF : MT_TX_TYPE_CT;
 	}
 
-	val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + MT_TXD_SIZE) |
+	val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + sz_txd) |
 	      FIELD_PREP(MT_TXD0_P_IDX, MT_TX_PORT_IDX_LMAC) |
 	      FIELD_PREP(MT_TXD0_Q_IDX, q_idx);
 	txwi[0] = cpu_to_le32(val);
@@ -649,6 +650,9 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
 
 	txwi[7] = FIELD_PREP(MT_TXD7_TYPE, fc_type) |
 		  FIELD_PREP(MT_TXD7_SUB_TYPE, fc_stype);
+	if (is_usb)
+		txwi[8] = FIELD_PREP(MT_TXD8_L_TYPE, fc_type) |
+			  FIELD_PREP(MT_TXD8_L_SUB_TYPE, fc_stype);
 
 	return 0;
 }
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.h b/drivers/net/wireless/mediatek/mt76/mt7615/mac.h
index 2e052f6d9761..5fe6a0e667a9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.h
@@ -163,6 +163,7 @@ enum tx_phy_bandwidth {
 #define MT_CT_INFO_NONE_CIPHER_FRAME	BIT(3)
 #define MT_CT_INFO_HSR2_TX		BIT(4)
 
+#define MT_USB_TXD_SIZE			(MT_TXD_SIZE + 8 * 4)
 #define MT_TXD_SIZE			(8 * 4)
 
 #define MT_TXD0_P_IDX			BIT(31)
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] mt76: mt7615: introduce mt7615_mcu_fill_msg
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 1/6] mt76: mt7615: introduce mt7663u support to mt7615_write_txwi Lorenzo Bianconi
@ 2020-02-28 13:29 ` Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 3/6] mt76: mt7615: introduce mt7615_mcu_wait_response Lorenzo Bianconi
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

Introduce mt7615_mcu_fill_msg routine to initialize mcu messages.
mt7615_mcu_fill_msg will be reused adding mt7663u support

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../net/wireless/mediatek/mt76/mt7615/mcu.c   | 20 +++++++++++--------
 .../wireless/mediatek/mt76/mt7615/mt7615.h    |  2 ++
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 89f679c16a71..9975ee3b6c99 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -79,22 +79,20 @@ struct mt7663_fw_buf {
 #define FW_START_OVERRIDE		BIT(0)
 #define FW_START_WORKING_PDA_CR4	BIT(2)
 
-static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb,
-				 int cmd, int *wait_seq)
+void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
+			 int cmd, int *wait_seq)
 {
 	struct mt7615_mcu_txd *mcu_txd;
 	u8 seq, q_idx, pkt_fmt;
-	enum mt76_txq_id qid;
-	u32 val;
 	__le32 *txd;
+	u32 val;
 
 	seq = ++dev->mt76.mcu.msg_seq & 0xf;
 	if (!seq)
 		seq = ++dev->mt76.mcu.msg_seq & 0xf;
 
-	mcu_txd = (struct mt7615_mcu_txd *)skb_push(skb,
-		   sizeof(struct mt7615_mcu_txd));
-	memset(mcu_txd, 0, sizeof(struct mt7615_mcu_txd));
+	mcu_txd = (struct mt7615_mcu_txd *)skb_push(skb, sizeof(*mcu_txd));
+	memset(mcu_txd, 0, sizeof(*mcu_txd));
 
 	if (cmd != -MCU_CMD_FW_SCATTER) {
 		q_idx = MT_TX_MCU_PORT_RX_Q0;
@@ -103,7 +101,6 @@ static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb,
 		q_idx = MT_TX_MCU_PORT_RX_FWDL;
 		pkt_fmt = MT_TX_TYPE_FW;
 	}
-
 	txd = mcu_txd->txd;
 
 	val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len) |
@@ -134,7 +131,14 @@ static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb,
 
 	if (wait_seq)
 		*wait_seq = seq;
+}
+
+static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb,
+				 int cmd, int *wait_seq)
+{
+	enum mt76_txq_id qid;
 
+	mt7615_mcu_fill_msg(dev, skb, cmd, wait_seq);
 	if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state))
 		qid = MT_TXQ_MCU;
 	else
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
index 7bf31ac2797e..1614a0b8ecb8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
@@ -376,6 +376,8 @@ int mt7615_mcu_set_rts_thresh(struct mt7615_phy *phy, u32 val);
 int mt7615_mcu_ctrl_pm_state(struct mt7615_dev *dev, int band, int enter);
 int mt7615_mcu_get_temperature(struct mt7615_dev *dev, int index);
 void mt7615_mcu_exit(struct mt7615_dev *dev);
+void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
+			 int cmd, int *wait_seq);
 
 int mt7615_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
 			  enum mt76_txq_id qid, struct mt76_wcid *wcid,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] mt76: mt7615: introduce mt7615_mcu_wait_response
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 1/6] mt76: mt7615: introduce mt7663u support to mt7615_write_txwi Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 2/6] mt76: mt7615: introduce mt7615_mcu_fill_msg Lorenzo Bianconi
@ 2020-02-28 13:29 ` Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 4/6] mt76: mt7615: cleanup fw queue just for mmio devices Lorenzo Bianconi
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

Introduce mt7615_mcu_wait_response in order to be reused parsing mt7663u
mcu messages

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../net/wireless/mediatek/mt76/mt7615/mcu.c   | 38 ++++++++++++-------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 9975ee3b6c99..43a376814be7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -174,12 +174,33 @@ mt7615_mcu_parse_response(struct mt7615_dev *dev, int cmd,
 	return ret;
 }
 
+int mt7615_mcu_wait_response(struct mt7615_dev *dev, int cmd, int seq)
+{
+	unsigned long expires = jiffies + 20 * HZ;
+	struct sk_buff *skb;
+	int ret = 0;
+
+	while (true) {
+		skb = mt76_mcu_get_response(&dev->mt76, expires);
+		if (!skb) {
+			dev_err(dev->mt76.dev, "Message %d (seq %d) timeout\n",
+				cmd, seq);
+			return -ETIMEDOUT;
+		}
+
+		ret = mt7615_mcu_parse_response(dev, cmd, skb, seq);
+		if (ret != -EAGAIN)
+			break;
+	}
+
+	return ret;
+}
+
 static int
 mt7615_mcu_msg_send(struct mt76_dev *mdev, int cmd, const void *data,
 		    int len, bool wait_resp)
 {
 	struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
-	unsigned long expires = jiffies + 20 * HZ;
 	struct sk_buff *skb;
 	int ret, seq;
 
@@ -193,19 +214,8 @@ mt7615_mcu_msg_send(struct mt76_dev *mdev, int cmd, const void *data,
 	if (ret)
 		goto out;
 
-	while (wait_resp) {
-		skb = mt76_mcu_get_response(mdev, expires);
-		if (!skb) {
-			dev_err(mdev->dev, "Message %d (seq %d) timeout\n",
-				cmd, seq);
-			ret = -ETIMEDOUT;
-			break;
-		}
-
-		ret = mt7615_mcu_parse_response(dev, cmd, skb, seq);
-		if (ret != -EAGAIN)
-			break;
-	}
+	if (wait_resp)
+		ret = mt7615_mcu_wait_response(dev, cmd, seq);
 
 out:
 	mutex_unlock(&mdev->mcu.mutex);
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] mt76: mt7615: cleanup fw queue just for mmio devices
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
                   ` (2 preceding siblings ...)
  2020-02-28 13:29 ` [PATCH 3/6] mt76: mt7615: introduce mt7615_mcu_wait_response Lorenzo Bianconi
@ 2020-02-28 13:29 ` Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 5/6] mt76: mt7615: introduce mt7615_init_device routine Lorenzo Bianconi
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

In order to reuse mt7615_mcu_send_firmware routine adding support for
usb devices, clean fw hw queue just for mmio devices

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 43a376814be7..e3b4248d2b16 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -351,7 +351,9 @@ static int mt7615_mcu_send_firmware(struct mt7615_dev *dev, const void *data,
 
 		data += cur_len;
 		len -= cur_len;
-		mt76_queue_tx_cleanup(dev, MT_TXQ_FWDL, false);
+
+		if (mt76_is_mmio(&dev->mt76))
+			mt76_queue_tx_cleanup(dev, MT_TXQ_FWDL, false);
 	}
 
 	return ret;
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] mt76: mt7615: introduce mt7615_init_device routine
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
                   ` (3 preceding siblings ...)
  2020-02-28 13:29 ` [PATCH 4/6] mt76: mt7615: cleanup fw queue just for mmio devices Lorenzo Bianconi
@ 2020-02-28 13:29 ` Lorenzo Bianconi
  2020-02-28 13:29 ` [PATCH 6/6] mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h Lorenzo Bianconi
  2020-03-08 10:45 ` [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

Add mt7615_init_device routine to configure the mt76 device adding
usb support to mt7615 driver

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../net/wireless/mediatek/mt76/mt7615/init.c  | 27 +++++++++++--------
 .../wireless/mediatek/mt76/mt7615/mt7615.h    |  1 +
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
index 3f9d87ebed8c..23cda1378770 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
@@ -441,11 +441,9 @@ void mt7615_unregister_ext_phy(struct mt7615_dev *dev)
 	ieee80211_free_hw(mphy->hw);
 }
 
-
-int mt7615_register_device(struct mt7615_dev *dev)
+void mt7615_init_device(struct mt7615_dev *dev)
 {
 	struct ieee80211_hw *hw = mt76_hw(dev);
-	int ret;
 
 	dev->phy.dev = dev;
 	dev->phy.mt76 = &dev->mt76.phy;
@@ -456,14 +454,6 @@ int mt7615_register_device(struct mt7615_dev *dev)
 	init_waitqueue_head(&dev->reset_wait);
 	INIT_WORK(&dev->reset_work, mt7615_mac_reset_work);
 
-	ret = mt7622_wmac_init(dev);
-	if (ret)
-		return ret;
-
-	ret = mt7615_init_hardware(dev);
-	if (ret)
-		return ret;
-
 	mt7615_init_wiphy(hw);
 	dev->mphy.sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
 	dev->mphy.sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
@@ -472,6 +462,13 @@ int mt7615_register_device(struct mt7615_dev *dev)
 			IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
 	mt7615_cap_dbdc_disable(dev);
 	dev->phy.dfs_state = -1;
+}
+
+int mt7615_register_device(struct mt7615_dev *dev)
+{
+	int ret;
+
+	mt7615_init_device(dev);
 
 	/* init led callbacks */
 	if (IS_ENABLED(CONFIG_MT76_LEDS)) {
@@ -479,6 +476,14 @@ int mt7615_register_device(struct mt7615_dev *dev)
 		dev->mt76.led_cdev.blink_set = mt7615_led_set_blink;
 	}
 
+	ret = mt7622_wmac_init(dev);
+	if (ret)
+		return ret;
+
+	ret = mt7615_init_hardware(dev);
+	if (ret)
+		return ret;
+
 	ret = mt76_register_device(&dev->mt76, true, mt7615_rates,
 				   ARRAY_SIZE(mt7615_rates));
 	if (ret)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
index 1614a0b8ecb8..cb8d2ed72e4d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
@@ -279,6 +279,7 @@ int mt7615_mmio_probe(struct device *pdev, void __iomem *mem_base,
 		      int irq, const u32 *map);
 u32 mt7615_reg_map(struct mt7615_dev *dev, u32 addr);
 
+void mt7615_init_device(struct mt7615_dev *dev);
 int mt7615_register_device(struct mt7615_dev *dev);
 void mt7615_unregister_device(struct mt7615_dev *dev);
 int mt7615_register_ext_phy(struct mt7615_dev *dev);
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
                   ` (4 preceding siblings ...)
  2020-02-28 13:29 ` [PATCH 5/6] mt76: mt7615: introduce mt7615_init_device routine Lorenzo Bianconi
@ 2020-02-28 13:29 ` Lorenzo Bianconi
  2020-03-08 10:45 ` [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-02-28 13:29 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

Move mt7615_mac_wtbl_addr in mac.h to reuse it in mt7663u driver

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 -----
 drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index a14ca0825582..dcd1141792d6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -707,11 +707,6 @@ void mt7615_txp_skb_unmap(struct mt76_dev *dev,
 		mt7615_txp_skb_unmap_hw(dev, &txp->hw);
 }
 
-static u32 mt7615_mac_wtbl_addr(struct mt7615_dev *dev, int wcid)
-{
-	return MT_WTBL_BASE(dev) + wcid * MT_WTBL_ENTRY_SIZE;
-}
-
 bool mt7615_mac_wtbl_update(struct mt7615_dev *dev, int idx, u32 mask)
 {
 	mt76_rmw(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_WLAN_IDX,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.h b/drivers/net/wireless/mediatek/mt76/mt7615/mac.h
index 5fe6a0e667a9..0fb9c0b2bca4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.h
@@ -405,4 +405,9 @@ mt7615_txwi_to_txp(struct mt76_dev *dev, struct mt76_txwi_cache *t)
 	return (struct mt7615_txp_common *)(txwi + MT_TXD_SIZE);
 }
 
+static inline u32 mt7615_mac_wtbl_addr(struct mt7615_dev *dev, int wcid)
+{
+	return MT_WTBL_BASE(dev) + wcid * MT_WTBL_ENTRY_SIZE;
+}
+
 #endif
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/6] mt7663u preparation series
  2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
                   ` (5 preceding siblings ...)
  2020-02-28 13:29 ` [PATCH 6/6] mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h Lorenzo Bianconi
@ 2020-03-08 10:45 ` Lorenzo Bianconi
  6 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-03-08 10:45 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

> This is the first series to rework mt7615 code for mt7663u
> driver integration.
> This series is based on "Introduce mt7663e support to mt7615 driver"
> https://patchwork.kernel.org/cover/11395095/

Please drop this series, I will post an updated version soon.

Regards,
Lorenzo

> 
> Lorenzo Bianconi (6):
>   mt76: mt7615: introduce mt7663u support to mt7615_write_txwi
>   mt76: mt7615: introduce mt7615_mcu_fill_msg
>   mt76: mt7615: introduce mt7615_mcu_wait_response
>   mt76: mt7615: cleanup fw queue just for mmio devices
>   mt76: mt7615: introduce mt7615_init_device routine
>   mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h
> 
>  .../net/wireless/mediatek/mt76/mt7615/init.c  | 27 ++++----
>  .../net/wireless/mediatek/mt76/mt7615/mac.c   | 17 +++--
>  .../net/wireless/mediatek/mt76/mt7615/mac.h   |  6 ++
>  .../net/wireless/mediatek/mt76/mt7615/mcu.c   | 62 ++++++++++++-------
>  .../wireless/mediatek/mt76/mt7615/mt7615.h    |  3 +
>  5 files changed, 72 insertions(+), 43 deletions(-)
> 
> -- 
> 2.24.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-08 10:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 13:29 [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi
2020-02-28 13:29 ` [PATCH 1/6] mt76: mt7615: introduce mt7663u support to mt7615_write_txwi Lorenzo Bianconi
2020-02-28 13:29 ` [PATCH 2/6] mt76: mt7615: introduce mt7615_mcu_fill_msg Lorenzo Bianconi
2020-02-28 13:29 ` [PATCH 3/6] mt76: mt7615: introduce mt7615_mcu_wait_response Lorenzo Bianconi
2020-02-28 13:29 ` [PATCH 4/6] mt76: mt7615: cleanup fw queue just for mmio devices Lorenzo Bianconi
2020-02-28 13:29 ` [PATCH 5/6] mt76: mt7615: introduce mt7615_init_device routine Lorenzo Bianconi
2020-02-28 13:29 ` [PATCH 6/6] mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h Lorenzo Bianconi
2020-03-08 10:45 ` [PATCH 0/6] mt7663u preparation series Lorenzo Bianconi

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).