From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E51172614;
	Sun, 27 Jul 2025 12:50:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753620634; cv=none; b=pK62osqLGO7L3siJJrb02fKEZMP0HCO21932JmqcBt+a2bFa9YzqsESuYwLKR5SV3Plu8/zH7kU9ivS2b/Qj0kKH5XoZVF5Bhmm74GOQfQMCPhe+c9yS4Njbx2BuZugSfaGsDpuwebzBvMsKTEigl8kyRXms8CCZRyiqgvV2Ry4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753620634; c=relaxed/simple;
	bh=NkzP953h92j5VLRMbfFcMgeXvX2jiMh/xm282QHj3xY=;
	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Af5hunQE2TLaOcsWqGto8PfW7LOcOc33MZoevJWDsi0MFdbOgF1QHKRh8R7agArACvWbOe4+MmcuZDeH+oDf8YTGspcbQkF89jNEDubJpio/5OssX28yvOZm3N+PIqG2dbnzvIr4LNauD+vGCZ/jxRGiC+YpOAwFWVvJgbBqB14=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z36psbGi; arc=none smtp.client-ip=10.30.226.201
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z36psbGi"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DB82C4CEEB;
	Sun, 27 Jul 2025 12:50:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1753620633;
	bh=NkzP953h92j5VLRMbfFcMgeXvX2jiMh/xm282QHj3xY=;
	h=From:Date:Subject:To:Cc:From;
	b=Z36psbGimnIXH9mOsmcqzli2WxhFgt2Q7dWTIkpgrD9Eb3mOw2M8ADs0uMQE4F4zL
	 duFGFmyIx9mYaWZSrCG24i+dCVs+VZyMd38y7KvxqxucKFXCJM5TFm+Ts9H0ZJR9DW
	 81leCq1dRahiyOt0gmPbZT5HRudH1WHjM+cJItlNG+MclyNwvGmh4erHysiRdBq1fT
	 xqIftsATlPy0rRB89rDZJNf9r8BJ2S6HAb3HVoDOZz3wCaHNq4cOkzIAoc1Fg1H2MA
	 AQPI2uodIPM62UmeQEACwXtrIXAk3bj4vDTeeLi2dHA5+CxepoY6smBJ9L2M+NtSwz
	 sASwr6CyF2JeA==
From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: Sun, 27 Jul 2025 14:50:03 +0200
Subject: [PATCH net-next] net: mediatek: wed: Introduce MT7992 WED support
Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
List-Id: <netdev.vger.kernel.org>
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250727-mt7992-wed-support-v1-1-aad7da4dc877@kernel.org>
X-B4-Tracking: v=1; b=H4sIAHoghmgC/x3MTQqAIBBA4avErBtQyayuEi0kx5pFJdofRHdPW
 n6L9x5IFJkSdMUDkU5OvK0ZsixgnO06EbLLBiWUFkY2uOymbRVe5DAdIWxxx0rXVgunpW8k5DB
 E8nz/03543w/Elvk+ZAAAAA==
X-Change-ID: 20250718-mt7992-wed-support-456a50d51f81
To: Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>, 
 Andrew Lunn <andrew+netdev@lunn.ch>, 
 "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, 
 Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, 
 Matthias Brugger <matthias.bgg@gmail.com>, 
 AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, 
 Ryder Lee <ryder.lee@mediatek.com>, Shayne Chen <shayne.chen@mediatek.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 
 linux-mediatek@lists.infradead.org, linux-wireless@vger.kernel.org, 
 Rex Lu <rex.lu@mediatek.com>, Lorenzo Bianconi <lorenzo@kernel.org>
X-Mailer: b4 0.14.2

Introduce the second WDMA RX ring in WED driver since Meditake MT7992
WiFi chipset support two separated WDMA rings. This is a preliminary
patch to properly support WED for MT7992 in MT76 driver.

Co-developed-by: Rex Lu <rex.lu@mediatek.com>
Signed-off-by: Rex Lu <rex.lu@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/mediatek/mtk_wed.c          | 33 +++++++++++++++++++-----
 drivers/net/ethernet/mediatek/mtk_wed.h          |  2 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mmio.c |  6 ++---
 drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 12 ++++-----
 include/linux/soc/mediatek/mtk_wed.h             |  2 +-
 5 files changed, 38 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
index 73c26fcfd85e7be3040abea8e80ff4bee881016c..44a7b4b9d5a4e7cb2c6173ff97024ef74c241058 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -59,7 +59,9 @@ struct mtk_wed_flow_block_priv {
 static const struct mtk_wed_soc_data mt7622_data = {
 	.regmap = {
 		.tx_bm_tkid		= 0x088,
-		.wpdma_rx_ring0		= 0x770,
+		.wpdma_rx_ring = {
+			0x770,
+		},
 		.reset_idx_tx_mask	= GENMASK(3, 0),
 		.reset_idx_rx_mask	= GENMASK(17, 16),
 	},
@@ -70,7 +72,9 @@ static const struct mtk_wed_soc_data mt7622_data = {
 static const struct mtk_wed_soc_data mt7986_data = {
 	.regmap = {
 		.tx_bm_tkid		= 0x0c8,
-		.wpdma_rx_ring0		= 0x770,
+		.wpdma_rx_ring = {
+			0x770,
+		},
 		.reset_idx_tx_mask	= GENMASK(1, 0),
 		.reset_idx_rx_mask	= GENMASK(7, 6),
 	},
@@ -81,7 +85,10 @@ static const struct mtk_wed_soc_data mt7986_data = {
 static const struct mtk_wed_soc_data mt7988_data = {
 	.regmap = {
 		.tx_bm_tkid		= 0x0c8,
-		.wpdma_rx_ring0		= 0x7d0,
+		.wpdma_rx_ring = {
+			0x7d0,
+			0x7d8,
+		},
 		.reset_idx_tx_mask	= GENMASK(1, 0),
 		.reset_idx_rx_mask	= GENMASK(7, 6),
 	},
@@ -621,8 +628,8 @@ mtk_wed_amsdu_init(struct mtk_wed_device *dev)
 		return ret;
 	}
 
-	/* eagle E1 PCIE1 tx ring 22 flow control issue */
-	if (dev->wlan.id == 0x7991)
+	/* Kite and Eagle E1 PCIE1 tx ring 22 flow control issue */
+	if (dev->wlan.id == 0x7991 || dev->wlan.id == 0x7992)
 		wed_clr(dev, MTK_WED_AMSDU_FIFO, MTK_WED_AMSDU_IS_PRIOR0_RING);
 
 	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);
@@ -1239,7 +1246,11 @@ mtk_wed_set_wpdma(struct mtk_wed_device *dev)
 		return;
 
 	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
-	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
+	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring[0],
+		dev->wlan.wpdma_rx[0]);
+	if (mtk_wed_is_v3(dev->hw))
+		wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring[1],
+			dev->wlan.wpdma_rx[1]);
 
 	if (!dev->wlan.hw_rro)
 		return;
@@ -2323,6 +2334,16 @@ mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
 		if (!dev->rx_wdma[i].desc)
 			mtk_wed_wdma_rx_ring_setup(dev, i, 16, false);
 
+	if (dev->wlan.hw_rro) {
+		for (i = 0; i < MTK_WED_RX_PAGE_QUEUES; i++) {
+			u32 addr = MTK_WED_RRO_MSDU_PG_CTRL0(i) +
+				   MTK_WED_RING_OFS_COUNT;
+
+			if (!wed_r32(dev, addr))
+				wed_w32(dev, addr, 1);
+		}
+	}
+
 	mtk_wed_hw_init(dev);
 	mtk_wed_configure_irq(dev, irq_mask);
 
diff --git a/drivers/net/ethernet/mediatek/mtk_wed.h b/drivers/net/ethernet/mediatek/mtk_wed.h
index c1f0479d7a7182919e77c40efc30ade37abfad58..b49aee9a8b65156310e4f66a17921e5320b3077c 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.h
+++ b/drivers/net/ethernet/mediatek/mtk_wed.h
@@ -17,7 +17,7 @@ struct mtk_wed_wo;
 struct mtk_wed_soc_data {
 	struct {
 		u32 tx_bm_tkid;
-		u32 wpdma_rx_ring0;
+		u32 wpdma_rx_ring[MTK_WED_RX_QUEUES];
 		u32 reset_idx_tx_mask;
 		u32 reset_idx_rx_mask;
 	} regmap;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
index 4a82f8e4c118061fc76459dc0e38f7ee27e25a3a..36488aa6cc20117de4f5b76b80beca149015e055 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
@@ -664,8 +664,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
 					 MT_RXQ_WED_RING_BASE;
 		wed->wlan.wpdma_rx_glo = pci_resource_start(pci_dev, 0) +
 					 MT_WPDMA_GLO_CFG;
-		wed->wlan.wpdma_rx = pci_resource_start(pci_dev, 0) +
-				     MT_RXQ_WED_DATA_RING_BASE;
+		wed->wlan.wpdma_rx[0] = pci_resource_start(pci_dev, 0) +
+					MT_RXQ_WED_DATA_RING_BASE;
 	} else {
 		struct platform_device *plat_dev = pdev_ptr;
 		struct resource *res;
@@ -687,7 +687,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
 		wed->wlan.wpdma_tx = res->start + MT_TXQ_WED_RING_BASE;
 		wed->wlan.wpdma_txfree = res->start + MT_RXQ_WED_RING_BASE;
 		wed->wlan.wpdma_rx_glo = res->start + MT_WPDMA_GLO_CFG;
-		wed->wlan.wpdma_rx = res->start + MT_RXQ_WED_DATA_RING_BASE;
+		wed->wlan.wpdma_rx[0] = res->start + MT_RXQ_WED_DATA_RING_BASE;
 	}
 	wed->wlan.nbuf = MT7915_HW_TOKEN_SIZE;
 	wed->wlan.tx_tbit[0] = is_mt7915(&dev->mt76) ? 4 : 30;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
index 30b40f4a91be81d429d11f15036167396756d2dc..fb2428a9b877899a0a6fb879aba84e1f6e7840f2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
@@ -503,9 +503,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr,
 		}
 
 		wed->wlan.wpdma_rx_glo = wed->wlan.phy_base + hif1_ofs + MT_WFDMA0_GLO_CFG;
-		wed->wlan.wpdma_rx = wed->wlan.phy_base + hif1_ofs +
-				     MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
-				     MT7996_RXQ_BAND0 * MT_RING_SIZE;
+		wed->wlan.wpdma_rx[0] = wed->wlan.phy_base + hif1_ofs +
+					MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
+					MT7996_RXQ_BAND0 * MT_RING_SIZE;
 
 		wed->wlan.id = MT7996_DEVICE_ID_2;
 		wed->wlan.tx_tbit[0] = ffs(MT_INT_TX_DONE_BAND2) - 1;
@@ -518,9 +518,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr,
 
 		wed->wlan.wpdma_rx_glo = wed->wlan.phy_base + MT_WFDMA0_GLO_CFG;
 
-		wed->wlan.wpdma_rx = wed->wlan.phy_base +
-				     MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
-				     MT7996_RXQ_BAND0 * MT_RING_SIZE;
+		wed->wlan.wpdma_rx[0] = wed->wlan.phy_base +
+					MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
+					MT7996_RXQ_BAND0 * MT_RING_SIZE;
 
 		wed->wlan.wpdma_rx_rro[0] = wed->wlan.phy_base +
 					    MT_RXQ_RING_BASE(MT7996_RXQ_RRO_BAND0) +
diff --git a/include/linux/soc/mediatek/mtk_wed.h b/include/linux/soc/mediatek/mtk_wed.h
index d8949a4ed0dc9d41b3364e85a21e15d258519c45..c4ff6bab176db1f51cd94ac4198df0caeb557df2 100644
--- a/include/linux/soc/mediatek/mtk_wed.h
+++ b/include/linux/soc/mediatek/mtk_wed.h
@@ -147,7 +147,7 @@ struct mtk_wed_device {
 		u32 wpdma_tx;
 		u32 wpdma_txfree;
 		u32 wpdma_rx_glo;
-		u32 wpdma_rx;
+		u32 wpdma_rx[MTK_WED_RX_QUEUES];
 		u32 wpdma_rx_rro[MTK_WED_RX_QUEUES];
 		u32 wpdma_rx_pg;
 

---
base-commit: fa582ca7e187a15e772e6a72fe035f649b387a60
change-id: 20250718-mt7992-wed-support-456a50d51f81

Best regards,
-- 
Lorenzo Bianconi <lorenzo@kernel.org>


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7363526E706;
	Mon, 28 Jul 2025 14:52:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753714353; cv=none; b=QQLF6yg3BiuRRe9l6Vv8ufYoQFtj1/1gzPBZYbk6GU+LBGIaoCeQy+KE7OsHIKrQJyxLIfYl1pPBJsMnpuWywPCXmXkIqiqA+ts8kHFCUBIzcmw7shk47IZ2jqG0aP6yMFNYoALC51I8J9MpAUOsKZUwzCIOat2BX57bFVTn3s8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753714353; c=relaxed/simple;
	bh=vuOTc4Bvw88QCnRkinoJm2PmxtHviY1eT67mzEy/ibY=;
	h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
	 In-Reply-To:Content-Type; b=bwX6E2hUZk47t7uQ4BLWa5KqG4gbfF1G0yOfFHl69w+QlhjzOBulXAdFAOL/gPYsUmPJ32JFsRWoAyluwIjQsO1b1k0FgVf5tQ83X+tf0hGIgQvBFd4JGqKy6a2lPSsojVZ2QD2Lecz/pgZEQRN5qZ38O3QqvSui31KJkUQXWBs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nAgzMssd; arc=none smtp.client-ip=192.198.163.9
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nAgzMssd"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
  t=1753714352; x=1785250352;
  h=message-id:date:mime-version:subject:to:cc:references:
   from:in-reply-to:content-transfer-encoding;
  bh=vuOTc4Bvw88QCnRkinoJm2PmxtHviY1eT67mzEy/ibY=;
  b=nAgzMssd8TkyAmzby+gv9CXxQ7vEUyJeb8ISvgWKZb81XVWcJZxuHhmT
   WdJOTaGnk3OcSooiB+uoroJ6btghpKjfZNjQ3N8x8PZgfg2SBsFnQApuS
   293ig0a9y4eL4wI3Zednva6HcFF2bn27YHFJL0X4QZ1rV3rL4e4FsjELY
   SzvUZanFev8g5JWackqcPPR9m+za/j88Rl/YNRdiAM15cLzG5S9iG97A0
   zASPk38/3/kWnS6bUXnTaZeDt2qwUeJIz1GU8ngPcf/TVVPh29Wfhg1m9
   F+NsVh2E9F9Az6Tbw2BhM44P08z4uOZFJc7Lg4CGNm9gH088bDCH5sFxA
   A==;
X-CSE-ConnectionGUID: kI8/LJjNT3uhZKXGCZG5tQ==
X-CSE-MsgGUID: YaQTtZT5T2ipHksQYFV5WQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11505"; a="66666809"
X-IronPort-AV: E=Sophos;i="6.16,339,1744095600"; 
   d="scan'208";a="66666809"
Received: from orviesa005.jf.intel.com ([10.64.159.145])
  by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2025 07:52:30 -0700
X-CSE-ConnectionGUID: w5YfVOuqQySbs7vTCm6TKg==
X-CSE-MsgGUID: 5dqcD0ScSjuOwirYvwZ8EA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,339,1744095600"; 
   d="scan'208";a="167843491"
Received: from hlagrand-mobl1.ger.corp.intel.com (HELO [10.245.102.40]) ([10.245.102.40])
  by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2025 07:52:26 -0700
Message-ID: <9314b674-dadb-4749-a792-bd4053eaae04@linux.intel.com>
Date: Mon, 28 Jul 2025 16:52:22 +0200
Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
List-Id: <netdev.vger.kernel.org>
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH net-next] net: mediatek: wed: Introduce MT7992 WED support
To: Lorenzo Bianconi <lorenzo@kernel.org>, Felix Fietkau <nbd@nbd.name>,
 Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew+netdev@lunn.ch>,
 "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>,
 Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
 Matthias Brugger <matthias.bgg@gmail.com>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>,
 Ryder Lee <ryder.lee@mediatek.com>, Shayne Chen <shayne.chen@mediatek.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
 linux-mediatek@lists.infradead.org, linux-wireless@vger.kernel.org,
 Rex Lu <rex.lu@mediatek.com>
References: <20250727-mt7992-wed-support-v1-1-aad7da4dc877@kernel.org>
Content-Language: pl, en-US
From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
In-Reply-To: <20250727-mt7992-wed-support-v1-1-aad7da4dc877@kernel.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 2025-07-27 2:50 PM, Lorenzo Bianconi wrote:
> Introduce the second WDMA RX ring in WED driver since Meditake MT7992

s/Meditake/Mediatek

> WiFi chipset support two separated WDMA rings. This is a preliminary

s/support/supports

> patch to properly support WED for MT7992 in MT76 driver.
> 
> Co-developed-by: Rex Lu <rex.lu@mediatek.com>
> Signed-off-by: Rex Lu <rex.lu@mediatek.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>   drivers/net/ethernet/mediatek/mtk_wed.c          | 33 +++++++++++++++++++-----
>   drivers/net/ethernet/mediatek/mtk_wed.h          |  2 +-
>   drivers/net/wireless/mediatek/mt76/mt7915/mmio.c |  6 ++---
>   drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 12 ++++-----
>   include/linux/soc/mediatek/mtk_wed.h             |  2 +-
>   5 files changed, 38 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
> index 73c26fcfd85e7be3040abea8e80ff4bee881016c..44a7b4b9d5a4e7cb2c6173ff97024ef74c241058 100644
> --- a/drivers/net/ethernet/mediatek/mtk_wed.c
> +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
> @@ -59,7 +59,9 @@ struct mtk_wed_flow_block_priv {
>   static const struct mtk_wed_soc_data mt7622_data = {
>   	.regmap = {
>   		.tx_bm_tkid		= 0x088,
> -		.wpdma_rx_ring0		= 0x770,
> +		.wpdma_rx_ring = {
> +			0x770,
> +		},
>   		.reset_idx_tx_mask	= GENMASK(3, 0),
>   		.reset_idx_rx_mask	= GENMASK(17, 16),
>   	},
> @@ -70,7 +72,9 @@ static const struct mtk_wed_soc_data mt7622_data = {
>   static const struct mtk_wed_soc_data mt7986_data = {
>   	.regmap = {
>   		.tx_bm_tkid		= 0x0c8,
> -		.wpdma_rx_ring0		= 0x770,
> +		.wpdma_rx_ring = {
> +			0x770,
> +		},
>   		.reset_idx_tx_mask	= GENMASK(1, 0),
>   		.reset_idx_rx_mask	= GENMASK(7, 6),
>   	},
> @@ -81,7 +85,10 @@ static const struct mtk_wed_soc_data mt7986_data = {
>   static const struct mtk_wed_soc_data mt7988_data = {

In the patch description you mention the mt7992 chip, however you are 
adding a second rx_ring definition for the mt7988, is this correct?

>   	.regmap = {
>   		.tx_bm_tkid		= 0x0c8,
> -		.wpdma_rx_ring0		= 0x7d0,
> +		.wpdma_rx_ring = {
> +			0x7d0,
> +			0x7d8,
> +		},
>   		.reset_idx_tx_mask	= GENMASK(1, 0),
>   		.reset_idx_rx_mask	= GENMASK(7, 6),
>   	},
> @@ -621,8 +628,8 @@ mtk_wed_amsdu_init(struct mtk_wed_device *dev)
>   		return ret;
>   	}
>   
> -	/* eagle E1 PCIE1 tx ring 22 flow control issue */
> -	if (dev->wlan.id == 0x7991)
> +	/* Kite and Eagle E1 PCIE1 tx ring 22 flow control issue */
> +	if (dev->wlan.id == 0x7991 || dev->wlan.id == 0x7992)
>   		wed_clr(dev, MTK_WED_AMSDU_FIFO, MTK_WED_AMSDU_IS_PRIOR0_RING);
>   
>   	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);
> @@ -1239,7 +1246,11 @@ mtk_wed_set_wpdma(struct mtk_wed_device *dev)
>   		return;
>   
>   	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
> -	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
> +	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring[0],
> +		dev->wlan.wpdma_rx[0]);
> +	if (mtk_wed_is_v3(dev->hw))

You also have mtk_wed_is_v3_or_greater() defined in the header, why not 
use that?

> +		wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring[1],
> +			dev->wlan.wpdma_rx[1]);
>   
>   	if (!dev->wlan.hw_rro)
>   		return;
> @@ -2323,6 +2334,16 @@ mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
>   		if (!dev->rx_wdma[i].desc)
>   			mtk_wed_wdma_rx_ring_setup(dev, i, 16, false);
>   
> +	if (dev->wlan.hw_rro) {
> +		for (i = 0; i < MTK_WED_RX_PAGE_QUEUES; i++) {
> +			u32 addr = MTK_WED_RRO_MSDU_PG_CTRL0(i) +
> +				   MTK_WED_RING_OFS_COUNT;
> +
> +			if (!wed_r32(dev, addr))
> +				wed_w32(dev, addr, 1);
> +		}
> +	}
> +
>   	mtk_wed_hw_init(dev);
>   	mtk_wed_configure_irq(dev, irq_mask);
>   
> diff --git a/drivers/net/ethernet/mediatek/mtk_wed.h b/drivers/net/ethernet/mediatek/mtk_wed.h
> index c1f0479d7a7182919e77c40efc30ade37abfad58..b49aee9a8b65156310e4f66a17921e5320b3077c 100644
> --- a/drivers/net/ethernet/mediatek/mtk_wed.h
> +++ b/drivers/net/ethernet/mediatek/mtk_wed.h
> @@ -17,7 +17,7 @@ struct mtk_wed_wo;
>   struct mtk_wed_soc_data {
>   	struct {
>   		u32 tx_bm_tkid;
> -		u32 wpdma_rx_ring0;
> +		u32 wpdma_rx_ring[MTK_WED_RX_QUEUES];
>   		u32 reset_idx_tx_mask;
>   		u32 reset_idx_rx_mask;
>   	} regmap;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
> index 4a82f8e4c118061fc76459dc0e38f7ee27e25a3a..36488aa6cc20117de4f5b76b80beca149015e055 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
> @@ -664,8 +664,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
>   					 MT_RXQ_WED_RING_BASE;
>   		wed->wlan.wpdma_rx_glo = pci_resource_start(pci_dev, 0) +
>   					 MT_WPDMA_GLO_CFG;
> -		wed->wlan.wpdma_rx = pci_resource_start(pci_dev, 0) +
> -				     MT_RXQ_WED_DATA_RING_BASE;
> +		wed->wlan.wpdma_rx[0] = pci_resource_start(pci_dev, 0) +
> +					MT_RXQ_WED_DATA_RING_BASE;
>   	} else {
>   		struct platform_device *plat_dev = pdev_ptr;
>   		struct resource *res;
> @@ -687,7 +687,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
>   		wed->wlan.wpdma_tx = res->start + MT_TXQ_WED_RING_BASE;
>   		wed->wlan.wpdma_txfree = res->start + MT_RXQ_WED_RING_BASE;
>   		wed->wlan.wpdma_rx_glo = res->start + MT_WPDMA_GLO_CFG;
> -		wed->wlan.wpdma_rx = res->start + MT_RXQ_WED_DATA_RING_BASE;
> +		wed->wlan.wpdma_rx[0] = res->start + MT_RXQ_WED_DATA_RING_BASE;
>   	}
>   	wed->wlan.nbuf = MT7915_HW_TOKEN_SIZE;
>   	wed->wlan.tx_tbit[0] = is_mt7915(&dev->mt76) ? 4 : 30;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
> index 30b40f4a91be81d429d11f15036167396756d2dc..fb2428a9b877899a0a6fb879aba84e1f6e7840f2 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
> @@ -503,9 +503,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr,
>   		}
>   
>   		wed->wlan.wpdma_rx_glo = wed->wlan.phy_base + hif1_ofs + MT_WFDMA0_GLO_CFG;
> -		wed->wlan.wpdma_rx = wed->wlan.phy_base + hif1_ofs +
> -				     MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> -				     MT7996_RXQ_BAND0 * MT_RING_SIZE;
> +		wed->wlan.wpdma_rx[0] = wed->wlan.phy_base + hif1_ofs +
> +					MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> +					MT7996_RXQ_BAND0 * MT_RING_SIZE;
>   
>   		wed->wlan.id = MT7996_DEVICE_ID_2;
>   		wed->wlan.tx_tbit[0] = ffs(MT_INT_TX_DONE_BAND2) - 1;
> @@ -518,9 +518,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr,
>   
>   		wed->wlan.wpdma_rx_glo = wed->wlan.phy_base + MT_WFDMA0_GLO_CFG;
>   
> -		wed->wlan.wpdma_rx = wed->wlan.phy_base +
> -				     MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> -				     MT7996_RXQ_BAND0 * MT_RING_SIZE;
> +		wed->wlan.wpdma_rx[0] = wed->wlan.phy_base +
> +					MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> +					MT7996_RXQ_BAND0 * MT_RING_SIZE;
>   
>   		wed->wlan.wpdma_rx_rro[0] = wed->wlan.phy_base +
>   					    MT_RXQ_RING_BASE(MT7996_RXQ_RRO_BAND0) +
> diff --git a/include/linux/soc/mediatek/mtk_wed.h b/include/linux/soc/mediatek/mtk_wed.h
> index d8949a4ed0dc9d41b3364e85a21e15d258519c45..c4ff6bab176db1f51cd94ac4198df0caeb557df2 100644
> --- a/include/linux/soc/mediatek/mtk_wed.h
> +++ b/include/linux/soc/mediatek/mtk_wed.h
> @@ -147,7 +147,7 @@ struct mtk_wed_device {
>   		u32 wpdma_tx;
>   		u32 wpdma_txfree;
>   		u32 wpdma_rx_glo;
> -		u32 wpdma_rx;
> +		u32 wpdma_rx[MTK_WED_RX_QUEUES];
>   		u32 wpdma_rx_rro[MTK_WED_RX_QUEUES];
>   		u32 wpdma_rx_pg;
>   
> 
> ---
> base-commit: fa582ca7e187a15e772e6a72fe035f649b387a60
> change-id: 20250718-mt7992-wed-support-456a50d51f81

Best,
Dawid

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F232727381E;
	Mon, 28 Jul 2025 15:28:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753716526; cv=none; b=UgxIJR82slxCGAeLwuQ6tVCohpQsspAs6nJpYXfM+7qHleb8q81PSPYS3WycxegRjJ6EEXSw7ep4MLaG2bEhD7KIkA426Kv+SpMJOXqW4yAwWnWMaCNdCqGBh2eSqtciejQAbFlwYUMyAqx0b3of7jfRaqAY8qdsrsDNRlrUWIs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753716526; c=relaxed/simple;
	bh=/qr9LeDTif46lKIU0pPUJ5a3WdrpDcyO4yMMt+qGH1c=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=qwAs6bVnOFuzU6rHhZUHwU0LztUhkaRUo/eEs1KE3Zv4LQ380nXGuNeN/M6atCBEqbKizf2yGJSVt9O6dfJVoF9NohGUP+VMdNklWDRUg9f5D2pMCN07o0Rf/PuzSoc7yi4/7IzU+lvwjTuoY6RHHCEV7axVie+XLAEm5T5DLeU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ybw5xkxi; arc=none smtp.client-ip=10.30.226.201
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ybw5xkxi"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7EB3C4CEE7;
	Mon, 28 Jul 2025 15:28:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1753716525;
	bh=/qr9LeDTif46lKIU0pPUJ5a3WdrpDcyO4yMMt+qGH1c=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
	b=Ybw5xkxiZq2PfosVO+KatdPw2FWGNQ9spYKphGv080KJ98ZkmHW7GyrYjT14bB/Kw
	 JbJvzbR0VRYIeYBr3BS+/Oxdx8k8ucPOshQottpZoynpIEZy578N/RKSE4RiJNLH9c
	 EKmSZF8tEhJiKC3LMp7Pv5PT2Cchj8IUWx2VkhnMWNzgey2d50i/eJQGFpCJA1MJV/
	 JA/bn2ljI1736B5u4XkEW5X4urtS6sbFllCGs5eQKFaxl4ahcX8xOfIarlxGsF/sAV
	 bbABF8JM5r7BWxG+y2fSATeSLQzAihiuHGli8icG5uXmuzRsk8lyNzDnixLq0MT/Kj
	 32QZEYKq0EnuQ==
Date: Mon, 28 Jul 2025 17:28:41 +0200
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Cc: Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Shayne Chen <shayne.chen@mediatek.com>, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-wireless@vger.kernel.org,
	Rex Lu <rex.lu@mediatek.com>
Subject: Re: [PATCH net-next] net: mediatek: wed: Introduce MT7992 WED support
Message-ID: <aIeXKRmGxDROUDHt@lore-rh-laptop>
References: <20250727-mt7992-wed-support-v1-1-aad7da4dc877@kernel.org>
 <9314b674-dadb-4749-a792-bd4053eaae04@linux.intel.com>
Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
List-Id: <netdev.vger.kernel.org>
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="WiCFpIaCoVI82VjZ"
Content-Disposition: inline
In-Reply-To: <9314b674-dadb-4749-a792-bd4053eaae04@linux.intel.com>


--WiCFpIaCoVI82VjZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> On 2025-07-27 2:50 PM, Lorenzo Bianconi wrote:
> > Introduce the second WDMA RX ring in WED driver since Meditake MT7992
>=20
> s/Meditake/Mediatek

ack, I will fix it in v2.

>=20
> > WiFi chipset support two separated WDMA rings. This is a preliminary
>=20
> s/support/supports

ack, I will fix it in v2.

>=20
> > patch to properly support WED for MT7992 in MT76 driver.
> >=20
> > Co-developed-by: Rex Lu <rex.lu@mediatek.com>
> > Signed-off-by: Rex Lu <rex.lu@mediatek.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >   drivers/net/ethernet/mediatek/mtk_wed.c          | 33 +++++++++++++++=
++++-----
> >   drivers/net/ethernet/mediatek/mtk_wed.h          |  2 +-
> >   drivers/net/wireless/mediatek/mt76/mt7915/mmio.c |  6 ++---
> >   drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 12 ++++-----
> >   include/linux/soc/mediatek/mtk_wed.h             |  2 +-
> >   5 files changed, 38 insertions(+), 17 deletions(-)
> >=20
> > diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethe=
rnet/mediatek/mtk_wed.c
> > index 73c26fcfd85e7be3040abea8e80ff4bee881016c..44a7b4b9d5a4e7cb2c6173f=
f97024ef74c241058 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_wed.c
> > +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
> > @@ -59,7 +59,9 @@ struct mtk_wed_flow_block_priv {
> >   static const struct mtk_wed_soc_data mt7622_data =3D {
> >   	.regmap =3D {
> >   		.tx_bm_tkid		=3D 0x088,
> > -		.wpdma_rx_ring0		=3D 0x770,
> > +		.wpdma_rx_ring =3D {
> > +			0x770,
> > +		},
> >   		.reset_idx_tx_mask	=3D GENMASK(3, 0),
> >   		.reset_idx_rx_mask	=3D GENMASK(17, 16),
> >   	},
> > @@ -70,7 +72,9 @@ static const struct mtk_wed_soc_data mt7622_data =3D {
> >   static const struct mtk_wed_soc_data mt7986_data =3D {
> >   	.regmap =3D {
> >   		.tx_bm_tkid		=3D 0x0c8,
> > -		.wpdma_rx_ring0		=3D 0x770,
> > +		.wpdma_rx_ring =3D {
> > +			0x770,
> > +		},
> >   		.reset_idx_tx_mask	=3D GENMASK(1, 0),
> >   		.reset_idx_rx_mask	=3D GENMASK(7, 6),
> >   	},
> > @@ -81,7 +85,10 @@ static const struct mtk_wed_soc_data mt7986_data =3D=
 {
> >   static const struct mtk_wed_soc_data mt7988_data =3D {
>=20
> In the patch description you mention the mt7992 chip, however you are add=
ing
> a second rx_ring definition for the mt7988, is this correct?

yes, since MT7992 is the WiFi chiset that is the WED funcationality consumer
while MT7988 is the SoC ethernet controller. I will add more info in the co=
mmit
log.

>=20
> >   	.regmap =3D {
> >   		.tx_bm_tkid		=3D 0x0c8,
> > -		.wpdma_rx_ring0		=3D 0x7d0,
> > +		.wpdma_rx_ring =3D {
> > +			0x7d0,
> > +			0x7d8,
> > +		},
> >   		.reset_idx_tx_mask	=3D GENMASK(1, 0),
> >   		.reset_idx_rx_mask	=3D GENMASK(7, 6),
> >   	},
> > @@ -621,8 +628,8 @@ mtk_wed_amsdu_init(struct mtk_wed_device *dev)
> >   		return ret;
> >   	}
> > -	/* eagle E1 PCIE1 tx ring 22 flow control issue */
> > -	if (dev->wlan.id =3D=3D 0x7991)
> > +	/* Kite and Eagle E1 PCIE1 tx ring 22 flow control issue */
> > +	if (dev->wlan.id =3D=3D 0x7991 || dev->wlan.id =3D=3D 0x7992)
> >   		wed_clr(dev, MTK_WED_AMSDU_FIFO, MTK_WED_AMSDU_IS_PRIOR0_RING);
> >   	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);
> > @@ -1239,7 +1246,11 @@ mtk_wed_set_wpdma(struct mtk_wed_device *dev)
> >   		return;
> >   	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
> > -	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
> > +	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring[0],
> > +		dev->wlan.wpdma_rx[0]);
> > +	if (mtk_wed_is_v3(dev->hw))
>=20
> You also have mtk_wed_is_v3_or_greater() defined in the header, why not u=
se
> that?

ack, I will fix it in v2.

Regards,
Lorenzo

>=20
> > +		wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring[1],
> > +			dev->wlan.wpdma_rx[1]);
> >   	if (!dev->wlan.hw_rro)
> >   		return;
> > @@ -2323,6 +2334,16 @@ mtk_wed_start(struct mtk_wed_device *dev, u32 ir=
q_mask)
> >   		if (!dev->rx_wdma[i].desc)
> >   			mtk_wed_wdma_rx_ring_setup(dev, i, 16, false);
> > +	if (dev->wlan.hw_rro) {
> > +		for (i =3D 0; i < MTK_WED_RX_PAGE_QUEUES; i++) {
> > +			u32 addr =3D MTK_WED_RRO_MSDU_PG_CTRL0(i) +
> > +				   MTK_WED_RING_OFS_COUNT;
> > +
> > +			if (!wed_r32(dev, addr))
> > +				wed_w32(dev, addr, 1);
> > +		}
> > +	}
> > +
> >   	mtk_wed_hw_init(dev);
> >   	mtk_wed_configure_irq(dev, irq_mask);
> > diff --git a/drivers/net/ethernet/mediatek/mtk_wed.h b/drivers/net/ethe=
rnet/mediatek/mtk_wed.h
> > index c1f0479d7a7182919e77c40efc30ade37abfad58..b49aee9a8b65156310e4f66=
a17921e5320b3077c 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_wed.h
> > +++ b/drivers/net/ethernet/mediatek/mtk_wed.h
> > @@ -17,7 +17,7 @@ struct mtk_wed_wo;
> >   struct mtk_wed_soc_data {
> >   	struct {
> >   		u32 tx_bm_tkid;
> > -		u32 wpdma_rx_ring0;
> > +		u32 wpdma_rx_ring[MTK_WED_RX_QUEUES];
> >   		u32 reset_idx_tx_mask;
> >   		u32 reset_idx_rx_mask;
> >   	} regmap;
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers=
/net/wireless/mediatek/mt76/mt7915/mmio.c
> > index 4a82f8e4c118061fc76459dc0e38f7ee27e25a3a..36488aa6cc20117de4f5b76=
b80beca149015e055 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
> > @@ -664,8 +664,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, vo=
id *pdev_ptr,
> >   					 MT_RXQ_WED_RING_BASE;
> >   		wed->wlan.wpdma_rx_glo =3D pci_resource_start(pci_dev, 0) +
> >   					 MT_WPDMA_GLO_CFG;
> > -		wed->wlan.wpdma_rx =3D pci_resource_start(pci_dev, 0) +
> > -				     MT_RXQ_WED_DATA_RING_BASE;
> > +		wed->wlan.wpdma_rx[0] =3D pci_resource_start(pci_dev, 0) +
> > +					MT_RXQ_WED_DATA_RING_BASE;
> >   	} else {
> >   		struct platform_device *plat_dev =3D pdev_ptr;
> >   		struct resource *res;
> > @@ -687,7 +687,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, vo=
id *pdev_ptr,
> >   		wed->wlan.wpdma_tx =3D res->start + MT_TXQ_WED_RING_BASE;
> >   		wed->wlan.wpdma_txfree =3D res->start + MT_RXQ_WED_RING_BASE;
> >   		wed->wlan.wpdma_rx_glo =3D res->start + MT_WPDMA_GLO_CFG;
> > -		wed->wlan.wpdma_rx =3D res->start + MT_RXQ_WED_DATA_RING_BASE;
> > +		wed->wlan.wpdma_rx[0] =3D res->start + MT_RXQ_WED_DATA_RING_BASE;
> >   	}
> >   	wed->wlan.nbuf =3D MT7915_HW_TOKEN_SIZE;
> >   	wed->wlan.tx_tbit[0] =3D is_mt7915(&dev->mt76) ? 4 : 30;
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers=
/net/wireless/mediatek/mt76/mt7996/mmio.c
> > index 30b40f4a91be81d429d11f15036167396756d2dc..fb2428a9b877899a0a6fb87=
9aba84e1f6e7840f2 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
> > @@ -503,9 +503,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, vo=
id *pdev_ptr,
> >   		}
> >   		wed->wlan.wpdma_rx_glo =3D wed->wlan.phy_base + hif1_ofs + MT_WFDMA=
0_GLO_CFG;
> > -		wed->wlan.wpdma_rx =3D wed->wlan.phy_base + hif1_ofs +
> > -				     MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> > -				     MT7996_RXQ_BAND0 * MT_RING_SIZE;
> > +		wed->wlan.wpdma_rx[0] =3D wed->wlan.phy_base + hif1_ofs +
> > +					MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> > +					MT7996_RXQ_BAND0 * MT_RING_SIZE;
> >   		wed->wlan.id =3D MT7996_DEVICE_ID_2;
> >   		wed->wlan.tx_tbit[0] =3D ffs(MT_INT_TX_DONE_BAND2) - 1;
> > @@ -518,9 +518,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, vo=
id *pdev_ptr,
> >   		wed->wlan.wpdma_rx_glo =3D wed->wlan.phy_base + MT_WFDMA0_GLO_CFG;
> > -		wed->wlan.wpdma_rx =3D wed->wlan.phy_base +
> > -				     MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> > -				     MT7996_RXQ_BAND0 * MT_RING_SIZE;
> > +		wed->wlan.wpdma_rx[0] =3D wed->wlan.phy_base +
> > +					MT_RXQ_RING_BASE(MT7996_RXQ_BAND0) +
> > +					MT7996_RXQ_BAND0 * MT_RING_SIZE;
> >   		wed->wlan.wpdma_rx_rro[0] =3D wed->wlan.phy_base +
> >   					    MT_RXQ_RING_BASE(MT7996_RXQ_RRO_BAND0) +
> > diff --git a/include/linux/soc/mediatek/mtk_wed.h b/include/linux/soc/m=
ediatek/mtk_wed.h
> > index d8949a4ed0dc9d41b3364e85a21e15d258519c45..c4ff6bab176db1f51cd94ac=
4198df0caeb557df2 100644
> > --- a/include/linux/soc/mediatek/mtk_wed.h
> > +++ b/include/linux/soc/mediatek/mtk_wed.h
> > @@ -147,7 +147,7 @@ struct mtk_wed_device {
> >   		u32 wpdma_tx;
> >   		u32 wpdma_txfree;
> >   		u32 wpdma_rx_glo;
> > -		u32 wpdma_rx;
> > +		u32 wpdma_rx[MTK_WED_RX_QUEUES];
> >   		u32 wpdma_rx_rro[MTK_WED_RX_QUEUES];
> >   		u32 wpdma_rx_pg;
> >=20
> > ---
> > base-commit: fa582ca7e187a15e772e6a72fe035f649b387a60
> > change-id: 20250718-mt7992-wed-support-456a50d51f81
>=20
> Best,
> Dawid

--WiCFpIaCoVI82VjZ
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHQEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaIeXJgAKCRA6cBh0uS2t
rBgTAP95nJNJMUnd+tYgGJ6YL+nch76ILgIQuge7qAYAGer73wD43roZCTCelett
0JefP45RncInvfee3oEY9fU+nwONDA==
=CTqr
-----END PGP SIGNATURE-----

--WiCFpIaCoVI82VjZ--

