diff mbox series

[ath-next,v2,8/9] wifi: ath12k: don't skip non-primary links for WCN7850

Message ID 20250409-ath12k-wcn7850-mlo-support-v2-8-3801132ca2c3@quicinc.com (mailing list archive)
State Under Review
Delegated to: Jeff Johnson
Headers show
Series wifi: ath12k: support MLO for WCN7850 | expand

Checks

Context Check Description
wifibot/fixes_present success Fixes tag not required for -next series
wifibot/series_format success Posting correctly formatted
wifibot/tree_selection success Clearly marked for ath-next
wifibot/ynl success Generated files up to date; no warnings/errors; no diff in generated;
wifibot/build_32bit success Errors and warnings before: 0 this patch: 0
wifibot/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
wifibot/build_clang success Errors and warnings before: 0 this patch: 0
wifibot/build_clang_rust success No Rust files in patch. Skipping build
wifibot/build_tools success No tools touched, skip
wifibot/check_selftest success No net selftest shell script
wifibot/checkpatch success total: 0 errors, 0 warnings, 0 checks, 50 lines checked
wifibot/deprecated_api success None detected
wifibot/header_inline success No static functions without inline keyword in header files
wifibot/kdoc success Errors and warnings before: 0 this patch: 0
wifibot/source_inline success Was 0 now: 0
wifibot/verify_fixes success No Fixes tag
wifibot/verify_signedoff success Signed-off-by tag matches author and committer

Commit Message

Baochen Qiang April 9, 2025, 2:26 a.m. UTC
The primary link check bypasses REO queue setup for non-primary links
in ath12k_dp_rx_peer_tid_setup(), this works for QCN9274 but breaks
WCN7850 as WCN7850 needs it to be done for each link peer.

Add a new hardware parameter to differentiate them.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/dp_rx.c | 3 ++-
 drivers/net/wireless/ath/ath12k/hw.c    | 8 ++++++++
 drivers/net/wireless/ath/ath12k/hw.h    | 3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 3b4dac515b6a02c12656565e1acac636616bdbf6..271d6edad49a0f1902601e031d6ffb3aa7658830 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -1001,7 +1001,8 @@  int ath12k_dp_rx_peer_tid_setup(struct ath12k *ar, const u8 *peer_mac, int vdev_
 		return -ENOENT;
 	}
 
-	if (!peer->primary_link) {
+	if (ab->hw_params->dp_primary_link_only &&
+	    !peer->primary_link) {
 		spin_unlock_bh(&ab->base_lock);
 		return 0;
 	}
diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index e3249719ca5300bab7e6821ae01c42444fd93504..a46d82857c5d3e111c5db4ff95eba2fa67cd1b41 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -1327,6 +1327,8 @@  static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.bdf_addr_offset = 0,
 
 		.current_cc_support = false,
+
+		.dp_primary_link_only = true,
 	},
 	{
 		.name = "wcn7850 hw2.0",
@@ -1414,6 +1416,8 @@  static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.bdf_addr_offset = 0,
 
 		.current_cc_support = true,
+
+		.dp_primary_link_only = false,
 	},
 	{
 		.name = "qcn9274 hw2.0",
@@ -1497,6 +1501,8 @@  static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.bdf_addr_offset = 0,
 
 		.current_cc_support = false,
+
+		.dp_primary_link_only = true,
 	},
 	{
 		.name = "ipq5332 hw1.0",
@@ -1573,6 +1579,8 @@  static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.ce_ie_addr = &ath12k_ce_ie_addr_ipq5332,
 		.ce_remap = &ath12k_ce_remap_ipq5332,
 		.bdf_addr_offset = 0xC00000,
+
+		.dp_primary_link_only = true,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h
index d0218d3eea54f5fdd88ab2a3a689171a00f9d7b2..024cfcd2cc158d6f4c26d369a97b1e2382ec6360 100644
--- a/drivers/net/wireless/ath/ath12k/hw.h
+++ b/drivers/net/wireless/ath/ath12k/hw.h
@@ -233,6 +233,9 @@  struct ath12k_hw_params {
 	const struct ce_ie_addr *ce_ie_addr;
 	const struct ce_remap *ce_remap;
 	u32 bdf_addr_offset;
+
+	/* setup REO queue, frag etc only for primary link peer */
+	bool dp_primary_link_only:1;
 };
 
 struct ath12k_hw_ops {