Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH] wifi: ath11k: add support for MU EDCA
@ 2025-11-21  5:00 Yu Zhang(Yuriy)
  2025-11-21  8:41 ` Paweł Owoc
  0 siblings, 1 reply; 12+ messages in thread
From: Yu Zhang(Yuriy) @ 2025-11-21  5:00 UTC (permalink / raw)
  To: frut3k7; +Cc: ath11k, linux-wireless, quic_yuzha

hi,

 From your log/calltrace, I didn’t see any errors related to MU EDCA; 
what I saw were related to SMPS. Did you also add changes related to SMPS?

Yuriy

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH] wifi: ath11k: add support for MU EDCA
@ 2025-11-19  8:09 Paweł Owoc
  0 siblings, 0 replies; 12+ messages in thread
From: Paweł Owoc @ 2025-11-19  8:09 UTC (permalink / raw)
  To: quic_yuzha; +Cc: ath11k, linux-wireless

After this change, IPQ8074 crashes in STA mode:

[  165.110962] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: fatal error received:
[  165.110962] QC Image Version:
QC_IMAGE_VERSION_STRING=WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
[  165.110962] Image Variant : IMAGE_VARIANT_STRING=8074.wlanfw.eval_v2Q
[  165.110962]
[  165.110962] wal_tx_control.c:823 Assertion 0 failedparam0 :zero,
param1 :zero, param2 :zero.
[  165.110962] Thread ID      : 0x00000062  Thread name    : WLAN RT1
Process ID     : 0
[  165.110962] Register:
[  165.110962] SP : 0x4bfd5ce8
[  165.110962] FP : 0x4bfd5cf0
[  165.110962] PC : 0x4b107f58
[  165.110962] SSR : 0x00000008
[  165.110962] BADVA : 0x00020000
[  165.110962] LR : 0x4b1076f4
[  165.110962]
[  165.110962] Stack Dump
[  165.110962] from : 0x4bfd5ce8
[  165.110962] to   : 0x4bfd62c0
[  165.110962]
[  165.157843] remoteproc remoteproc0: crash detected in
cd00000.q6v5_wcss: type fatal error
[  165.180083] remoteproc remoteproc0: handling crash #1 in cd00000.q6v5_wcss
[  165.188416] remoteproc remoteproc0: recovering cd00000.q6v5_wcss
[  165.221076] remoteproc remoteproc0: stopped remote processor
cd00000.q6v5_wcss
[  165.485399] ath11k c000000.wifi: failed to send WMI_PEER_SET_PARAM cmd
[  165.485443] ath11k c000000.wifi: failed to setup peer SMPS for vdev 0: -108
[  165.490829] ath11k c000000.wifi: Failed to send WMI_TWT_ENABLE_CMDID
[  165.497736] ath11k c000000.wifi: Failed to send
WMI_BSS_COLOR_CHANGE_ENABLE_CMDID
[  165.504283] ath11k c000000.wifi: failed to enable bss color change
on vdev 0: -108
[  165.511671] ath11k c000000.wifi: Failed to send
WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID
[  165.519136] ath11k c000000.wifi: failed to set bss color collision
on vdev 0: -108

Regards,

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] wifi: ath11k: add support for MU EDCA
@ 2025-01-24  6:13 Yu Zhang(Yuriy)
  2025-01-31  4:16 ` Vasanthakumar Thiagarajan
  2025-02-03 22:49 ` Jeff Johnson
  0 siblings, 2 replies; 12+ messages in thread
From: Yu Zhang(Yuriy) @ 2025-01-24  6:13 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, quic_yuzha

The current code does not have the MU EDCA feature, so it cannot support
the use of EDCA by STA in specific UL MU HE TB PPDU transmissions. Refer
to IEEE Std 802.11ax-2021 "9.4.2.251 MU EDCA Parameter Set element",
"26.2.7 EDCA operation using MU EDCA parameters".

Add ath11k_mac_op_conf_tx_mu_edca() to construct the MU EDCA parameters
received from mac80211 into WMI WMM parameters,and send to the firmware
according to the different WMM type flags.

Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-04523-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1

Signed-off-by: Yu Zhang(Yuriy) <quic_yuzha@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.h |  3 +-
 drivers/net/wireless/ath/ath11k/mac.c  | 53 +++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath11k/wmi.c  | 11 +++---
 drivers/net/wireless/ath/ath11k/wmi.h  | 10 ++++-
 4 files changed, 67 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index a9dc7fe7765a..92b14fc43cb6 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_CORE_H
@@ -370,6 +370,7 @@ struct ath11k_vif {
 	struct ieee80211_vif *vif;
 
 	struct wmi_wmm_params_all_arg wmm_params;
+	struct wmi_wmm_params_all_arg muedca_params;
 	struct list_head list;
 	union {
 		struct {
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 31ae9b384a29..85864f7dd076 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <net/mac80211.h>
@@ -5204,6 +5204,45 @@ static int ath11k_conf_tx_uapsd(struct ath11k *ar, struct ieee80211_vif *vif,
 	return ret;
 }
 
+static int ath11k_mac_op_conf_tx_mu_edca(struct ieee80211_hw *hw,
+					 struct ieee80211_vif *vif,
+					 unsigned int link_id, u16 ac,
+					 const struct ieee80211_tx_queue_params *params)
+{
+	struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
+	struct ath11k *ar = hw->priv;
+	struct wmi_wmm_params_arg *p;
+	int ret;
+
+	switch (ac) {
+	case IEEE80211_AC_VO:
+		p = &arvif->muedca_params.ac_vo;
+		break;
+	case IEEE80211_AC_VI:
+		p = &arvif->muedca_params.ac_vi;
+		break;
+	case IEEE80211_AC_BE:
+		p = &arvif->muedca_params.ac_be;
+		break;
+	case IEEE80211_AC_BK:
+		p = &arvif->muedca_params.ac_bk;
+		break;
+	default:
+		ath11k_warn(ar->ab, "error ac: %d", ac);
+		return -EINVAL;
+	}
+
+	p->cwmin = u8_get_bits(params->mu_edca_param_rec.ecw_min_max, GENMASK(3, 0));
+	p->cwmax = u8_get_bits(params->mu_edca_param_rec.ecw_min_max, GENMASK(7, 4));
+	p->aifs = u8_get_bits(params->mu_edca_param_rec.aifsn, GENMASK(3, 0));
+	p->txop = params->mu_edca_param_rec.mu_edca_timer;
+
+	ret = ath11k_wmi_send_wmm_update_cmd_tlv(ar, arvif->vdev_id,
+						 &arvif->muedca_params,
+						 WMI_WMM_PARAM_TYPE_11AX_MU_EDCA);
+	return ret;
+}
+
 static int ath11k_mac_op_conf_tx(struct ieee80211_hw *hw,
 				 struct ieee80211_vif *vif,
 				 unsigned int link_id, u16 ac,
@@ -5242,12 +5281,22 @@ static int ath11k_mac_op_conf_tx(struct ieee80211_hw *hw,
 	p->txop = params->txop;
 
 	ret = ath11k_wmi_send_wmm_update_cmd_tlv(ar, arvif->vdev_id,
-						 &arvif->wmm_params);
+						 &arvif->wmm_params,
+						 WMI_WMM_PARAM_TYPE_LEGACY);
 	if (ret) {
 		ath11k_warn(ar->ab, "failed to set wmm params: %d\n", ret);
 		goto exit;
 	}
 
+	if (params->mu_edca) {
+		ret = ath11k_mac_op_conf_tx_mu_edca(hw, vif, link_id, ac,
+						    params);
+		if (ret) {
+			ath11k_warn(ar->ab, "failed to set mu_edca params: %d\n", ret);
+			goto exit;
+		}
+	}
+
 	ret = ath11k_conf_tx_uapsd(ar, vif, ac, params->uapsd);
 
 	if (ret)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 87abfa547529..d7f852bebf4a 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 #include <linux/skbuff.h>
 #include <linux/ctype.h>
@@ -2662,7 +2662,8 @@ int ath11k_wmi_send_scan_chan_list_cmd(struct ath11k *ar,
 }
 
 int ath11k_wmi_send_wmm_update_cmd_tlv(struct ath11k *ar, u32 vdev_id,
-				       struct wmi_wmm_params_all_arg *param)
+				       struct wmi_wmm_params_all_arg *param,
+				       enum wmi_wmm_params_type wmm_param_type)
 {
 	struct ath11k_pdev_wmi *wmi = ar->wmi;
 	struct wmi_vdev_set_wmm_params_cmd *cmd;
@@ -2681,7 +2682,7 @@ int ath11k_wmi_send_wmm_update_cmd_tlv(struct ath11k *ar, u32 vdev_id,
 			  FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
 
 	cmd->vdev_id = vdev_id;
-	cmd->wmm_param_type = 0;
+	cmd->wmm_param_type = wmm_param_type;
 
 	for (ac = 0; ac < WME_NUM_AC; ac++) {
 		switch (ac) {
@@ -2714,8 +2715,8 @@ int ath11k_wmi_send_wmm_update_cmd_tlv(struct ath11k *ar, u32 vdev_id,
 		wmm_param->no_ack = wmi_wmm_arg->no_ack;
 
 		ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
-			   "wmm set ac %d aifs %d cwmin %d cwmax %d txop %d acm %d no_ack %d\n",
-			   ac, wmm_param->aifs, wmm_param->cwmin,
+			   "wmm set type %d ac %d aifs %d cwmin %d cwmax %d txop %d acm %d no_ack %d\n",
+			   wmm_param_type, ac, wmm_param->aifs, wmm_param->cwmin,
 			   wmm_param->cwmax, wmm_param->txoplimit,
 			   wmm_param->acm, wmm_param->no_ack);
 	}
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 8982b909c821..508bd496488a 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_WMI_H
@@ -6346,6 +6346,11 @@ enum wmi_sta_keepalive_method {
 #define WMI_STA_KEEPALIVE_INTERVAL_DEFAULT	30
 #define WMI_STA_KEEPALIVE_INTERVAL_DISABLE	0
 
+enum wmi_wmm_params_type {
+	WMI_WMM_PARAM_TYPE_LEGACY = 0,
+	WMI_WMM_PARAM_TYPE_11AX_MU_EDCA = 1,
+};
+
 const void **ath11k_wmi_tlv_parse_alloc(struct ath11k_base *ab,
 					struct sk_buff *skb, gfp_t gfp);
 int ath11k_wmi_cmd_send(struct ath11k_pdev_wmi *wmi, struct sk_buff *skb,
@@ -6402,7 +6407,8 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
 int ath11k_wmi_send_scan_stop_cmd(struct ath11k *ar,
 				  struct scan_cancel_param *param);
 int ath11k_wmi_send_wmm_update_cmd_tlv(struct ath11k *ar, u32 vdev_id,
-				       struct wmi_wmm_params_all_arg *param);
+				       struct wmi_wmm_params_all_arg *param,
+				       enum wmi_wmm_params_type wmm_param_type);
 int ath11k_wmi_pdev_suspend(struct ath11k *ar, u32 suspend_opt,
 			    u32 pdev_id);
 int ath11k_wmi_pdev_resume(struct ath11k *ar, u32 pdev_id);
-- 
2.34.1


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

end of thread, other threads:[~2025-12-15 13:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  5:00 [PATCH] wifi: ath11k: add support for MU EDCA Yu Zhang(Yuriy)
2025-11-21  8:41 ` Paweł Owoc
2025-11-22  7:55   ` Yu Zhang(Yuriy)
2025-11-22 10:17     ` Sebastian Gottschall
2025-11-24  1:09       ` Yu Zhang(Yuriy)
2025-11-24  4:35         ` Vasanthakumar Thiagarajan
2025-11-24  8:34           ` Paweł Owoc
2025-12-15 13:30             ` Paweł Owoc
  -- strict thread matches above, loose matches on Subject: below --
2025-11-19  8:09 Paweł Owoc
2025-01-24  6:13 Yu Zhang(Yuriy)
2025-01-31  4:16 ` Vasanthakumar Thiagarajan
2025-02-03 22:49 ` Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox