From: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
To: jjohnson@kernel.org
Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org,
Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Subject: [PATCH ath-next 1/7] wifi: ath12k: add WMI response handling for MLO link set active command
Date: Wed, 18 Nov 2026 10:55:14 +0800 [thread overview]
Message-ID: <20261118025520.39269-2-miaoqing.pan@oss.qualcomm.com> (raw)
In-Reply-To: <20261118025520.39269-1-miaoqing.pan@oss.qualcomm.com>
WMI_MLO_LINK_SET_ACTIVE_CMDID allows the driver to tell firmware which
MLO links should be active or inactive. Add parsing and logging of the
corresponding firmware response event. Delivery of the response to the
sender is added in a subsequent patch.
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00277-QCACOLSWPL_V1_TO_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
---
drivers/net/wireless/ath/ath12k/wmi.c | 36 +++++++++++++++++++++++++++
drivers/net/wireless/ath/ath12k/wmi.h | 6 +++++
2 files changed, 42 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index f41138a7c68e..dde7721182af 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -209,6 +209,8 @@ static const struct ath12k_wmi_tlv_policy ath12k_wmi_tlv_policies[] = {
.min_len = sizeof(struct wmi_obss_color_collision_event) },
[WMI_TAG_PDEV_CSA_SWITCH_COUNT_STATUS_EVENT] = {
.min_len = sizeof(struct ath12k_wmi_pdev_csa_event) },
+ [WMI_TAG_MLO_LINK_SET_ACTIVE_RESP_EVENT] = {
+ .min_len = sizeof(struct wmi_mlo_link_set_active_resp_event) },
};
__le32 ath12k_wmi_tlv_hdr(u32 cmd, u32 len)
@@ -9710,6 +9712,37 @@ static void ath12k_wmi_gtk_offload_status_event(struct ath12k_base *ab,
rcu_read_unlock();
}
+static void ath12k_wmi_event_mlo_link_set_active(struct ath12k_base *ab,
+ struct sk_buff *skb)
+{
+ const struct wmi_mlo_link_set_active_resp_event *ev;
+ u32 status, use_ieee;
+ const void **tb;
+ int ret;
+
+ tb = ath12k_wmi_tlv_parse(ab, skb);
+ if (IS_ERR(tb)) {
+ ret = PTR_ERR(tb);
+ ath12k_warn(ab, "failed to parse mlo link set active resp: %d\n", ret);
+ return;
+ }
+
+ ev = tb[WMI_TAG_MLO_LINK_SET_ACTIVE_RESP_EVENT];
+ if (!ev) {
+ ath12k_warn(ab, "mlo link set active resp event tag not found\n");
+ return;
+ }
+
+ status = le32_to_cpu(ev->status);
+ use_ieee = le32_to_cpu(ev->use_ieee_link_id_bitmap);
+
+ ath12k_dbg(ab, ATH12K_DBG_WMI,
+ "mlo link set active resp status %u use_ieee 0x%x\n",
+ status, use_ieee);
+
+ /* Response delivery to waiters will be wired up in a subsequent patch */
+}
+
static void ath12k_wmi_event_mlo_setup_complete(struct ath12k_base *ab,
struct sk_buff *skb)
{
@@ -10504,6 +10537,9 @@ static void ath12k_wmi_op_rx(struct ath12k_base *ab, struct sk_buff *skb)
case WMI_GTK_OFFLOAD_STATUS_EVENTID:
ath12k_wmi_gtk_offload_status_event(ab, skb);
break;
+ case WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID:
+ ath12k_wmi_event_mlo_link_set_active(ab, skb);
+ break;
case WMI_MLO_SETUP_COMPLETE_EVENTID:
ath12k_wmi_event_mlo_setup_complete(ab, skb);
break;
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 843f1d11f9c8..68dd13cafe51 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -2016,6 +2016,7 @@ enum wmi_tlv_tag {
WMI_TAG_VDEV_SET_TPC_POWER_CMD = 0x3B5,
WMI_TAG_VDEV_CH_POWER_INFO,
WMI_TAG_MLO_LINK_SET_ACTIVE_CMD = 0x3BE,
+ WMI_TAG_MLO_LINK_SET_ACTIVE_RESP_EVENT,
WMI_TAG_EHT_RATE_SET = 0x3C4,
WMI_TAG_DCS_INCUMBENT_SIGNAL_INTERFERENCE_TYPE = 0x3C5,
WMI_TAG_MLO_TX_SEND_PARAMS,
@@ -6496,6 +6497,11 @@ struct wmi_mlo_link_set_active_arg {
struct wmi_ml_disallow_mode_bmap_arg disallow_bmap[WMI_ML_MAX_DISALLOW_BMAP_COMB];
};
+struct wmi_mlo_link_set_active_resp_event {
+ __le32 status;
+ __le32 use_ieee_link_id_bitmap;
+} __packed;
+
#define ATH12K_MAX_20MHZ_SEGMENTS 16
#define ATH12K_MAX_NUM_ANTENNA 8
#define ATH12K_MAX_NUM_NF_HW_DBM 32
--
2.34.1
next prev parent reply other threads:[~2026-11-18 2:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 2:55 [PATCH ath-next 0/7] wifi: ath12k: fix MLO active-links handling Miaoqing Pan
2026-11-18 2:55 ` Miaoqing Pan [this message]
2026-11-18 2:55 ` [PATCH ath-next 2/7] wifi: ath12k: send overwrite flags and AP MLD addr in MLO link set active Miaoqing Pan
2026-11-18 2:55 ` [PATCH ath-next 3/7] wifi: ath12k: fix ath12k_mac_op_change_vif_links() for active-link updates Miaoqing Pan
2026-11-18 2:55 ` [PATCH ath-next 4/7] wifi: ath12k: skip links without channel context in ath12k_mac_get_vif_up() Miaoqing Pan
2026-11-18 2:55 ` [PATCH ath-next 5/7] wifi: ath12k: restart STA link vdev on chanctx assign if channel changed Miaoqing Pan
2026-11-18 2:55 ` [PATCH ath-next 6/7] wifi: ath12k: use WMI_MLO_VDEV_BITMAP_SZ for vdev bitmap bounds check Miaoqing Pan
2026-11-18 2:55 ` [PATCH ath-next 7/7] wifi: ath12k: handle MLO active link updates Miaoqing Pan
2026-11-21 0:16 ` [PATCH ath-next 0/7] wifi: ath12k: fix MLO active-links handling Jeff Johnson
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=20261118025520.39269-2-miaoqing.pan@oss.qualcomm.com \
--to=miaoqing.pan@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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
all inboxes | Powered by JetHome®