diff --git a/core/hdd/src/wlan_hdd_sysfs_unit_test.c b/core/hdd/src/wlan_hdd_sysfs_unit_test.c index 8d131cc9c6..c3823f2ee5 100644 --- a/core/hdd/src/wlan_hdd_sysfs_unit_test.c +++ b/core/hdd/src/wlan_hdd_sysfs_unit_test.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -39,7 +40,7 @@ static ssize_t __hdd_sysfs_unit_test_target_store( struct hdd_context *hdd_ctx; char buf_local[MAX_USER_COMMAND_SIZE_UNIT_TEST_TARGET + 1]; char *sptr, *token; - uint32_t apps_args[WMA_MAX_NUM_ARGS]; + uint32_t apps_args[WMI_UNIT_TEST_MAX_NUM_ARGS]; int module_id, args_num, ret, i; uint8_t vdev_id = 0; QDF_STATUS status; @@ -90,7 +91,7 @@ static ssize_t __hdd_sysfs_unit_test_target_store( hdd_err_rl("Invalid MODULE ID %d", module_id); return -EINVAL; } - if (args_num > WMA_MAX_NUM_ARGS) { + if (args_num > WMI_UNIT_TEST_MAX_NUM_ARGS) { hdd_err_rl("Too many args %d", args_num); return -EINVAL; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index d87504b71c..4ff4dac0b0 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -5814,7 +5814,7 @@ static int hdd_set_fwtest(int argc, int cmd, int value) struct set_fwtest_params *fw_test; /* check for max number of arguments */ - if (argc > (WMA_MAX_NUM_ARGS) || + if (argc > WMI_UNIT_TEST_MAX_NUM_ARGS || argc != HDD_FWTEST_PARAMS) { hdd_err("Too Many args %d", argc); return -EINVAL; @@ -7195,8 +7195,8 @@ static int __iw_set_var_ints_getnone(struct net_device *dev, hdd_err_rl("Invalid MODULE ID %d", apps_args[0]); return -EINVAL; } - if ((apps_args[1] > (WMA_MAX_NUM_ARGS)) || - (apps_args[1] < 0)) { + if (apps_args[1] > WMI_UNIT_TEST_MAX_NUM_ARGS || + apps_args[1] < 0) { hdd_err_rl("Too Many/Few args %d", apps_args[1]); return -EINVAL; } diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 2c6db63e6f..f93bec98d4 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -186,7 +187,6 @@ #define WMA_VDEV_SET_KEY_WAKELOCK_TIMEOUT WAKELOCK_DURATION_RECOMMENDED #define WMA_TX_Q_RECHECK_TIMER_WAIT 2 /* 2 ms */ -#define WMA_MAX_NUM_ARGS 8 #define WMA_SMPS_PARAM_VALUE_S 29 diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 1fdae4e369..5e6639b7cb 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -708,7 +708,7 @@ QDF_STATUS wma_form_unit_test_cmd_and_send(uint32_t vdev_id, return QDF_STATUS_E_FAILURE; } - if (arg_count > WMA_MAX_NUM_ARGS) { + if (arg_count > WMI_UNIT_TEST_MAX_NUM_ARGS) { wma_err("arg_count is crossed the boundary"); return QDF_STATUS_E_FAILURE; }