* [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size
@ 2025-03-10 13:28 Mantas Pucka
2025-03-13 9:45 ` Vasanthakumar Thiagarajan
2026-11-19 23:52 ` [ath-next] " jeff.johnson
0 siblings, 2 replies; 5+ messages in thread
From: Mantas Pucka @ 2025-03-10 13:28 UTC (permalink / raw)
To: ath12k
Cc: Johannes Berg, Jeff Johnson, linux-wireless, linux-kernel,
Mantas Pucka
When using BDF with both 5GHz and 6GHz bands enabled on QCN9274, interface
fails to start. It happens because FW fails to process
WMI_SCAN_CHAN_LIST_CMDID with argument size >2048, resulting in a command
timeout. The current code allows splitting channel list across multiple WMI
commands but uses WMI max_msg_len (4096) as chunk size, which is still too
large.
Fix this by limiting the number of channels sent at once, using the value
specified in WMI interface description [1].
[1] https://git.codelinaro.org/clo/qsdk/platform/vendor/qcom-opensource/wlan/fw-api/-/blob/NHSS.QSDK.13.0.0.6/fw/wmi_unified.h#L6459
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Signed-off-by: Mantas Pucka <mantas@8devices.com>
---
drivers/net/wireless/ath/ath12k/wmi.c | 3 +++
drivers/net/wireless/ath/ath12k/wmi.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 6d1ea5f3a791b09044191ce86f4897b7f06f35eb..88ac800d44401a139de75e90568c8d68f3ed4f3f 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -2780,6 +2780,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(struct ath12k *ar,
max_chan_limit = (wmi->wmi_ab->max_msg_len[ar->pdev_idx] - len) /
sizeof(*chan_info);
+ if (max_chan_limit > WMI_MAX_NUM_CHAN_PER_WMI_CMD)
+ max_chan_limit = WMI_MAX_NUM_CHAN_PER_WMI_CMD;
+
num_send_chans = min(arg->nallchans, max_chan_limit);
arg->nallchans -= num_send_chans;
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 1ba33e30ddd279e21a57a1db6150e1d08f4a2890..2831f7e3033c7f4a9886577f542c5026f1bada28 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -3909,6 +3909,8 @@ struct wmi_stop_scan_cmd {
__le32 pdev_id;
} __packed;
+#define WMI_MAX_NUM_CHAN_PER_WMI_CMD 58
+
struct ath12k_wmi_scan_chan_list_arg {
u32 pdev_id;
u16 nallchans;
---
base-commit: 42aa76e608ca845c98e79f9e23af0bdb07b2eb1d
change-id: 20250310-limit-wmi-chanlist-17cb8d27cba6
Best regards,
--
Mantas Pucka <mantas@8devices.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size
2025-03-10 13:28 [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size Mantas Pucka
@ 2025-03-13 9:45 ` Vasanthakumar Thiagarajan
2025-03-13 10:10 ` Mantas
2026-11-19 23:52 ` [ath-next] " jeff.johnson
1 sibling, 1 reply; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-03-13 9:45 UTC (permalink / raw)
To: Mantas Pucka, ath12k
Cc: Johannes Berg, Jeff Johnson, linux-wireless, linux-kernel
On 3/10/2025 6:58 PM, Mantas Pucka wrote:
> When using BDF with both 5GHz and 6GHz bands enabled on QCN9274, interface
> fails to start. It happens because FW fails to process
> WMI_SCAN_CHAN_LIST_CMDID with argument size >2048, resulting in a command
> timeout. The current code allows splitting channel list across multiple WMI
> commands but uses WMI max_msg_len (4096) as chunk size, which is still too
Did you have any private changes to increase the message_len from current
2048 ot 4096 bytes? As mentioned in a reply for your other patch, multi-band
in qcn9274 requires additional changes in driver, only scan mode is supported
even with those changes.
Vasanth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size
2025-03-13 9:45 ` Vasanthakumar Thiagarajan
@ 2025-03-13 10:10 ` Mantas
2025-03-13 11:14 ` Vasanthakumar Thiagarajan
0 siblings, 1 reply; 5+ messages in thread
From: Mantas @ 2025-03-13 10:10 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan, ath12k
Cc: Johannes Berg, Jeff Johnson, linux-wireless, linux-kernel
On 2025-03-13 11:45, Vasanthakumar Thiagarajan wrote:
>
>
> On 3/10/2025 6:58 PM, Mantas Pucka wrote:
>> When using BDF with both 5GHz and 6GHz bands enabled on QCN9274,
>> interface
>> fails to start. It happens because FW fails to process
>> WMI_SCAN_CHAN_LIST_CMDID with argument size >2048, resulting in a
>> command
>> timeout. The current code allows splitting channel list across
>> multiple WMI
>> commands but uses WMI max_msg_len (4096) as chunk size, which is
>> still too
>
> Did you have any private changes to increase the message_len from current
> 2048 ot 4096 bytes? As mentioned in a reply for your other patch,
> multi-band
> in qcn9274 requires additional changes in driver, only scan mode is
> supported
> even with those changes.
>
No private changes, using unmodified FW from:
https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/tree/main/QCN9274/hw2.0/1.4.1/WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
max_msg_len comes from FW initialization message:
ath12k_htc_connect_service max_msg_len=0 flags_len=0x0 assigned_eid=0
boot htc service 'Control' ul pipe 0 dl pipe 1 eid 0 ready
ath12k_htc_connect_service max_msg_len=2040 flags_len=0x7f80100
assigned_eid=1
boot htc service 'HTT Data' ul pipe 4 dl pipe 1 eid 1 ready
ath12k_htc_connect_service max_msg_len=4088 flags_len=0xff80200
assigned_eid=2
boot htc service 'WMI' ul pipe 3 dl pipe 2 eid 2 ready
Is support for multi-band AP/STA limited by FW? AFAIK it works with
proprietary driver.
Mantas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size
2025-03-13 10:10 ` Mantas
@ 2025-03-13 11:14 ` Vasanthakumar Thiagarajan
0 siblings, 0 replies; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-03-13 11:14 UTC (permalink / raw)
To: Mantas, ath12k; +Cc: Johannes Berg, Jeff Johnson, linux-wireless, linux-kernel
On 3/13/2025 3:40 PM, Mantas wrote:
> On 2025-03-13 11:45, Vasanthakumar Thiagarajan wrote:
>>
>>
>> On 3/10/2025 6:58 PM, Mantas Pucka wrote:
>>> When using BDF with both 5GHz and 6GHz bands enabled on QCN9274, interface
>>> fails to start. It happens because FW fails to process
>>> WMI_SCAN_CHAN_LIST_CMDID with argument size >2048, resulting in a command
>>> timeout. The current code allows splitting channel list across multiple WMI
>>> commands but uses WMI max_msg_len (4096) as chunk size, which is still too
>>
>> Did you have any private changes to increase the message_len from current
>> 2048 ot 4096 bytes? As mentioned in a reply for your other patch, multi-band
>> in qcn9274 requires additional changes in driver, only scan mode is supported
>> even with those changes.
>>
> No private changes, using unmodified FW from:
>
> https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/tree/main/QCN9274/hw2.0/1.4.1/WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
>
> max_msg_len comes from FW initialization message:
>
> ath12k_htc_connect_service max_msg_len=0 flags_len=0x0 assigned_eid=0
> boot htc service 'Control' ul pipe 0 dl pipe 1 eid 0 ready
> ath12k_htc_connect_service max_msg_len=2040 flags_len=0x7f80100 assigned_eid=1
> boot htc service 'HTT Data' ul pipe 4 dl pipe 1 eid 1 ready
> ath12k_htc_connect_service max_msg_len=4088 flags_len=0xff80200 assigned_eid=2
> boot htc service 'WMI' ul pipe 3 dl pipe 2 eid 2 ready
>
Ah, I see. It looks like firmware does not strictly honor the host configuration
in some cases.
>
> Is support for multi-band AP/STA limited by FW? AFAIK it works with proprietary driver.
>
There are no validations done with multi-band AP/STA mode configurations.
So we can not really claim the support.
Vasanth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size
2025-03-10 13:28 [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size Mantas Pucka
2025-03-13 9:45 ` Vasanthakumar Thiagarajan
@ 2026-11-19 23:52 ` jeff.johnson
1 sibling, 0 replies; 5+ messages in thread
From: jeff.johnson @ 2026-11-19 23:52 UTC (permalink / raw)
To: mantas; +Cc: ath12k, linux-wireless, jeff.johnson
This is an automated message.
I am cleaning up my patchwork backlog, and this ancient patch does not
apply on top of the current main branch of ath.git. If you still wish for
this to be considered, please submit a new version of the patch, rebased on
the current main branch.
/jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-19 23:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 13:28 [PATCH ath-next] wifi: ath12k: limit WMI_SCAN_CHAN_LIST_CMDID argument size Mantas Pucka
2025-03-13 9:45 ` Vasanthakumar Thiagarajan
2025-03-13 10:10 ` Mantas
2025-03-13 11:14 ` Vasanthakumar Thiagarajan
2026-11-19 23:52 ` [ath-next] " jeff.johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox