Commit 41b6231
wifi: ath12k: enforce vdev limit in ath12k_mac_vdev_create()
[ Upstream commit 448bf7b ]
Currently, vdev limit check is performed only in
ath12k_mac_assign_vif_to_vdev(). If the host has already created
maximum number of vdevs for the radio (ar) and a scan request
arrives for the same radio, ath12k_mac_initiate_hw_scan() attempts
to create a vdev without checking the limit, causing firmware asserts.
Centralize the vdev limit guard by moving the check into
ath12k_mac_vdev_create() so that all callers obey the limit.
While doing this, update the condition from
`num_created_vdevs > (TARGET_NUM_VDEVS(ab) - 1)` to
`num_created_vdevs >= TARGET_NUM_VDEVS(ab)` for clarity and to
eliminate unnecessary arithmetic.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Fixes: 0d6e673 ("wifi: ath12k: scan statemachine changes for single wiphy")
Fixes: 4938ba7 ("wifi: ath12k: modify remain on channel for single wiphy")
Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251026182254.1399650-2-rameshkumar.sundaram@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 4f93750 commit 41b6231
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9687 | 9687 | | |
9688 | 9688 | | |
9689 | 9689 | | |
| 9690 | + | |
| 9691 | + | |
| 9692 | + | |
| 9693 | + | |
| 9694 | + | |
| 9695 | + | |
9690 | 9696 | | |
9691 | 9697 | | |
9692 | 9698 | | |
| |||
10046 | 10052 | | |
10047 | 10053 | | |
10048 | 10054 | | |
10049 | | - | |
10050 | | - | |
10051 | | - | |
10052 | | - | |
10053 | | - | |
10054 | | - | |
10055 | 10055 | | |
10056 | 10056 | | |
10057 | 10057 | | |
| |||
0 commit comments