]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: ath12k: use correct MAX_RADIOS
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Tue, 14 May 2024 06:34:12 +0000 (12:04 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 16 May 2024 08:29:02 +0000 (11:29 +0300)
The current value of the MAX_RADIOS definition is 3. This is incorrect
because no device supports more than 2 radios.

An incorrect MAX_RADIOS value can lead to:
 - unnecessary memory allocation for pdev related entities.
 - invalid pdev id validation.
 - Misconceptions for code readers.

Therefore, modify the MAX_RADIOS definition as 2.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240514063412.3483723-3-quic_periyasa@quicinc.com
drivers/net/wireless/ath/ath12k/wmi.h

index 7f83c4583919a940d852fad776c670cb5c9ef597..c2b86e187a03fe8637c3c85e791a06b91a25a929 100644 (file)
@@ -4804,7 +4804,7 @@ struct wmi_probe_tmpl_cmd {
        __le32 buf_len;
 } __packed;
 
-#define MAX_RADIOS 3
+#define MAX_RADIOS 2
 
 #define WMI_SERVICE_READY_TIMEOUT_HZ (5 * HZ)
 #define WMI_SEND_TIMEOUT_HZ (3 * HZ)