From: Karthikeyan Periyasamy Date: Tue, 14 May 2024 06:34:12 +0000 (+0530) Subject: wifi: ath12k: use correct MAX_RADIOS X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7678f8bfd74c324bd10499cf1d05e5720d9449b2;p=linux.git wifi: ath12k: use correct MAX_RADIOS 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 Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240514063412.3483723-3-quic_periyasa@quicinc.com --- diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h index 7f83c4583919..c2b86e187a03 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -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)