Remove the duplicate definition and use the correct max value.
v2:
wifi: ath12k: use correct MAX_RADIOS
- Updated the detail information in the commit message
Karthikeyan Periyasamy (2):
wifi: ath12k: remove duplicate definition of MAX_RADIOS
wifi: ath12k: use correct MAX_RADIOS
drivers/net/wireless/ath/ath12k/core.h | 2 --
drivers/net/wireless/ath/ath12k/wmi.h | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
base-commit: 0ef7606c6012f05a1f5398e3a1964c35eb9c08a4
--
2.34.1
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 <[email protected]>
---
drivers/net/wireless/ath/ath12k/wmi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 496866673aea..27bec3800bff 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -4770,7 +4770,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)
--
2.34.1
On 5/13/2024 11:34 PM, Karthikeyan Periyasamy wrote:
> 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 <[email protected]>
Acked-by: Jeff Johnson <[email protected]>