diff mbox series

[1/2] wifi: ath11k: supports 2 station interfaces

Message ID 20230714023801.2621802-2-quic_cjhuang@quicinc.com
State New
Headers show
Series wifi: ath11k: support 2 station interfaces | expand

Commit Message

Carl Huang July 14, 2023, 2:38 a.m. UTC
Add hardware parameter support_dual_stations to indicate
whether 2 station interfaces are supported. For chips which
support this feature, limit total number of AP interface and
mesh point to 1. The max interfaces are 3 for such chips.

The chips affected are:
 QCA6390 hw2.0
 WCN6855 hw2.0
 WCN6855 hw2.1
Other chips are not affected.

For affected chips, remove radar_detect_widths because now
num_different_channels is set to 2. radar_detect_widths can
be set only when num_different_channels is 1. See mac80211
function wiphy_verify_combinations for details.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c | 14 ++++--
 drivers/net/wireless/ath/ath11k/hw.c   |  2 +-
 drivers/net/wireless/ath/ath11k/hw.h   |  1 +
 drivers/net/wireless/ath/ath11k/mac.c  | 62 +++++++++++++++++---------
 4 files changed, 53 insertions(+), 26 deletions(-)

Comments

Kalle Valo Feb. 13, 2024, 4:17 p.m. UTC | #1
Carl Huang <quic_cjhuang@quicinc.com> wrote:

> Add hardware parameter support_dual_stations to indicate
> whether 2 station interfaces are supported. For chips which
> support this feature, limit total number of AP interface and
> mesh point to 1. The max interfaces are 3 for such chips.
> 
> The chips affected are:
> 
>  QCA6390 hw2.0
>  WCN6855 hw2.0
>  WCN6855 hw2.1
> 
> Other chips are not affected.

Sorry for delay. I have now added this to the pending branch, there was some
simply conflict which 'git am -3' was able to fix on it's own:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=43b8e99e19e8126e113eb9141621cf7e4b32d4f0

> For affected chips, remove radar_detect_widths because now
> num_different_channels is set to 2. radar_detect_widths can
> be set only when num_different_channels is 1. See mac80211
> function wiphy_verify_combinations for details.

So removing radar_detect_widths means that DFS will not be supported on the
affect chips, right? I think I should add that to the commit message.
Kalle Valo Feb. 15, 2024, 11:23 a.m. UTC | #2
Carl Huang <quic_cjhuang@quicinc.com> wrote:

> Add hardware parameter support_dual_stations to indicate whether 2 station
> interfaces are supported. For chips which support this feature, limit total
> number of AP interface and mesh point to 1. The max interfaces are 3 for such
> chips.
> 
> The chips affected are:
> 
>  QCA6390 hw2.0
>  WCN6855 hw2.0
>  WCN6855 hw2.1
> 
> Other chips are not affected.
> 
> For affected chips, remove radar_detect_widths because now
> num_different_channels is set to 2. radar_detect_widths can be set only when
> num_different_channels is 1, see mac80211 function wiphy_verify_combinations
> for details. This means that in affectected chips DFS cannot be enabled in AP
> mode.
> 
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
> 
> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

2 patches applied to ath-next branch of ath.git, thanks.

f019f4dff2e4 wifi: ath11k: support 2 station interfaces
24395ec11707 wifi: ath11k: provide address list if chip supports 2 stations
Luca Weiss May 10, 2024, 8:22 a.m. UTC | #3
On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
> Add hardware parameter support_dual_stations to indicate
> whether 2 station interfaces are supported. For chips which
> support this feature, limit total number of AP interface and
> mesh point to 1. The max interfaces are 3 for such chips.
>
> The chips affected are:
>  QCA6390 hw2.0
>  WCN6855 hw2.0
>  WCN6855 hw2.1
> Other chips are not affected.
>
> For affected chips, remove radar_detect_widths because now
> num_different_channels is set to 2. radar_detect_widths can
> be set only when num_different_channels is 1. See mac80211
> function wiphy_verify_combinations for details.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Hi Carl,

Unfortunately this commit breaks wifi on a QCM6490 smartphone
(qcm6490-fairphone-fp5) and makes the board crash.

Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
provide address list if chip supports 2 stations")) makes wifi work
again.

Here's the crash log:

[   43.458118] ath11k 17a10040.wifi: Adding to iommu group 11
[   43.459075] ath11k 17a10040.wifi: wcn6750 hw1.0
[   43.461219] remoteproc remoteproc2: powering up 8a00000.remoteproc
[   43.490363] remoteproc remoteproc2: Booting fw image qcom/qcm6490/fairphone5/wpss.mbn, size 7435056
[   43.614039] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
[   43.746227] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
[   43.746262] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
[   53.116443] qcom_q6v5_pas 8a00000.remoteproc: fatal error received: cmnos_thread.c:4645:Asserted in cmnos_allocram.c:cmnos_allocram_base_with_alignment_recurse:497 with Args:0x3,0x3,0x0
[   53.116503] remoteproc remoteproc2: crash detected in 8a00000.remoteproc: type fatal error
[   53.116734] remoteproc remoteproc2: handling crash #1 in 8a00000.remoteproc
[   53.116749] remoteproc remoteproc2: recovering 8a00000.remoteproc
[   53.125088] ath11k 17a10040.wifi: failed to send WMI_PDEV_SET_PARAM cmd
[   53.125116] ath11k 17a10040.wifi: failed to enable PMF QOS: (-108
[   53.125167] remoteproc remoteproc2: stopped remote processor 8a00000.remoteproc
[   53.127827] ath11k 17a10040.wifi: failed to send WMI_PDEV_SET_PARAM cmd
[   53.127848] ath11k 17a10040.wifi: failed to enable PMF QOS: (-108
[   53.258990] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
[   53.390288] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
[   53.390319] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
[   53.404765] ath11k 17a10040.wifi: Last interrupt received for each CE:
[   53.404789] ath11k 17a10040.wifi: CE_id 0 pipe_num 0 580ms before
[   53.404804] ath11k 17a10040.wifi: CE_id 1 pipe_num 1 476ms before
[   53.404818] ath11k 17a10040.wifi: CE_id 2 pipe_num 2 476ms before
[   53.404831] ath11k 17a10040.wifi: CE_id 3 pipe_num 3 580ms before
[   53.404844] ath11k 17a10040.wifi: CE_id 5 pipe_num 5 4294720700ms before
[   53.404858] ath11k 17a10040.wifi: CE_id 7 pipe_num 7 4294720700ms before
[   53.404871] ath11k 17a10040.wifi: CE_id 8 pipe_num 8 4294720700ms before
[   53.404883] ath11k 17a10040.wifi: 
               Last interrupt received for each group:
[   53.404894] ath11k 17a10040.wifi: group_id 0 4294720700ms before
[   53.404907] ath11k 17a10040.wifi: group_id 1 4294720700ms before
[   53.404918] ath11k 17a10040.wifi: group_id 2 4294720700ms before
[   53.404929] ath11k 17a10040.wifi: group_id 3 4294720700ms before
[   53.404940] ath11k 17a10040.wifi: group_id 4 4294720700ms before
[   53.404952] ath11k 17a10040.wifi: group_id 5 4294720700ms before
[   53.404964] ath11k 17a10040.wifi: group_id 6 4294720700ms before
[   53.404976] ath11k 17a10040.wifi: group_id 7 4294720700ms before
[   53.404987] ath11k 17a10040.wifi: group_id 8 4294720700ms before
[   53.404998] ath11k 17a10040.wifi: group_id 9 4294720700ms before
[   53.405009] ath11k 17a10040.wifi: group_id 10 4294720700ms before
[   53.405021] ath11k 17a10040.wifi: dst srng id 0 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405037] ath11k 17a10040.wifi: dst srng id 1 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405052] ath11k 17a10040.wifi: dst srng id 2 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405066] ath11k 17a10040.wifi: dst srng id 3 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405082] ath11k 17a10040.wifi: dst srng id 4 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405097] ath11k 17a10040.wifi: src srng id 5 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405114] ath11k 17a10040.wifi: src srng id 8 hp 0, reap_hp 2550, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405130] ath11k 17a10040.wifi: dst srng id 9 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405145] ath11k 17a10040.wifi: src srng id 16 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405162] ath11k 17a10040.wifi: src srng id 17 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405179] ath11k 17a10040.wifi: src srng id 18 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405196] ath11k 17a10040.wifi: src srng id 24 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405213] ath11k 17a10040.wifi: dst srng id 25 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405228] ath11k 17a10040.wifi: src srng id 32 hp 12, reap_hp 8, cur tp 12, cached tp 12 last tp 8 napi processed before 580ms
[   53.405244] ath11k 17a10040.wifi: src srng id 35 hp 4, reap_hp 0, cur tp 4, cached tp 4 last tp 0 napi processed before 580ms
[   53.405260] ath11k 17a10040.wifi: src srng id 36 hp 20, reap_hp 0, cur tp 20, cached tp 12 last tp 12 napi processed before 460ms
[   53.405276] ath11k 17a10040.wifi: src srng id 39 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405294] ath11k 17a10040.wifi: src srng id 57 hp 1022, reap_hp 1022, cur tp 2, cached tp 2 last tp 2 napi processed before 476ms
[   53.405310] ath11k 17a10040.wifi: src srng id 58 hp 18, reap_hp 18, cur tp 22, cached tp 22 last tp 22 napi processed before 476ms
[   53.405327] ath11k 17a10040.wifi: src srng id 61 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 584ms
[   53.405345] ath11k 17a10040.wifi: dst srng id 81 tp 4, cur hp 4, cached hp 4 last hp 4 napi processed before 476ms
[   53.405361] ath11k 17a10040.wifi: dst srng id 82 tp 44, cur hp 44, cached hp 44 last hp 44 napi processed before 476ms
[   53.405378] ath11k 17a10040.wifi: dst srng id 85 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405394] ath11k 17a10040.wifi: src srng id 104 hp 65532, reap_hp 65532, cur tp 0, cached tp 0 last tp 0 napi processed before 588ms
[   53.405411] ath11k 17a10040.wifi: src srng id 105 hp 0, reap_hp 504, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405427] ath11k 17a10040.wifi: dst srng id 106 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405443] ath11k 17a10040.wifi: dst srng id 108 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405458] ath11k 17a10040.wifi: dst srng id 109 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405474] ath11k 17a10040.wifi: dst srng id 110 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.405491] ath11k 17a10040.wifi: src srng id 128 hp 8190, reap_hp 8190, cur tp 0, cached tp 0 last tp 0 napi processed before 464ms
[   53.405507] ath11k 17a10040.wifi: src srng id 129 hp 0, reap_hp 2046, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
[   53.405525] ath11k 17a10040.wifi: src srng id 132 hp 2046, reap_hp 2046, cur tp 0, cached tp 0 last tp 0 napi processed before 460ms
[   53.405542] ath11k 17a10040.wifi: dst srng id 133 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
[   53.747641] qcom_q6v5_pas 8a00000.remoteproc: fatal error received: platform_msl.c:513:PCIE ACMT error debug0 0x6030, debug1 0x101
[   53.747677] remoteproc remoteproc2: crash detected in 8a00000.remoteproc: type fatal error
[   53.747864] remoteproc remoteproc2: handling crash #2 in 8a00000.remoteproc
[   53.747875] remoteproc remoteproc2: recovering 8a00000.remoteproc
[   53.758632] remoteproc remoteproc2: stopped remote processor 8a00000.remoteproc
[   53.886889] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
[   54.017475] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
[   54.017505] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
[   54.027605] ath11k 17a10040.wifi: Last interrupt received for each CE:
[   54.027627] ath11k 17a10040.wifi: CE_id 0 pipe_num 0 1204ms before
[   54.027642] ath11k 17a10040.wifi: CE_id 1 pipe_num 1 1100ms before
[   54.027655] ath11k 17a10040.wifi: CE_id 2 pipe_num 2 1100ms before
[   54.027667] ath11k 17a10040.wifi: CE_id 3 pipe_num 3 1204ms before
[   54.027680] ath11k 17a10040.wifi: CE_id 5 pipe_num 5 4294721324ms before
[   54.027692] ath11k 17a10040.wifi: CE_id 7 pipe_num 7 4294721324ms before
[   54.027704] ath11k 17a10040.wifi: CE_id 8 pipe_num 8 4294721324ms before
[   54.027716] ath11k 17a10040.wifi: 
               Last interrupt received for each group:
[   54.027726] ath11k 17a10040.wifi: group_id 0 4294721324ms before
[   54.027738] ath11k 17a10040.wifi: group_id 1 4294721324ms before
[   54.027749] ath11k 17a10040.wifi: group_id 2 4294721324ms before
[   54.027760] ath11k 17a10040.wifi: group_id 3 4294721324ms before
[   54.027771] ath11k 17a10040.wifi: group_id 4 4294721324ms before
[   54.027782] ath11k 17a10040.wifi: group_id 5 4294721324ms before
[   54.027794] ath11k 17a10040.wifi: group_id 6 4294721324ms before
[   54.027805] ath11k 17a10040.wifi: group_id 7 4294721324ms before
[   54.027816] ath11k 17a10040.wifi: group_id 8 4294721324ms before
[   54.027827] ath11k 17a10040.wifi: group_id 9 4294721324ms before
[   54.027838] ath11k 17a10040.wifi: group_id 10 4294721324ms before
[   54.027850] ath11k 17a10040.wifi: dst srng id 4 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.027866] ath11k 17a10040.wifi: src srng id 5 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.027882] ath11k 17a10040.wifi: src srng id 8 hp 0, reap_hp 2550, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.027898] ath11k 17a10040.wifi: dst srng id 9 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.027914] ath11k 17a10040.wifi: src srng id 16 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.027930] ath11k 17a10040.wifi: src srng id 17 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.027947] ath11k 17a10040.wifi: src srng id 18 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.027964] ath11k 17a10040.wifi: src srng id 24 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.027980] ath11k 17a10040.wifi: dst srng id 25 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.027997] ath11k 17a10040.wifi: src srng id 32 hp 0, reap_hp 60, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.028014] ath11k 17a10040.wifi: src srng id 35 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.028030] ath11k 17a10040.wifi: src srng id 36 hp 0, reap_hp 8188, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.028045] ath11k 17a10040.wifi: src srng id 39 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.028063] ath11k 17a10040.wifi: src srng id 57 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 440ms
[   54.028079] ath11k 17a10040.wifi: src srng id 58 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 436ms
[   54.028095] ath11k 17a10040.wifi: src srng id 61 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 436ms
[   54.028112] ath11k 17a10040.wifi: dst srng id 81 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.028128] ath11k 17a10040.wifi: dst srng id 82 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.028143] ath11k 17a10040.wifi: dst srng id 85 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.028160] ath11k 17a10040.wifi: src srng id 104 hp 65532, reap_hp 65532, cur tp 0, cached tp 0 last tp 0 napi processed before 448ms
[   54.028177] ath11k 17a10040.wifi: src srng id 105 hp 0, reap_hp 504, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
[   54.028194] ath11k 17a10040.wifi: dst srng id 106 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.028210] ath11k 17a10040.wifi: dst srng id 108 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.028226] ath11k 17a10040.wifi: dst srng id 109 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.028242] ath11k 17a10040.wifi: dst srng id 110 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
[   54.622819] ath11k 17a10040.wifi: failed to receive control response completion, polling..
[   55.646232] ath11k 17a10040.wifi: ctl_resp never came in (-110)
[   55.646259] ath11k 17a10040.wifi: failed to connect to HTC: -110
[   55.653201] ath11k 17a10040.wifi: failed to start core: -110


Let me know if you need any more information.

Regards
Luca

>
> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath11k/core.c | 14 ++++--
>  drivers/net/wireless/ath/ath11k/hw.c   |  2 +-
>  drivers/net/wireless/ath/ath11k/hw.h   |  1 +
>  drivers/net/wireless/ath/ath11k/mac.c  | 62 +++++++++++++++++---------
>  4 files changed, 53 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
> index bebfd342e28b..739a8d13d57d 100644
> --- a/drivers/net/wireless/ath/ath11k/core.c
> +++ b/drivers/net/wireless/ath/ath11k/core.c
> @@ -120,6 +120,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tcl_ring_retry = true,
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
> +		.support_dual_stations = false,
>  	},
>  	{
>  		.hw_rev = ATH11K_HW_IPQ6018_HW10,
> @@ -202,6 +203,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
>  		.support_fw_mac_sequence = false,
> +		.support_dual_stations = false,
>  	},
>  	{
>  		.name = "qca6390 hw2.0",
> @@ -251,7 +253,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.cold_boot_calib = false,
>  		.cbcal_restart_fw = false,
>  		.fw_mem_mode = 0,
> -		.num_vdevs = 16 + 1,
> +		.num_vdevs = 2 + 1,
>  		.num_peers = 512,
>  		.supports_suspend = true,
>  		.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
> @@ -286,6 +288,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
>  		.support_fw_mac_sequence = true,
> +		.support_dual_stations = true,
>  	},
>  	{
>  		.name = "qcn9074 hw1.0",
> @@ -367,6 +370,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
>  		.support_fw_mac_sequence = false,
> +		.support_dual_stations = false,
>  	},
>  	{
>  		.name = "wcn6855 hw2.0",
> @@ -416,7 +420,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.cold_boot_calib = false,
>  		.cbcal_restart_fw = false,
>  		.fw_mem_mode = 0,
> -		.num_vdevs = 16 + 1,
> +		.num_vdevs = 2 + 1,
>  		.num_peers = 512,
>  		.supports_suspend = true,
>  		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
> @@ -451,6 +455,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
>  		.support_fw_mac_sequence = true,
> +		.support_dual_stations = true,
>  	},
>  	{
>  		.name = "wcn6855 hw2.1",
> @@ -498,7 +503,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.cold_boot_calib = false,
>  		.cbcal_restart_fw = false,
>  		.fw_mem_mode = 0,
> -		.num_vdevs = 16 + 1,
> +		.num_vdevs = 2 + 1,
>  		.num_peers = 512,
>  		.supports_suspend = true,
>  		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
> @@ -533,6 +538,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
>  		.support_fw_mac_sequence = true,
> +		.support_dual_stations = true,
>  	},
>  	{
>  		.name = "wcn6750 hw1.0",
> @@ -613,6 +619,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
>  		.smp2p_wow_exit = true,
>  		.support_fw_mac_sequence = true,
> +		.support_dual_stations = false,
>  	},
>  	{
>  		.hw_rev = ATH11K_HW_IPQ5018_HW10,
> @@ -693,6 +700,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>  		.smp2p_wow_exit = false,
>  		.support_fw_mac_sequence = false,
> +		.support_dual_stations = false,
>  	},
>  };
>  
> diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
> index d7b5ec6e6904..3b56ba1b8534 100644
> --- a/drivers/net/wireless/ath/ath11k/hw.c
> +++ b/drivers/net/wireless/ath/ath11k/hw.c
> @@ -58,7 +58,7 @@ static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
>  static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
>  					   struct target_resource_config *config)
>  {
> -	config->num_vdevs = 4;
> +	config->num_vdevs = ab->hw_params.num_vdevs;
>  	config->num_peers = 16;
>  	config->num_tids = 32;
>  
> diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
> index f5533630a7f9..40ed5608fe81 100644
> --- a/drivers/net/wireless/ath/ath11k/hw.h
> +++ b/drivers/net/wireless/ath/ath11k/hw.h
> @@ -225,6 +225,7 @@ struct ath11k_hw_params {
>  	u32 tx_ring_size;
>  	bool smp2p_wow_exit;
>  	bool support_fw_mac_sequence;
> +	bool support_dual_stations;
>  };
>  
>  struct ath11k_hw_ops {
> diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
> index 8c77ade49437..3a9494bc944c 100644
> --- a/drivers/net/wireless/ath/ath11k/mac.c
> +++ b/drivers/net/wireless/ath/ath11k/mac.c
> @@ -9287,28 +9287,46 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar)
>  		return -ENOMEM;
>  	}
>  
> -	limits[0].max = 1;
> -	limits[0].types |= BIT(NL80211_IFTYPE_STATION);
> -
> -	limits[1].max = 16;
> -	limits[1].types |= BIT(NL80211_IFTYPE_AP);
> -
> -	if (IS_ENABLED(CONFIG_MAC80211_MESH) &&
> -	    ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
> -		limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
> -
> -	combinations[0].limits = limits;
> -	combinations[0].n_limits = n_limits;
> -	combinations[0].max_interfaces = 16;
> -	combinations[0].num_different_channels = 1;
> -	combinations[0].beacon_int_infra_match = true;
> -	combinations[0].beacon_int_min_gcd = 100;
> -	combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
> -						BIT(NL80211_CHAN_WIDTH_20) |
> -						BIT(NL80211_CHAN_WIDTH_40) |
> -						BIT(NL80211_CHAN_WIDTH_80) |
> -						BIT(NL80211_CHAN_WIDTH_80P80) |
> -						BIT(NL80211_CHAN_WIDTH_160);
> +	if (ab->hw_params.support_dual_stations) {
> +		limits[0].max = 2;
> +		limits[0].types |= BIT(NL80211_IFTYPE_STATION);
> +
> +		limits[1].max = 1;
> +		limits[1].types |= BIT(NL80211_IFTYPE_AP);
> +		if (IS_ENABLED(CONFIG_MAC80211_MESH) &&
> +		    ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
> +			limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
> +
> +		combinations[0].limits = limits;
> +		combinations[0].n_limits = 2;
> +		combinations[0].max_interfaces = ab->hw_params.num_vdevs;
> +		combinations[0].num_different_channels = 2;
> +		combinations[0].beacon_int_infra_match = true;
> +		combinations[0].beacon_int_min_gcd = 100;
> +	} else {
> +		limits[0].max = 1;
> +		limits[0].types |= BIT(NL80211_IFTYPE_STATION);
> +
> +		limits[1].max = 16;
> +		limits[1].types |= BIT(NL80211_IFTYPE_AP);
> +
> +		if (IS_ENABLED(CONFIG_MAC80211_MESH) &&
> +		    ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
> +			limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
> +
> +		combinations[0].limits = limits;
> +		combinations[0].n_limits = 2;
> +		combinations[0].max_interfaces = 16;
> +		combinations[0].num_different_channels = 1;
> +		combinations[0].beacon_int_infra_match = true;
> +		combinations[0].beacon_int_min_gcd = 100;
> +		combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
> +							BIT(NL80211_CHAN_WIDTH_20) |
> +							BIT(NL80211_CHAN_WIDTH_40) |
> +							BIT(NL80211_CHAN_WIDTH_80) |
> +							BIT(NL80211_CHAN_WIDTH_80P80) |
> +							BIT(NL80211_CHAN_WIDTH_160);
> +	}
>  
>  	ar->hw->wiphy->iface_combinations = combinations;
>  	ar->hw->wiphy->n_iface_combinations = 1;
Kalle Valo May 10, 2024, 10:18 a.m. UTC | #4
"Luca Weiss" <luca.weiss@fairphone.com> writes:

> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>> Add hardware parameter support_dual_stations to indicate
>> whether 2 station interfaces are supported. For chips which
>> support this feature, limit total number of AP interface and
>> mesh point to 1. The max interfaces are 3 for such chips.
>>
>> The chips affected are:
>>  QCA6390 hw2.0
>>  WCN6855 hw2.0
>>  WCN6855 hw2.1
>> Other chips are not affected.
>>
>> For affected chips, remove radar_detect_widths because now
>> num_different_channels is set to 2. radar_detect_widths can
>> be set only when num_different_channels is 1. See mac80211
>> function wiphy_verify_combinations for details.
>>
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>
> Hi Carl,
>
> Unfortunately this commit breaks wifi on a QCM6490 smartphone
> (qcm6490-fairphone-fp5) and makes the board crash.
>
> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
> provide address list if chip supports 2 stations")) makes wifi work
> again.

Thanks for the report. So the broken commit is:

f019f4dff2e4 wifi: ath11k: support 2 station interfaces

This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
fully broken in v6.9? Not good. And most likely Linus will release v6.9
on Sunday so it's too late to get a fix included in the final release.

Carl, can you fix this ASAP? Or should we just revert the broken
commits?

Adding this to our regression tracking:

#regzbot introduced: f019f4dff2e4 ^
#regzbot title: ath11k: WCN6750 firmware crashes during initialisation
Carl Huang May 10, 2024, 11:35 a.m. UTC | #5
On 2024/5/10 16:22, Luca Weiss wrote:
> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>> Add hardware parameter support_dual_stations to indicate
>> whether 2 station interfaces are supported. For chips which
>> support this feature, limit total number of AP interface and
>> mesh point to 1. The max interfaces are 3 for such chips.
>>
>> The chips affected are:
>>   QCA6390 hw2.0
>>   WCN6855 hw2.0
>>   WCN6855 hw2.1
>> Other chips are not affected.
>>
>> For affected chips, remove radar_detect_widths because now
>> num_different_channels is set to 2. radar_detect_widths can
>> be set only when num_different_channels is 1. See mac80211
>> function wiphy_verify_combinations for details.
>>
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
> 
> Hi Carl,
> 
> Unfortunately this commit breaks wifi on a QCM6490 smartphone
> (qcm6490-fairphone-fp5) and makes the board crash.
> 
> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
> provide address list if chip supports 2 stations")) makes wifi work
> again.
> 
> Here's the crash log:
> 
> [   43.458118] ath11k 17a10040.wifi: Adding to iommu group 11
> [   43.459075] ath11k 17a10040.wifi: wcn6750 hw1.0
> [   43.461219] remoteproc remoteproc2: powering up 8a00000.remoteproc
> [   43.490363] remoteproc remoteproc2: Booting fw image qcom/qcm6490/fairphone5/wpss.mbn, size 7435056
> [   43.614039] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
> [   43.746227] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
> [   43.746262] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
> [   53.116443] qcom_q6v5_pas 8a00000.remoteproc: fatal error received: cmnos_thread.c:4645:Asserted in cmnos_allocram.c:cmnos_allocram_base_with_alignment_recurse:497 with Args:0x3,0x3,0x0
> [   53.116503] remoteproc remoteproc2: crash detected in 8a00000.remoteproc: type fatal error
> [   53.116734] remoteproc remoteproc2: handling crash #1 in 8a00000.remoteproc
> [   53.116749] remoteproc remoteproc2: recovering 8a00000.remoteproc
> [   53.125088] ath11k 17a10040.wifi: failed to send WMI_PDEV_SET_PARAM cmd
> [   53.125116] ath11k 17a10040.wifi: failed to enable PMF QOS: (-108
> [   53.125167] remoteproc remoteproc2: stopped remote processor 8a00000.remoteproc
> [   53.127827] ath11k 17a10040.wifi: failed to send WMI_PDEV_SET_PARAM cmd
> [   53.127848] ath11k 17a10040.wifi: failed to enable PMF QOS: (-108
> [   53.258990] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
> [   53.390288] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
> [   53.390319] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
> [   53.404765] ath11k 17a10040.wifi: Last interrupt received for each CE:
> [   53.404789] ath11k 17a10040.wifi: CE_id 0 pipe_num 0 580ms before
> [   53.404804] ath11k 17a10040.wifi: CE_id 1 pipe_num 1 476ms before
> [   53.404818] ath11k 17a10040.wifi: CE_id 2 pipe_num 2 476ms before
> [   53.404831] ath11k 17a10040.wifi: CE_id 3 pipe_num 3 580ms before
> [   53.404844] ath11k 17a10040.wifi: CE_id 5 pipe_num 5 4294720700ms before
> [   53.404858] ath11k 17a10040.wifi: CE_id 7 pipe_num 7 4294720700ms before
> [   53.404871] ath11k 17a10040.wifi: CE_id 8 pipe_num 8 4294720700ms before
> [   53.404883] ath11k 17a10040.wifi:
>                 Last interrupt received for each group:
> [   53.404894] ath11k 17a10040.wifi: group_id 0 4294720700ms before
> [   53.404907] ath11k 17a10040.wifi: group_id 1 4294720700ms before
> [   53.404918] ath11k 17a10040.wifi: group_id 2 4294720700ms before
> [   53.404929] ath11k 17a10040.wifi: group_id 3 4294720700ms before
> [   53.404940] ath11k 17a10040.wifi: group_id 4 4294720700ms before
> [   53.404952] ath11k 17a10040.wifi: group_id 5 4294720700ms before
> [   53.404964] ath11k 17a10040.wifi: group_id 6 4294720700ms before
> [   53.404976] ath11k 17a10040.wifi: group_id 7 4294720700ms before
> [   53.404987] ath11k 17a10040.wifi: group_id 8 4294720700ms before
> [   53.404998] ath11k 17a10040.wifi: group_id 9 4294720700ms before
> [   53.405009] ath11k 17a10040.wifi: group_id 10 4294720700ms before
> [   53.405021] ath11k 17a10040.wifi: dst srng id 0 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405037] ath11k 17a10040.wifi: dst srng id 1 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405052] ath11k 17a10040.wifi: dst srng id 2 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405066] ath11k 17a10040.wifi: dst srng id 3 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405082] ath11k 17a10040.wifi: dst srng id 4 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405097] ath11k 17a10040.wifi: src srng id 5 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405114] ath11k 17a10040.wifi: src srng id 8 hp 0, reap_hp 2550, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405130] ath11k 17a10040.wifi: dst srng id 9 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405145] ath11k 17a10040.wifi: src srng id 16 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405162] ath11k 17a10040.wifi: src srng id 17 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405179] ath11k 17a10040.wifi: src srng id 18 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405196] ath11k 17a10040.wifi: src srng id 24 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405213] ath11k 17a10040.wifi: dst srng id 25 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405228] ath11k 17a10040.wifi: src srng id 32 hp 12, reap_hp 8, cur tp 12, cached tp 12 last tp 8 napi processed before 580ms
> [   53.405244] ath11k 17a10040.wifi: src srng id 35 hp 4, reap_hp 0, cur tp 4, cached tp 4 last tp 0 napi processed before 580ms
> [   53.405260] ath11k 17a10040.wifi: src srng id 36 hp 20, reap_hp 0, cur tp 20, cached tp 12 last tp 12 napi processed before 460ms
> [   53.405276] ath11k 17a10040.wifi: src srng id 39 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405294] ath11k 17a10040.wifi: src srng id 57 hp 1022, reap_hp 1022, cur tp 2, cached tp 2 last tp 2 napi processed before 476ms
> [   53.405310] ath11k 17a10040.wifi: src srng id 58 hp 18, reap_hp 18, cur tp 22, cached tp 22 last tp 22 napi processed before 476ms
> [   53.405327] ath11k 17a10040.wifi: src srng id 61 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 584ms
> [   53.405345] ath11k 17a10040.wifi: dst srng id 81 tp 4, cur hp 4, cached hp 4 last hp 4 napi processed before 476ms
> [   53.405361] ath11k 17a10040.wifi: dst srng id 82 tp 44, cur hp 44, cached hp 44 last hp 44 napi processed before 476ms
> [   53.405378] ath11k 17a10040.wifi: dst srng id 85 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405394] ath11k 17a10040.wifi: src srng id 104 hp 65532, reap_hp 65532, cur tp 0, cached tp 0 last tp 0 napi processed before 588ms
> [   53.405411] ath11k 17a10040.wifi: src srng id 105 hp 0, reap_hp 504, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405427] ath11k 17a10040.wifi: dst srng id 106 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405443] ath11k 17a10040.wifi: dst srng id 108 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405458] ath11k 17a10040.wifi: dst srng id 109 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405474] ath11k 17a10040.wifi: dst srng id 110 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.405491] ath11k 17a10040.wifi: src srng id 128 hp 8190, reap_hp 8190, cur tp 0, cached tp 0 last tp 0 napi processed before 464ms
> [   53.405507] ath11k 17a10040.wifi: src srng id 129 hp 0, reap_hp 2046, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> [   53.405525] ath11k 17a10040.wifi: src srng id 132 hp 2046, reap_hp 2046, cur tp 0, cached tp 0 last tp 0 napi processed before 460ms
> [   53.405542] ath11k 17a10040.wifi: dst srng id 133 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> [   53.747641] qcom_q6v5_pas 8a00000.remoteproc: fatal error received: platform_msl.c:513:PCIE ACMT error debug0 0x6030, debug1 0x101
> [   53.747677] remoteproc remoteproc2: crash detected in 8a00000.remoteproc: type fatal error
> [   53.747864] remoteproc remoteproc2: handling crash #2 in 8a00000.remoteproc
> [   53.747875] remoteproc remoteproc2: recovering 8a00000.remoteproc
> [   53.758632] remoteproc remoteproc2: stopped remote processor 8a00000.remoteproc
> [   53.886889] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
> [   54.017475] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
> [   54.017505] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
> [   54.027605] ath11k 17a10040.wifi: Last interrupt received for each CE:
> [   54.027627] ath11k 17a10040.wifi: CE_id 0 pipe_num 0 1204ms before
> [   54.027642] ath11k 17a10040.wifi: CE_id 1 pipe_num 1 1100ms before
> [   54.027655] ath11k 17a10040.wifi: CE_id 2 pipe_num 2 1100ms before
> [   54.027667] ath11k 17a10040.wifi: CE_id 3 pipe_num 3 1204ms before
> [   54.027680] ath11k 17a10040.wifi: CE_id 5 pipe_num 5 4294721324ms before
> [   54.027692] ath11k 17a10040.wifi: CE_id 7 pipe_num 7 4294721324ms before
> [   54.027704] ath11k 17a10040.wifi: CE_id 8 pipe_num 8 4294721324ms before
> [   54.027716] ath11k 17a10040.wifi:
>                 Last interrupt received for each group:
> [   54.027726] ath11k 17a10040.wifi: group_id 0 4294721324ms before
> [   54.027738] ath11k 17a10040.wifi: group_id 1 4294721324ms before
> [   54.027749] ath11k 17a10040.wifi: group_id 2 4294721324ms before
> [   54.027760] ath11k 17a10040.wifi: group_id 3 4294721324ms before
> [   54.027771] ath11k 17a10040.wifi: group_id 4 4294721324ms before
> [   54.027782] ath11k 17a10040.wifi: group_id 5 4294721324ms before
> [   54.027794] ath11k 17a10040.wifi: group_id 6 4294721324ms before
> [   54.027805] ath11k 17a10040.wifi: group_id 7 4294721324ms before
> [   54.027816] ath11k 17a10040.wifi: group_id 8 4294721324ms before
> [   54.027827] ath11k 17a10040.wifi: group_id 9 4294721324ms before
> [   54.027838] ath11k 17a10040.wifi: group_id 10 4294721324ms before
> [   54.027850] ath11k 17a10040.wifi: dst srng id 4 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.027866] ath11k 17a10040.wifi: src srng id 5 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.027882] ath11k 17a10040.wifi: src srng id 8 hp 0, reap_hp 2550, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.027898] ath11k 17a10040.wifi: dst srng id 9 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.027914] ath11k 17a10040.wifi: src srng id 16 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.027930] ath11k 17a10040.wifi: src srng id 17 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.027947] ath11k 17a10040.wifi: src srng id 18 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.027964] ath11k 17a10040.wifi: src srng id 24 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.027980] ath11k 17a10040.wifi: dst srng id 25 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.027997] ath11k 17a10040.wifi: src srng id 32 hp 0, reap_hp 60, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.028014] ath11k 17a10040.wifi: src srng id 35 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.028030] ath11k 17a10040.wifi: src srng id 36 hp 0, reap_hp 8188, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.028045] ath11k 17a10040.wifi: src srng id 39 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.028063] ath11k 17a10040.wifi: src srng id 57 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 440ms
> [   54.028079] ath11k 17a10040.wifi: src srng id 58 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 436ms
> [   54.028095] ath11k 17a10040.wifi: src srng id 61 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 436ms
> [   54.028112] ath11k 17a10040.wifi: dst srng id 81 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.028128] ath11k 17a10040.wifi: dst srng id 82 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.028143] ath11k 17a10040.wifi: dst srng id 85 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.028160] ath11k 17a10040.wifi: src srng id 104 hp 65532, reap_hp 65532, cur tp 0, cached tp 0 last tp 0 napi processed before 448ms
> [   54.028177] ath11k 17a10040.wifi: src srng id 105 hp 0, reap_hp 504, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> [   54.028194] ath11k 17a10040.wifi: dst srng id 106 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.028210] ath11k 17a10040.wifi: dst srng id 108 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.028226] ath11k 17a10040.wifi: dst srng id 109 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.028242] ath11k 17a10040.wifi: dst srng id 110 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> [   54.622819] ath11k 17a10040.wifi: failed to receive control response completion, polling..
> [   55.646232] ath11k 17a10040.wifi: ctl_resp never came in (-110)
> [   55.646259] ath11k 17a10040.wifi: failed to connect to HTC: -110
> [   55.653201] ath11k 17a10040.wifi: failed to start core: -110
> 
> 
> Let me know if you need any more information.
> 
> Regards
> Luca
> 
>>
>> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath11k/core.c | 14 ++++--
>>   drivers/net/wireless/ath/ath11k/hw.c   |  2 +-
>>   drivers/net/wireless/ath/ath11k/hw.h   |  1 +
>>   drivers/net/wireless/ath/ath11k/mac.c  | 62 +++++++++++++++++---------
>>   4 files changed, 53 insertions(+), 26 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
>> index bebfd342e28b..739a8d13d57d 100644
>> --- a/drivers/net/wireless/ath/ath11k/core.c
>> +++ b/drivers/net/wireless/ath/ath11k/core.c
>> @@ -120,6 +120,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tcl_ring_retry = true,
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>> +		.support_dual_stations = false,
>>   	},
>>   	{
>>   		.hw_rev = ATH11K_HW_IPQ6018_HW10,
>> @@ -202,6 +203,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>>   		.support_fw_mac_sequence = false,
>> +		.support_dual_stations = false,
>>   	},
>>   	{
>>   		.name = "qca6390 hw2.0",
>> @@ -251,7 +253,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.cold_boot_calib = false,
>>   		.cbcal_restart_fw = false,
>>   		.fw_mem_mode = 0,
>> -		.num_vdevs = 16 + 1,
>> +		.num_vdevs = 2 + 1,
>>   		.num_peers = 512,
>>   		.supports_suspend = true,
>>   		.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
>> @@ -286,6 +288,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>>   		.support_fw_mac_sequence = true,
>> +		.support_dual_stations = true,
>>   	},
>>   	{
>>   		.name = "qcn9074 hw1.0",
>> @@ -367,6 +370,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>>   		.support_fw_mac_sequence = false,
>> +		.support_dual_stations = false,
>>   	},
>>   	{
>>   		.name = "wcn6855 hw2.0",
>> @@ -416,7 +420,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.cold_boot_calib = false,
>>   		.cbcal_restart_fw = false,
>>   		.fw_mem_mode = 0,
>> -		.num_vdevs = 16 + 1,
>> +		.num_vdevs = 2 + 1,
>>   		.num_peers = 512,
>>   		.supports_suspend = true,
>>   		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
>> @@ -451,6 +455,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>>   		.support_fw_mac_sequence = true,
>> +		.support_dual_stations = true,
>>   	},
>>   	{
>>   		.name = "wcn6855 hw2.1",
>> @@ -498,7 +503,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.cold_boot_calib = false,
>>   		.cbcal_restart_fw = false,
>>   		.fw_mem_mode = 0,
>> -		.num_vdevs = 16 + 1,
>> +		.num_vdevs = 2 + 1,
>>   		.num_peers = 512,
>>   		.supports_suspend = true,
>>   		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
>> @@ -533,6 +538,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>>   		.support_fw_mac_sequence = true,
>> +		.support_dual_stations = true,
>>   	},
>>   	{
>>   		.name = "wcn6750 hw1.0",
>> @@ -613,6 +619,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
>>   		.smp2p_wow_exit = true,
>>   		.support_fw_mac_sequence = true,
>> +		.support_dual_stations = false,
>>   	},
>>   	{
>>   		.hw_rev = ATH11K_HW_IPQ5018_HW10,
>> @@ -693,6 +700,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
>>   		.smp2p_wow_exit = false,
>>   		.support_fw_mac_sequence = false,
>> +		.support_dual_stations = false,
>>   	},
>>   };
>>   
>> diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
>> index d7b5ec6e6904..3b56ba1b8534 100644
>> --- a/drivers/net/wireless/ath/ath11k/hw.c
>> +++ b/drivers/net/wireless/ath/ath11k/hw.c
>> @@ -58,7 +58,7 @@ static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
>>   static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
>>   					   struct target_resource_config *config)
>>   {
>> -	config->num_vdevs = 4;
>> +	config->num_vdevs = ab->hw_params.num_vdevs;

Hi Luca, I guess above line caused WCN6750 crash.
For a quick try, you can change it back to "config->num_vdevs = 4".

A more reasonable fix coule be to define a dedicated function like 
ath11k_init_wmi_config_wcn6750() so wcn6750 doesn't use the same 
function as QCA6390 and WCN6855, and everything changed in this patch 
will not affect wcn6750.
Carl Huang May 10, 2024, 12:03 p.m. UTC | #6
On 2024/5/10 18:18, Kalle Valo wrote:
> "Luca Weiss" <luca.weiss@fairphone.com> writes:
> 
>> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>>> Add hardware parameter support_dual_stations to indicate
>>> whether 2 station interfaces are supported. For chips which
>>> support this feature, limit total number of AP interface and
>>> mesh point to 1. The max interfaces are 3 for such chips.
>>>
>>> The chips affected are:
>>>   QCA6390 hw2.0
>>>   WCN6855 hw2.0
>>>   WCN6855 hw2.1
>>> Other chips are not affected.
>>>
>>> For affected chips, remove radar_detect_widths because now
>>> num_different_channels is set to 2. radar_detect_widths can
>>> be set only when num_different_channels is 1. See mac80211
>>> function wiphy_verify_combinations for details.
>>>
>>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>>
>> Hi Carl,
>>
>> Unfortunately this commit breaks wifi on a QCM6490 smartphone
>> (qcm6490-fairphone-fp5) and makes the board crash.
>>
>> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
>> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
>> provide address list if chip supports 2 stations")) makes wifi work
>> again.
> 
> Thanks for the report. So the broken commit is:
> 
> f019f4dff2e4 wifi: ath11k: support 2 station interfaces
> 
> This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
> fully broken in v6.9? Not good. And most likely Linus will release v6.9
> on Sunday so it's too late to get a fix included in the final release.
> 
> Carl, can you fix this ASAP? Or should we just revert the broken
> commits?
> 
> Adding this to our regression tracking:
> 
> #regzbot introduced: f019f4dff2e4 ^
> #regzbot title: ath11k: WCN6750 firmware crashes during initialisation
> 
Kalle, looks we're not able to fix it before Sunday as I don't have 
WCN6750 setup to verify the fix. The fix could be to define a dedicated 
function ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the 
patch out so others like Luca can have a try.
Luca Weiss May 10, 2024, 12:58 p.m. UTC | #7
On Fri May 10, 2024 at 1:35 PM CEST, Carl Huang wrote:
>
>
> On 2024/5/10 16:22, Luca Weiss wrote:
> > On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
> >> Add hardware parameter support_dual_stations to indicate
> >> whether 2 station interfaces are supported. For chips which
> >> support this feature, limit total number of AP interface and
> >> mesh point to 1. The max interfaces are 3 for such chips.
> >>
> >> The chips affected are:
> >>   QCA6390 hw2.0
> >>   WCN6855 hw2.0
> >>   WCN6855 hw2.1
> >> Other chips are not affected.
> >>
> >> For affected chips, remove radar_detect_widths because now
> >> num_different_channels is set to 2. radar_detect_widths can
> >> be set only when num_different_channels is 1. See mac80211
> >> function wiphy_verify_combinations for details.
> >>
> >> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
> > 
> > Hi Carl,
> > 
> > Unfortunately this commit breaks wifi on a QCM6490 smartphone
> > (qcm6490-fairphone-fp5) and makes the board crash.
> > 
> > Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
> > ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
> > provide address list if chip supports 2 stations")) makes wifi work
> > again.
> > 
> > Here's the crash log:
> > 
> > [   43.458118] ath11k 17a10040.wifi: Adding to iommu group 11
> > [   43.459075] ath11k 17a10040.wifi: wcn6750 hw1.0
> > [   43.461219] remoteproc remoteproc2: powering up 8a00000.remoteproc
> > [   43.490363] remoteproc remoteproc2: Booting fw image qcom/qcm6490/fairphone5/wpss.mbn, size 7435056
> > [   43.614039] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
> > [   43.746227] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
> > [   43.746262] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
> > [   53.116443] qcom_q6v5_pas 8a00000.remoteproc: fatal error received: cmnos_thread.c:4645:Asserted in cmnos_allocram.c:cmnos_allocram_base_with_alignment_recurse:497 with Args:0x3,0x3,0x0
> > [   53.116503] remoteproc remoteproc2: crash detected in 8a00000.remoteproc: type fatal error
> > [   53.116734] remoteproc remoteproc2: handling crash #1 in 8a00000.remoteproc
> > [   53.116749] remoteproc remoteproc2: recovering 8a00000.remoteproc
> > [   53.125088] ath11k 17a10040.wifi: failed to send WMI_PDEV_SET_PARAM cmd
> > [   53.125116] ath11k 17a10040.wifi: failed to enable PMF QOS: (-108
> > [   53.125167] remoteproc remoteproc2: stopped remote processor 8a00000.remoteproc
> > [   53.127827] ath11k 17a10040.wifi: failed to send WMI_PDEV_SET_PARAM cmd
> > [   53.127848] ath11k 17a10040.wifi: failed to enable PMF QOS: (-108
> > [   53.258990] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
> > [   53.390288] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
> > [   53.390319] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
> > [   53.404765] ath11k 17a10040.wifi: Last interrupt received for each CE:
> > [   53.404789] ath11k 17a10040.wifi: CE_id 0 pipe_num 0 580ms before
> > [   53.404804] ath11k 17a10040.wifi: CE_id 1 pipe_num 1 476ms before
> > [   53.404818] ath11k 17a10040.wifi: CE_id 2 pipe_num 2 476ms before
> > [   53.404831] ath11k 17a10040.wifi: CE_id 3 pipe_num 3 580ms before
> > [   53.404844] ath11k 17a10040.wifi: CE_id 5 pipe_num 5 4294720700ms before
> > [   53.404858] ath11k 17a10040.wifi: CE_id 7 pipe_num 7 4294720700ms before
> > [   53.404871] ath11k 17a10040.wifi: CE_id 8 pipe_num 8 4294720700ms before
> > [   53.404883] ath11k 17a10040.wifi:
> >                 Last interrupt received for each group:
> > [   53.404894] ath11k 17a10040.wifi: group_id 0 4294720700ms before
> > [   53.404907] ath11k 17a10040.wifi: group_id 1 4294720700ms before
> > [   53.404918] ath11k 17a10040.wifi: group_id 2 4294720700ms before
> > [   53.404929] ath11k 17a10040.wifi: group_id 3 4294720700ms before
> > [   53.404940] ath11k 17a10040.wifi: group_id 4 4294720700ms before
> > [   53.404952] ath11k 17a10040.wifi: group_id 5 4294720700ms before
> > [   53.404964] ath11k 17a10040.wifi: group_id 6 4294720700ms before
> > [   53.404976] ath11k 17a10040.wifi: group_id 7 4294720700ms before
> > [   53.404987] ath11k 17a10040.wifi: group_id 8 4294720700ms before
> > [   53.404998] ath11k 17a10040.wifi: group_id 9 4294720700ms before
> > [   53.405009] ath11k 17a10040.wifi: group_id 10 4294720700ms before
> > [   53.405021] ath11k 17a10040.wifi: dst srng id 0 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405037] ath11k 17a10040.wifi: dst srng id 1 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405052] ath11k 17a10040.wifi: dst srng id 2 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405066] ath11k 17a10040.wifi: dst srng id 3 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405082] ath11k 17a10040.wifi: dst srng id 4 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405097] ath11k 17a10040.wifi: src srng id 5 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405114] ath11k 17a10040.wifi: src srng id 8 hp 0, reap_hp 2550, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405130] ath11k 17a10040.wifi: dst srng id 9 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405145] ath11k 17a10040.wifi: src srng id 16 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405162] ath11k 17a10040.wifi: src srng id 17 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405179] ath11k 17a10040.wifi: src srng id 18 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405196] ath11k 17a10040.wifi: src srng id 24 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405213] ath11k 17a10040.wifi: dst srng id 25 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405228] ath11k 17a10040.wifi: src srng id 32 hp 12, reap_hp 8, cur tp 12, cached tp 12 last tp 8 napi processed before 580ms
> > [   53.405244] ath11k 17a10040.wifi: src srng id 35 hp 4, reap_hp 0, cur tp 4, cached tp 4 last tp 0 napi processed before 580ms
> > [   53.405260] ath11k 17a10040.wifi: src srng id 36 hp 20, reap_hp 0, cur tp 20, cached tp 12 last tp 12 napi processed before 460ms
> > [   53.405276] ath11k 17a10040.wifi: src srng id 39 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405294] ath11k 17a10040.wifi: src srng id 57 hp 1022, reap_hp 1022, cur tp 2, cached tp 2 last tp 2 napi processed before 476ms
> > [   53.405310] ath11k 17a10040.wifi: src srng id 58 hp 18, reap_hp 18, cur tp 22, cached tp 22 last tp 22 napi processed before 476ms
> > [   53.405327] ath11k 17a10040.wifi: src srng id 61 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 584ms
> > [   53.405345] ath11k 17a10040.wifi: dst srng id 81 tp 4, cur hp 4, cached hp 4 last hp 4 napi processed before 476ms
> > [   53.405361] ath11k 17a10040.wifi: dst srng id 82 tp 44, cur hp 44, cached hp 44 last hp 44 napi processed before 476ms
> > [   53.405378] ath11k 17a10040.wifi: dst srng id 85 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405394] ath11k 17a10040.wifi: src srng id 104 hp 65532, reap_hp 65532, cur tp 0, cached tp 0 last tp 0 napi processed before 588ms
> > [   53.405411] ath11k 17a10040.wifi: src srng id 105 hp 0, reap_hp 504, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405427] ath11k 17a10040.wifi: dst srng id 106 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405443] ath11k 17a10040.wifi: dst srng id 108 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405458] ath11k 17a10040.wifi: dst srng id 109 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405474] ath11k 17a10040.wifi: dst srng id 110 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.405491] ath11k 17a10040.wifi: src srng id 128 hp 8190, reap_hp 8190, cur tp 0, cached tp 0 last tp 0 napi processed before 464ms
> > [   53.405507] ath11k 17a10040.wifi: src srng id 129 hp 0, reap_hp 2046, cur tp 0, cached tp 0 last tp 0 napi processed before 4294720700ms
> > [   53.405525] ath11k 17a10040.wifi: src srng id 132 hp 2046, reap_hp 2046, cur tp 0, cached tp 0 last tp 0 napi processed before 460ms
> > [   53.405542] ath11k 17a10040.wifi: dst srng id 133 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294720700ms
> > [   53.747641] qcom_q6v5_pas 8a00000.remoteproc: fatal error received: platform_msl.c:513:PCIE ACMT error debug0 0x6030, debug1 0x101
> > [   53.747677] remoteproc remoteproc2: crash detected in 8a00000.remoteproc: type fatal error
> > [   53.747864] remoteproc remoteproc2: handling crash #2 in 8a00000.remoteproc
> > [   53.747875] remoteproc remoteproc2: recovering 8a00000.remoteproc
> > [   53.758632] remoteproc remoteproc2: stopped remote processor 8a00000.remoteproc
> > [   53.886889] remoteproc remoteproc2: remote processor 8a00000.remoteproc is now up
> > [   54.017475] ath11k 17a10040.wifi: chip_id 0x1 chip_family 0xb board_id 0xff soc_id 0xffffffff
> > [   54.017505] ath11k 17a10040.wifi: fw_version 0x1011855b fw_build_timestamp 2023-09-03 07:43 fw_build_id WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1
> > [   54.027605] ath11k 17a10040.wifi: Last interrupt received for each CE:
> > [   54.027627] ath11k 17a10040.wifi: CE_id 0 pipe_num 0 1204ms before
> > [   54.027642] ath11k 17a10040.wifi: CE_id 1 pipe_num 1 1100ms before
> > [   54.027655] ath11k 17a10040.wifi: CE_id 2 pipe_num 2 1100ms before
> > [   54.027667] ath11k 17a10040.wifi: CE_id 3 pipe_num 3 1204ms before
> > [   54.027680] ath11k 17a10040.wifi: CE_id 5 pipe_num 5 4294721324ms before
> > [   54.027692] ath11k 17a10040.wifi: CE_id 7 pipe_num 7 4294721324ms before
> > [   54.027704] ath11k 17a10040.wifi: CE_id 8 pipe_num 8 4294721324ms before
> > [   54.027716] ath11k 17a10040.wifi:
> >                 Last interrupt received for each group:
> > [   54.027726] ath11k 17a10040.wifi: group_id 0 4294721324ms before
> > [   54.027738] ath11k 17a10040.wifi: group_id 1 4294721324ms before
> > [   54.027749] ath11k 17a10040.wifi: group_id 2 4294721324ms before
> > [   54.027760] ath11k 17a10040.wifi: group_id 3 4294721324ms before
> > [   54.027771] ath11k 17a10040.wifi: group_id 4 4294721324ms before
> > [   54.027782] ath11k 17a10040.wifi: group_id 5 4294721324ms before
> > [   54.027794] ath11k 17a10040.wifi: group_id 6 4294721324ms before
> > [   54.027805] ath11k 17a10040.wifi: group_id 7 4294721324ms before
> > [   54.027816] ath11k 17a10040.wifi: group_id 8 4294721324ms before
> > [   54.027827] ath11k 17a10040.wifi: group_id 9 4294721324ms before
> > [   54.027838] ath11k 17a10040.wifi: group_id 10 4294721324ms before
> > [   54.027850] ath11k 17a10040.wifi: dst srng id 4 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.027866] ath11k 17a10040.wifi: src srng id 5 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.027882] ath11k 17a10040.wifi: src srng id 8 hp 0, reap_hp 2550, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.027898] ath11k 17a10040.wifi: dst srng id 9 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.027914] ath11k 17a10040.wifi: src srng id 16 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.027930] ath11k 17a10040.wifi: src srng id 17 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.027947] ath11k 17a10040.wifi: src srng id 18 hp 0, reap_hp 16376, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.027964] ath11k 17a10040.wifi: src srng id 24 hp 0, reap_hp 248, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.027980] ath11k 17a10040.wifi: dst srng id 25 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.027997] ath11k 17a10040.wifi: src srng id 32 hp 0, reap_hp 60, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.028014] ath11k 17a10040.wifi: src srng id 35 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.028030] ath11k 17a10040.wifi: src srng id 36 hp 0, reap_hp 8188, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.028045] ath11k 17a10040.wifi: src srng id 39 hp 0, reap_hp 124, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.028063] ath11k 17a10040.wifi: src srng id 57 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 440ms
> > [   54.028079] ath11k 17a10040.wifi: src srng id 58 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 436ms
> > [   54.028095] ath11k 17a10040.wifi: src srng id 61 hp 1020, reap_hp 1020, cur tp 0, cached tp 0 last tp 0 napi processed before 436ms
> > [   54.028112] ath11k 17a10040.wifi: dst srng id 81 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.028128] ath11k 17a10040.wifi: dst srng id 82 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.028143] ath11k 17a10040.wifi: dst srng id 85 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.028160] ath11k 17a10040.wifi: src srng id 104 hp 65532, reap_hp 65532, cur tp 0, cached tp 0 last tp 0 napi processed before 448ms
> > [   54.028177] ath11k 17a10040.wifi: src srng id 105 hp 0, reap_hp 504, cur tp 0, cached tp 0 last tp 0 napi processed before 4294721324ms
> > [   54.028194] ath11k 17a10040.wifi: dst srng id 106 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.028210] ath11k 17a10040.wifi: dst srng id 108 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.028226] ath11k 17a10040.wifi: dst srng id 109 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.028242] ath11k 17a10040.wifi: dst srng id 110 tp 0, cur hp 0, cached hp 0 last hp 0 napi processed before 4294721324ms
> > [   54.622819] ath11k 17a10040.wifi: failed to receive control response completion, polling..
> > [   55.646232] ath11k 17a10040.wifi: ctl_resp never came in (-110)
> > [   55.646259] ath11k 17a10040.wifi: failed to connect to HTC: -110
> > [   55.653201] ath11k 17a10040.wifi: failed to start core: -110
> > 
> > 
> > Let me know if you need any more information.
> > 
> > Regards
> > Luca
> > 
> >>
> >> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
> >> ---
> >>   drivers/net/wireless/ath/ath11k/core.c | 14 ++++--
> >>   drivers/net/wireless/ath/ath11k/hw.c   |  2 +-
> >>   drivers/net/wireless/ath/ath11k/hw.h   |  1 +
> >>   drivers/net/wireless/ath/ath11k/mac.c  | 62 +++++++++++++++++---------
> >>   4 files changed, 53 insertions(+), 26 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
> >> index bebfd342e28b..739a8d13d57d 100644
> >> --- a/drivers/net/wireless/ath/ath11k/core.c
> >> +++ b/drivers/net/wireless/ath/ath11k/core.c
> >> @@ -120,6 +120,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tcl_ring_retry = true,
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >> +		.support_dual_stations = false,
> >>   	},
> >>   	{
> >>   		.hw_rev = ATH11K_HW_IPQ6018_HW10,
> >> @@ -202,6 +203,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >>   		.support_fw_mac_sequence = false,
> >> +		.support_dual_stations = false,
> >>   	},
> >>   	{
> >>   		.name = "qca6390 hw2.0",
> >> @@ -251,7 +253,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.cold_boot_calib = false,
> >>   		.cbcal_restart_fw = false,
> >>   		.fw_mem_mode = 0,
> >> -		.num_vdevs = 16 + 1,
> >> +		.num_vdevs = 2 + 1,
> >>   		.num_peers = 512,
> >>   		.supports_suspend = true,
> >>   		.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
> >> @@ -286,6 +288,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >>   		.support_fw_mac_sequence = true,
> >> +		.support_dual_stations = true,
> >>   	},
> >>   	{
> >>   		.name = "qcn9074 hw1.0",
> >> @@ -367,6 +370,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >>   		.support_fw_mac_sequence = false,
> >> +		.support_dual_stations = false,
> >>   	},
> >>   	{
> >>   		.name = "wcn6855 hw2.0",
> >> @@ -416,7 +420,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.cold_boot_calib = false,
> >>   		.cbcal_restart_fw = false,
> >>   		.fw_mem_mode = 0,
> >> -		.num_vdevs = 16 + 1,
> >> +		.num_vdevs = 2 + 1,
> >>   		.num_peers = 512,
> >>   		.supports_suspend = true,
> >>   		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
> >> @@ -451,6 +455,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >>   		.support_fw_mac_sequence = true,
> >> +		.support_dual_stations = true,
> >>   	},
> >>   	{
> >>   		.name = "wcn6855 hw2.1",
> >> @@ -498,7 +503,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.cold_boot_calib = false,
> >>   		.cbcal_restart_fw = false,
> >>   		.fw_mem_mode = 0,
> >> -		.num_vdevs = 16 + 1,
> >> +		.num_vdevs = 2 + 1,
> >>   		.num_peers = 512,
> >>   		.supports_suspend = true,
> >>   		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
> >> @@ -533,6 +538,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >>   		.support_fw_mac_sequence = true,
> >> +		.support_dual_stations = true,
> >>   	},
> >>   	{
> >>   		.name = "wcn6750 hw1.0",
> >> @@ -613,6 +619,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
> >>   		.smp2p_wow_exit = true,
> >>   		.support_fw_mac_sequence = true,
> >> +		.support_dual_stations = false,
> >>   	},
> >>   	{
> >>   		.hw_rev = ATH11K_HW_IPQ5018_HW10,
> >> @@ -693,6 +700,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
> >>   		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
> >>   		.smp2p_wow_exit = false,
> >>   		.support_fw_mac_sequence = false,
> >> +		.support_dual_stations = false,
> >>   	},
> >>   };
> >>   
> >> diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
> >> index d7b5ec6e6904..3b56ba1b8534 100644
> >> --- a/drivers/net/wireless/ath/ath11k/hw.c
> >> +++ b/drivers/net/wireless/ath/ath11k/hw.c
> >> @@ -58,7 +58,7 @@ static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
> >>   static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
> >>   					   struct target_resource_config *config)
> >>   {
> >> -	config->num_vdevs = 4;
> >> +	config->num_vdevs = ab->hw_params.num_vdevs;
>
> Hi Luca, I guess above line caused WCN6750 crash.
> For a quick try, you can change it back to "config->num_vdevs = 4".
>
> A more reasonable fix coule be to define a dedicated function like 
> ath11k_init_wmi_config_wcn6750() so wcn6750 doesn't use the same 
> function as QCA6390 and WCN6855, and everything changed in this patch 
> will not affect wcn6750.

Hi Carl,

Thanks for the quick response!

It seems you're right, applying the following patch without the reverts
on 6.9-rc6 doesn't make the phone crash anymore and wifi seems to work
fine, thanks!

diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
index caa6dc12a790..77d8f9237680 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -58,7 +58,7 @@ static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
 static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
 					   struct target_resource_config *config)
 {
-	config->num_vdevs = ab->hw_params.num_vdevs;
+	config->num_vdevs = 4;
 	config->num_peers = 16;
 	config->num_tids = 32;
Carl Huang May 10, 2024, 1:04 p.m. UTC | #8
On 2024/5/10 20:03, Carl Huang wrote:
> 
> 
> On 2024/5/10 18:18, Kalle Valo wrote:
>> "Luca Weiss" <luca.weiss@fairphone.com> writes:
>>
>>> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>>>> Add hardware parameter support_dual_stations to indicate
>>>> whether 2 station interfaces are supported. For chips which
>>>> support this feature, limit total number of AP interface and
>>>> mesh point to 1. The max interfaces are 3 for such chips.
>>>>
>>>> The chips affected are:
>>>>   QCA6390 hw2.0
>>>>   WCN6855 hw2.0
>>>>   WCN6855 hw2.1
>>>> Other chips are not affected.
>>>>
>>>> For affected chips, remove radar_detect_widths because now
>>>> num_different_channels is set to 2. radar_detect_widths can
>>>> be set only when num_different_channels is 1. See mac80211
>>>> function wiphy_verify_combinations for details.
>>>>
>>>> Tested-on: WCN6855 hw2.0 PCI 
>>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>>>
>>> Hi Carl,
>>>
>>> Unfortunately this commit breaks wifi on a QCM6490 smartphone
>>> (qcm6490-fairphone-fp5) and makes the board crash.
>>>
>>> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
>>> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
>>> provide address list if chip supports 2 stations")) makes wifi work
>>> again.
>>
>> Thanks for the report. So the broken commit is:
>>
>> f019f4dff2e4 wifi: ath11k: support 2 station interfaces
>>
>> This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
>> fully broken in v6.9? Not good. And most likely Linus will release v6.9
>> on Sunday so it's too late to get a fix included in the final release.
>>
>> Carl, can you fix this ASAP? Or should we just revert the broken
>> commits?
>>
>> Adding this to our regression tracking:
>>
>> #regzbot introduced: f019f4dff2e4 ^
>> #regzbot title: ath11k: WCN6750 firmware crashes during initialisation
>>
> Kalle, looks we're not able to fix it before Sunday as I don't have 
> WCN6750 setup to verify the fix. The fix could be to define a dedicated 
> function ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the 
> patch out so others like Luca can have a try.
> 
Sorry, I have problem to run "git send-email" as it prompts "5.7.60 
SMTP; Client does not have permissions to send as this sender".

The patch looks like:

 From 19bb7f1377a5e3c5d42ab2bedbaf9e976c1068b4 Mon Sep 17 00:00:00 2001
From: Carl Huang <quic_cjhuang@quicinc.com>
Date: Fri, 10 May 2024 19:40:37 +0800
Subject: [PATCH] wifi:ath11k: fix WCN6750 firmware crash

WCN6750 firmware crashed because of vdev_number changed to 3 from 4
in commit f019f4dff2e4("wifi: ath11k: support 2 station interfaces").

Fix it by defining a separate function ath11k_init_wmi_config_wcn6750()
for WCN6750 to initialize its' specific parameters.

Fixes: f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces")
Tested-on: WCN6855 hw2.0 PCI 
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
  drivers/net/wireless/ath/ath11k/hw.c | 49 +++++++++++++++++++++++++++-
  1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/hw.c 
b/drivers/net/wireless/ath/ath11k/hw.c
index caa6dc12a790..df8822ac3be1 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -102,6 +102,53 @@ static void ath11k_init_wmi_config_qca6390(struct 
ath11k_base *ab,
  	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
  }

+static void ath11k_init_wmi_config_wcn6750(struct ath11k_base *ab,
+					   struct target_resource_config *config)
+{
+	config->num_vdevs = 4;
+	config->num_peers = 16;
+	config->num_tids = 32;
+
+	config->num_offload_peers = 3;
+	config->num_offload_reorder_buffs = 3;
+	config->num_peer_keys = TARGET_NUM_PEER_KEYS;
+	config->ast_skid_limit = TARGET_AST_SKID_LIMIT;
+	config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
+	config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
+	config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI;
+	config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
+	config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
+	config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
+	config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
+	config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
+	config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
+	config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
+	config->roam_offload_max_ap_profiles = 
TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES;
+	config->num_mcast_groups = 0;
+	config->num_mcast_table_elems = 0;
+	config->mcast2ucast_mode = 0;
+	config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE;
+	config->num_wds_entries = 0;
+	config->dma_burst_size = 0;
+	config->rx_skip_defrag_timeout_dup_detection_check = 0;
+	config->vow_config = TARGET_VOW_CONFIG;
+	config->gtk_offload_max_vdev = 2;
+	config->num_msdu_desc = 0x400;
+	config->beacon_tx_offload_max_vdev = 2;
+	config->rx_batchmode = TARGET_RX_BATCHMODE;
+
+	config->peer_map_unmap_v2_support = 0;
+	config->use_pdev_id = 1;
+	config->max_frag_entries = 0xa;
+	config->num_tdls_vdevs = 0x1;
+	config->num_tdls_conn_table_entries = 8;
+	config->beacon_tx_offload_max_vdev = 0x2;
+	config->num_multicast_filter_entries = 0x20;
+	config->num_wow_filters = 0x16;
+	config->num_keep_alive_pattern = 0;
+	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
+}
+
  static void ath11k_hw_ipq8074_reo_setup(struct ath11k_base *ab)
  {
  	u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG;
@@ -1102,7 +1149,7 @@ const struct ath11k_hw_ops wcn6855_ops = {

  const struct ath11k_hw_ops wcn6750_ops = {
  	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
-	.wmi_init_config = ath11k_init_wmi_config_qca6390,
+	.wmi_init_config = ath11k_init_wmi_config_wcn6750,
  	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390,
  	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390,
  	.tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable,
Luca Weiss May 10, 2024, 1:26 p.m. UTC | #9
On Fri May 10, 2024 at 3:04 PM CEST, Carl Huang wrote:

<snip>

> > Kalle, looks we're not able to fix it before Sunday as I don't have 
> > WCN6750 setup to verify the fix. The fix could be to define a dedicated 
> > function ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the 
> > patch out so others like Luca can have a try.
> > 
> Sorry, I have problem to run "git send-email" as it prompts "5.7.60 
> SMTP; Client does not have permissions to send as this sender".
>
> The patch looks like:
>
>  From 19bb7f1377a5e3c5d42ab2bedbaf9e976c1068b4 Mon Sep 17 00:00:00 2001
> From: Carl Huang <quic_cjhuang@quicinc.com>
> Date: Fri, 10 May 2024 19:40:37 +0800
> Subject: [PATCH] wifi:ath11k: fix WCN6750 firmware crash
>
> WCN6750 firmware crashed because of vdev_number changed to 3 from 4
> in commit f019f4dff2e4("wifi: ath11k: support 2 station interfaces").
>
> Fix it by defining a separate function ath11k_init_wmi_config_wcn6750()
> for WCN6750 to initialize its' specific parameters.
>
> Fixes: f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces")
> Tested-on: WCN6855 hw2.0 PCI 
> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>
> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>

This seems to work fine also.

Tested-on: wcn6750 hw1.0 AHB WLAN.MSL.1.0.1-01371-QCAMSLSWPLZ-1

Regards
Luca

> ---
>   drivers/net/wireless/ath/ath11k/hw.c | 49 +++++++++++++++++++++++++++-
>   1 file changed, 48 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/hw.c 
> b/drivers/net/wireless/ath/ath11k/hw.c
> index caa6dc12a790..df8822ac3be1 100644
> --- a/drivers/net/wireless/ath/ath11k/hw.c
> +++ b/drivers/net/wireless/ath/ath11k/hw.c
> @@ -102,6 +102,53 @@ static void ath11k_init_wmi_config_qca6390(struct 
> ath11k_base *ab,
>   	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
>   }
>
> +static void ath11k_init_wmi_config_wcn6750(struct ath11k_base *ab,
> +					   struct target_resource_config *config)
> +{
> +	config->num_vdevs = 4;
> +	config->num_peers = 16;
> +	config->num_tids = 32;
> +
> +	config->num_offload_peers = 3;
> +	config->num_offload_reorder_buffs = 3;
> +	config->num_peer_keys = TARGET_NUM_PEER_KEYS;
> +	config->ast_skid_limit = TARGET_AST_SKID_LIMIT;
> +	config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
> +	config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
> +	config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI;
> +	config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
> +	config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
> +	config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
> +	config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
> +	config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
> +	config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
> +	config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
> +	config->roam_offload_max_ap_profiles = 
> TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES;
> +	config->num_mcast_groups = 0;
> +	config->num_mcast_table_elems = 0;
> +	config->mcast2ucast_mode = 0;
> +	config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE;
> +	config->num_wds_entries = 0;
> +	config->dma_burst_size = 0;
> +	config->rx_skip_defrag_timeout_dup_detection_check = 0;
> +	config->vow_config = TARGET_VOW_CONFIG;
> +	config->gtk_offload_max_vdev = 2;
> +	config->num_msdu_desc = 0x400;
> +	config->beacon_tx_offload_max_vdev = 2;
> +	config->rx_batchmode = TARGET_RX_BATCHMODE;
> +
> +	config->peer_map_unmap_v2_support = 0;
> +	config->use_pdev_id = 1;
> +	config->max_frag_entries = 0xa;
> +	config->num_tdls_vdevs = 0x1;
> +	config->num_tdls_conn_table_entries = 8;
> +	config->beacon_tx_offload_max_vdev = 0x2;
> +	config->num_multicast_filter_entries = 0x20;
> +	config->num_wow_filters = 0x16;
> +	config->num_keep_alive_pattern = 0;
> +	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
> +}
> +
>   static void ath11k_hw_ipq8074_reo_setup(struct ath11k_base *ab)
>   {
>   	u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG;
> @@ -1102,7 +1149,7 @@ const struct ath11k_hw_ops wcn6855_ops = {
>
>   const struct ath11k_hw_ops wcn6750_ops = {
>   	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
> -	.wmi_init_config = ath11k_init_wmi_config_qca6390,
> +	.wmi_init_config = ath11k_init_wmi_config_wcn6750,
>   	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390,
>   	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390,
>   	.tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable,
Kalle Valo May 10, 2024, 1:57 p.m. UTC | #10
Carl Huang <quic_cjhuang@quicinc.com> writes:

> On 2024/5/10 18:18, Kalle Valo wrote:
>> "Luca Weiss" <luca.weiss@fairphone.com> writes:
>> 
>>> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>>>> Add hardware parameter support_dual_stations to indicate
>>>> whether 2 station interfaces are supported. For chips which
>>>> support this feature, limit total number of AP interface and
>>>> mesh point to 1. The max interfaces are 3 for such chips.
>>>>
>>>> The chips affected are:
>>>>   QCA6390 hw2.0
>>>>   WCN6855 hw2.0
>>>>   WCN6855 hw2.1
>>>> Other chips are not affected.
>>>>
>>>> For affected chips, remove radar_detect_widths because now
>>>> num_different_channels is set to 2. radar_detect_widths can
>>>> be set only when num_different_channels is 1. See mac80211
>>>> function wiphy_verify_combinations for details.
>>>>
>>>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>>>
>>> Hi Carl,
>>>
>>> Unfortunately this commit breaks wifi on a QCM6490 smartphone
>>> (qcm6490-fairphone-fp5) and makes the board crash.
>>>
>>> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
>>> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
>>> provide address list if chip supports 2 stations")) makes wifi work
>>> again.
>> Thanks for the report. So the broken commit is:
>> f019f4dff2e4 wifi: ath11k: support 2 station interfaces
>> This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
>> fully broken in v6.9? Not good. And most likely Linus will release v6.9
>> on Sunday so it's too late to get a fix included in the final release.
>> Carl, can you fix this ASAP? Or should we just revert the broken
>> commits?
>> Adding this to our regression tracking:
>> #regzbot introduced: f019f4dff2e4 ^
>> #regzbot title: ath11k: WCN6750 firmware crashes during initialisation
>
> Kalle, looks we're not able to fix it before Sunday as I don't have
> WCN6750 setup to verify the fix.

We are so late in the cycle that we would have to send the fix directly
to Linus and ask him to apply the fix before he tags the release. I
prefer that we are on the safe side here and send the fix to v6.10-rc1
via the usual route (the wireless tree). We get more testing time that
way.

> The fix could be to define a dedicated function
> ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the patch out
> so others like Luca can have a try.

Thanks for the quick patches!
Carl Huang May 11, 2024, 2:50 a.m. UTC | #11
On 2024/5/10 21:26, Luca Weiss wrote:
> On Fri May 10, 2024 at 3:04 PM CEST, Carl Huang wrote:
> 
> <snip>
> 
>>> Kalle, looks we're not able to fix it before Sunday as I don't have
>>> WCN6750 setup to verify the fix. The fix could be to define a dedicated
>>> function ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the
>>> patch out so others like Luca can have a try.
>>>
>> Sorry, I have problem to run "git send-email" as it prompts "5.7.60
>> SMTP; Client does not have permissions to send as this sender".
>>
>> The patch looks like:
>>
>>   From 19bb7f1377a5e3c5d42ab2bedbaf9e976c1068b4 Mon Sep 17 00:00:00 2001
>> From: Carl Huang <quic_cjhuang@quicinc.com>
>> Date: Fri, 10 May 2024 19:40:37 +0800
>> Subject: [PATCH] wifi:ath11k: fix WCN6750 firmware crash
>>
>> WCN6750 firmware crashed because of vdev_number changed to 3 from 4
>> in commit f019f4dff2e4("wifi: ath11k: support 2 station interfaces").
>>
>> Fix it by defining a separate function ath11k_init_wmi_config_wcn6750()
>> for WCN6750 to initialize its' specific parameters.
>>
>> Fixes: f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces")
>> Tested-on: WCN6855 hw2.0 PCI
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>>
>> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
> 
> This seems to work fine also.
> 
Thank you Luca for the test.
Carl Huang May 11, 2024, 3:12 a.m. UTC | #12
On 2024/5/10 21:57, Kalle Valo wrote:
> Carl Huang <quic_cjhuang@quicinc.com> writes:
> 
>> On 2024/5/10 18:18, Kalle Valo wrote:
>>> "Luca Weiss" <luca.weiss@fairphone.com> writes:
>>>
>>>> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>>>>> Add hardware parameter support_dual_stations to indicate
>>>>> whether 2 station interfaces are supported. For chips which
>>>>> support this feature, limit total number of AP interface and
>>>>> mesh point to 1. The max interfaces are 3 for such chips.
>>>>>
>>>>> The chips affected are:
>>>>>    QCA6390 hw2.0
>>>>>    WCN6855 hw2.0
>>>>>    WCN6855 hw2.1
>>>>> Other chips are not affected.
>>>>>
>>>>> For affected chips, remove radar_detect_widths because now
>>>>> num_different_channels is set to 2. radar_detect_widths can
>>>>> be set only when num_different_channels is 1. See mac80211
>>>>> function wiphy_verify_combinations for details.
>>>>>
>>>>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>>>>
>>>> Hi Carl,
>>>>
>>>> Unfortunately this commit breaks wifi on a QCM6490 smartphone
>>>> (qcm6490-fairphone-fp5) and makes the board crash.
>>>>
>>>> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
>>>> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
>>>> provide address list if chip supports 2 stations")) makes wifi work
>>>> again.
>>> Thanks for the report. So the broken commit is:
>>> f019f4dff2e4 wifi: ath11k: support 2 station interfaces
>>> This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
>>> fully broken in v6.9? Not good. And most likely Linus will release v6.9
>>> on Sunday so it's too late to get a fix included in the final release.
>>> Carl, can you fix this ASAP? Or should we just revert the broken
>>> commits?
>>> Adding this to our regression tracking:
>>> #regzbot introduced: f019f4dff2e4 ^
>>> #regzbot title: ath11k: WCN6750 firmware crashes during initialisation
>>
>> Kalle, looks we're not able to fix it before Sunday as I don't have
>> WCN6750 setup to verify the fix.
> 
> We are so late in the cycle that we would have to send the fix directly
> to Linus and ask him to apply the fix before he tags the release. I
> prefer that we are on the safe side here and send the fix to v6.10-rc1
> via the usual route (the wireless tree). We get more testing time that
> way.
> 
No problem, Kalle.

I think more tags are needed like Tested-on WCN6750 and Tested-by Luca.

I'll send out the formal patch next week.

>> The fix could be to define a dedicated function
>> ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the patch out
>> so others like Luca can have a try.
> 
> Thanks for the quick patches!
>
Linux regression tracking (Thorsten Leemhuis) May 16, 2024, 11:45 a.m. UTC | #13
On 11.05.24 05:12, Carl Huang wrote:
> On 2024/5/10 21:57, Kalle Valo wrote:
>> Carl Huang <quic_cjhuang@quicinc.com> writes:
>>> On 2024/5/10 18:18, Kalle Valo wrote:
>>>> "Luca Weiss" <luca.weiss@fairphone.com> writes:
>>>>> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>>>>>> Add hardware parameter support_dual_stations to indicate
>>>>>> whether 2 station interfaces are supported. For chips which
>>>>>> support this feature, limit total number of AP interface and
>>>>>> mesh point to 1. The max interfaces are 3 for such chips.
>>>>>> [...]
>>>>> Unfortunately this commit breaks wifi on a QCM6490 smartphone
>>>>> (qcm6490-fairphone-fp5) and makes the board crash.
>>>>>
>>>>> Reverting this commit (plus for conflict resolution 5dc9d1a55e95
>>>>> ("wifi:
>>>>> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
>>>>> provide address list if chip supports 2 stations")) makes wifi work
>>>>> again.
>>>> Thanks for the report. So the broken commit is:
>>>> f019f4dff2e4 wifi: ath11k: support 2 station interfaces
>>>> This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
>>>> fully broken in v6.9? Not good. And most likely Linus will release v6.9
>>>> on Sunday so it's too late to get a fix included in the final release.
>>>> Carl, can you fix this ASAP? Or should we just revert the broken
>>>> commits?
>>> Kalle, looks we're not able to fix it before Sunday as I don't have
>>> WCN6750 setup to verify the fix.
>> We are so late in the cycle that we would have to send the fix directly
>> to Linus and ask him to apply the fix before he tags the release. I
>> prefer that we are on the safe side here and send the fix to v6.10-rc1
>> via the usual route (the wireless tree). We get more testing time that
>> way.
>>
> No problem, Kalle.
> 
> I think more tags are needed like Tested-on WCN6750 and Tested-by Luca.
> 
> I'll send out the formal patch next week.

Hmmm, from here it looks like this did not happen. Did I miss something,
is there some reason to reevaluate things again, or did this maybe
simply fall through the cracks?

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

#regzbot poke

>>> The fix could be to define a dedicated function
>>> ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the patch out
>>> so others like Luca can have a try.
>>
>> Thanks for the quick patches!
>>
> 
>
Jeff Johnson May 16, 2024, 2:11 p.m. UTC | #14
On 5/16/2024 4:45 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
> On 11.05.24 05:12, Carl Huang wrote:
>> I'll send out the formal patch next week.
> 
> Hmmm, from here it looks like this did not happen. Did I miss something,
> is there some reason to reevaluate things again, or did this maybe
> simply fall through the cracks?

Formal patch is still under internal review
Kalle Valo May 17, 2024, 5:25 a.m. UTC | #15
Jeff Johnson <quic_jjohnson@quicinc.com> writes:

> On 5/16/2024 4:45 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
>> On 11.05.24 05:12, Carl Huang wrote:
>>> I'll send out the formal patch next week.
>> 
>> Hmmm, from here it looks like this did not happen. Did I miss something,
>> is there some reason to reevaluate things again, or did this maybe
>> simply fall through the cracks?
>
> Formal patch is still under internal review

BTW I'm also experimenting with regzbot to help me track regressions in
wireless and to avoid missing important fixes.

Thorsten, I don't know if you take wishes but it would be nice to have
in regzbot some kind of filtering per subsystem or label. Maybe
something like this:

https://linux-regtracking.leemhuis.info/regzbot/mainline/?subsystem=wireless

And then a have command for regzbot setting the subsystem (or a label).
That way I could easily see only the wireless related regressions, now
it's harder to find them from the list.
Linux regression tracking (Thorsten Leemhuis) May 17, 2024, 6:04 a.m. UTC | #16
On 17.05.24 07:25, Kalle Valo wrote:
> Jeff Johnson <quic_jjohnson@quicinc.com> writes:
> 
>> On 5/16/2024 4:45 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
>>> On 11.05.24 05:12, Carl Huang wrote:
>>>> I'll send out the formal patch next week.
>>>
>>> Hmmm, from here it looks like this did not happen. Did I miss something,
>>> is there some reason to reevaluate things again, or did this maybe
>>> simply fall through the cracks?
>>
>> Formal patch is still under internal review
> 
> BTW I'm also experimenting with regzbot to help me track regressions in
> wireless and to avoid missing important fixes.

Not sure, but I tend to think that's still too early; better wait a few
more months.

> Thorsten, I don't know if you take wishes but it would be nice to have
> in regzbot some kind of filtering per subsystem or label. Maybe
> something like this:
> https://linux-regtracking.leemhuis.info/regzbot/mainline/?subsystem=wireless
> 
> And then a have command for regzbot setting the subsystem (or a label).
> That way I could easily see only the wireless related regressions, now
> it's harder to find them from the list.

I listen to wishes, but in this case the idea is not new: exactly
something like this is pretty high on my todo list. But there are still
two other things on top of it and requires some major reworks; and I
currently also don't find much time to work on the code. :-/ But sooner
or later I'll get there!

Ciao, Thorsten
Kalle Valo May 17, 2024, 7:39 a.m. UTC | #17
Thorsten Leemhuis <regressions@leemhuis.info> writes:

> On 17.05.24 07:25, Kalle Valo wrote:
>> Jeff Johnson <quic_jjohnson@quicinc.com> writes:
>> 
>>> On 5/16/2024 4:45 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
>>>> On 11.05.24 05:12, Carl Huang wrote:
>>>>> I'll send out the formal patch next week.
>>>>
>>>> Hmmm, from here it looks like this did not happen. Did I miss something,
>>>> is there some reason to reevaluate things again, or did this maybe
>>>> simply fall through the cracks?
>>>
>>> Formal patch is still under internal review
>> 
>> BTW I'm also experimenting with regzbot to help me track regressions in
>> wireless and to avoid missing important fixes.
>
> Not sure, but I tend to think that's still too early; better wait a few
> more months.

FWIW I have been pretty happy so far and would prefer to continue using
it with wireless drivers regressions. But of course if it's better for
you I'll stop for now.

>> Thorsten, I don't know if you take wishes but it would be nice to have
>> in regzbot some kind of filtering per subsystem or label. Maybe
>> something like this:
>> https://linux-regtracking.leemhuis.info/regzbot/mainline/?subsystem=wireless
>> 
>> And then a have command for regzbot setting the subsystem (or a label).
>> That way I could easily see only the wireless related regressions, now
>> it's harder to find them from the list.
>
> I listen to wishes, but in this case the idea is not new: exactly
> something like this is pretty high on my todo list. But there are still
> two other things on top of it and requires some major reworks; and I
> currently also don't find much time to work on the code. :-/ But sooner
> or later I'll get there!

Trust me, I know how it is :) These are just wishlist stuff and low
priority.

One more to the wishlist: refreshing the HTML page once an hour or so. I
now keep the regzbot page always open and it would be nice to have it
up-to-date without pressing CTRL-R. Yes, I'm lazy :)
Linux regression tracking (Thorsten Leemhuis) May 19, 2024, 5:51 p.m. UTC | #18
On 17.05.24 09:39, Kalle Valo wrote:
> Thorsten Leemhuis <regressions@leemhuis.info> writes:
>> On 17.05.24 07:25, Kalle Valo wrote:
>>> Jeff Johnson <quic_jjohnson@quicinc.com> writes:
>>>> On 5/16/2024 4:45 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
>>>>> On 11.05.24 05:12, Carl Huang wrote:
>>>>>> I'll send out the formal patch next week.
>>>>>
>>>>> Hmmm, from here it looks like this did not happen. Did I miss something,
>>>>> is there some reason to reevaluate things again, or did this maybe
>>>>> simply fall through the cracks?
>>>>
>>>> Formal patch is still under internal review
>>>
>>> BTW I'm also experimenting with regzbot to help me track regressions in
>>> wireless and to avoid missing important fixes.
>>
>> Not sure, but I tend to think that's still too early; better wait a few
>> more months.
> 
> FWIW I have been pretty happy so far and would prefer to continue using
> it with wireless drivers regressions. 

Ohh, in that case just continue!

> But of course if it's better for you I'll stop for now.

No, not at all, making regzbot more useful for subsystem developers and
maintainers is the next important step, so I'm glad if it already works
well for you. And if something does not work, just tell me!

>>> Thorsten, I don't know if you take wishes but it would be nice to have
>>> in regzbot some kind of filtering per subsystem or label. Maybe
>>> something like this:
>>> https://linux-regtracking.leemhuis.info/regzbot/mainline/?subsystem=wireless
>>>
>>> And then a have command for regzbot setting the subsystem (or a label).
>>> That way I could easily see only the wireless related regressions, now
>>> it's harder to find them from the list.
>>
>> I listen to wishes, but in this case the idea is not new: exactly
>> something like this is pretty high on my todo list. But there are still
>> two other things on top of it and requires some major reworks; and I
>> currently also don't find much time to work on the code. :-/ But sooner
>> or later I'll get there!
> 
> Trust me, I know how it is :) These are just wishlist stuff and low
> priority.

Apparently depends on the point of view, as I think it's high priority.

> One more to the wishlist: refreshing the HTML page once an hour or so. I
> now keep the regzbot page always open and it would be nice to have it
> up-to-date without pressing CTRL-R. Yes, I'm lazy :)

Added that to the issue tracker to ensure it's not forgotten.

Ciao, Thorsten
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index bebfd342e28b..739a8d13d57d 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -120,6 +120,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tcl_ring_retry = true,
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
+		.support_dual_stations = false,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -202,6 +203,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
 		.support_fw_mac_sequence = false,
+		.support_dual_stations = false,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -251,7 +253,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.cold_boot_calib = false,
 		.cbcal_restart_fw = false,
 		.fw_mem_mode = 0,
-		.num_vdevs = 16 + 1,
+		.num_vdevs = 2 + 1,
 		.num_peers = 512,
 		.supports_suspend = true,
 		.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
@@ -286,6 +288,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
 		.support_fw_mac_sequence = true,
+		.support_dual_stations = true,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -367,6 +370,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
 		.support_fw_mac_sequence = false,
+		.support_dual_stations = false,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -416,7 +420,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.cold_boot_calib = false,
 		.cbcal_restart_fw = false,
 		.fw_mem_mode = 0,
-		.num_vdevs = 16 + 1,
+		.num_vdevs = 2 + 1,
 		.num_peers = 512,
 		.supports_suspend = true,
 		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
@@ -451,6 +455,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
 		.support_fw_mac_sequence = true,
+		.support_dual_stations = true,
 	},
 	{
 		.name = "wcn6855 hw2.1",
@@ -498,7 +503,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.cold_boot_calib = false,
 		.cbcal_restart_fw = false,
 		.fw_mem_mode = 0,
-		.num_vdevs = 16 + 1,
+		.num_vdevs = 2 + 1,
 		.num_peers = 512,
 		.supports_suspend = true,
 		.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
@@ -533,6 +538,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
 		.support_fw_mac_sequence = true,
+		.support_dual_stations = true,
 	},
 	{
 		.name = "wcn6750 hw1.0",
@@ -613,6 +619,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
 		.smp2p_wow_exit = true,
 		.support_fw_mac_sequence = true,
+		.support_dual_stations = false,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ5018_HW10,
@@ -693,6 +700,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 		.smp2p_wow_exit = false,
 		.support_fw_mac_sequence = false,
+		.support_dual_stations = false,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
index d7b5ec6e6904..3b56ba1b8534 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -58,7 +58,7 @@  static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
 static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
 					   struct target_resource_config *config)
 {
-	config->num_vdevs = 4;
+	config->num_vdevs = ab->hw_params.num_vdevs;
 	config->num_peers = 16;
 	config->num_tids = 32;
 
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index f5533630a7f9..40ed5608fe81 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -225,6 +225,7 @@  struct ath11k_hw_params {
 	u32 tx_ring_size;
 	bool smp2p_wow_exit;
 	bool support_fw_mac_sequence;
+	bool support_dual_stations;
 };
 
 struct ath11k_hw_ops {
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 8c77ade49437..3a9494bc944c 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -9287,28 +9287,46 @@  static int ath11k_mac_setup_iface_combinations(struct ath11k *ar)
 		return -ENOMEM;
 	}
 
-	limits[0].max = 1;
-	limits[0].types |= BIT(NL80211_IFTYPE_STATION);
-
-	limits[1].max = 16;
-	limits[1].types |= BIT(NL80211_IFTYPE_AP);
-
-	if (IS_ENABLED(CONFIG_MAC80211_MESH) &&
-	    ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
-		limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
-
-	combinations[0].limits = limits;
-	combinations[0].n_limits = n_limits;
-	combinations[0].max_interfaces = 16;
-	combinations[0].num_different_channels = 1;
-	combinations[0].beacon_int_infra_match = true;
-	combinations[0].beacon_int_min_gcd = 100;
-	combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
-						BIT(NL80211_CHAN_WIDTH_20) |
-						BIT(NL80211_CHAN_WIDTH_40) |
-						BIT(NL80211_CHAN_WIDTH_80) |
-						BIT(NL80211_CHAN_WIDTH_80P80) |
-						BIT(NL80211_CHAN_WIDTH_160);
+	if (ab->hw_params.support_dual_stations) {
+		limits[0].max = 2;
+		limits[0].types |= BIT(NL80211_IFTYPE_STATION);
+
+		limits[1].max = 1;
+		limits[1].types |= BIT(NL80211_IFTYPE_AP);
+		if (IS_ENABLED(CONFIG_MAC80211_MESH) &&
+		    ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
+			limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
+
+		combinations[0].limits = limits;
+		combinations[0].n_limits = 2;
+		combinations[0].max_interfaces = ab->hw_params.num_vdevs;
+		combinations[0].num_different_channels = 2;
+		combinations[0].beacon_int_infra_match = true;
+		combinations[0].beacon_int_min_gcd = 100;
+	} else {
+		limits[0].max = 1;
+		limits[0].types |= BIT(NL80211_IFTYPE_STATION);
+
+		limits[1].max = 16;
+		limits[1].types |= BIT(NL80211_IFTYPE_AP);
+
+		if (IS_ENABLED(CONFIG_MAC80211_MESH) &&
+		    ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
+			limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
+
+		combinations[0].limits = limits;
+		combinations[0].n_limits = 2;
+		combinations[0].max_interfaces = 16;
+		combinations[0].num_different_channels = 1;
+		combinations[0].beacon_int_infra_match = true;
+		combinations[0].beacon_int_min_gcd = 100;
+		combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
+							BIT(NL80211_CHAN_WIDTH_20) |
+							BIT(NL80211_CHAN_WIDTH_40) |
+							BIT(NL80211_CHAN_WIDTH_80) |
+							BIT(NL80211_CHAN_WIDTH_80P80) |
+							BIT(NL80211_CHAN_WIDTH_160);
+	}
 
 	ar->hw->wiphy->iface_combinations = combinations;
 	ar->hw->wiphy->n_iface_combinations = 1;