summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManishekar Chandrasekaran <cmshekar@codeaurora.org>2016-05-04 12:55:14 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-05-04 21:19:43 -0700
commitebcab886505c506e2ab04c8d91ea9c2a3d0454d2 (patch)
tree70f53411e18c0b5045f2c1ad87e6bbde632590ab
parentebf8a8640e2122225f96ad619978e4e227813ba3 (diff)
qcacld-3.0: Initialize max peers before default target configuration
Make sure that the maximum number of peers is initialized before this value is configured to the target. Currently, the default target configuration is happening even before the max number of peers is initialized. Fix the same by initializing the max peers before the default target configuration. Change-Id: I189e9c92727703655b238b3edd1e3b480a09c17e CRs-Fixed: 1011487
-rw-r--r--core/wma/src/wma_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index d068183616bf..89889ddca52e 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -1678,6 +1678,13 @@ QDF_STATUS wma_open(void *cds_context,
wma_handle->wma_runtime_resume_lock =
qdf_runtime_lock_init("wma_runtime_resume");
+ /* Initialize max_no_of_peers for wma_get_number_of_peers_supported() */
+ wma_init_max_no_of_peers(wma_handle, mac_params->maxStation);
+ /* Cap maxStation based on the target version */
+ mac_params->maxStation = wma_get_number_of_peers_supported(wma_handle);
+ /* Reinitialize max_no_of_peers based on the capped maxStation value */
+ wma_init_max_no_of_peers(wma_handle, mac_params->maxStation);
+
/* initialize default target config */
wma_set_default_tgt_config(wma_handle);
@@ -1739,8 +1746,6 @@ QDF_STATUS wma_open(void *cds_context,
if (cds_get_conparam() == QDF_GLOBAL_FTM_MODE)
wma_utf_attach(wma_handle);
#endif /* QCA_WIFI_FTM */
- wma_init_max_no_of_peers(wma_handle, mac_params->maxStation);
- mac_params->maxStation = wma_get_number_of_peers_supported(wma_handle);
mac_params->maxBssId = WMA_MAX_SUPPORTED_BSS;
mac_params->frameTransRequired = 0;