Преглед на файлове

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
Manishekar Chandrasekaran преди 9 години
родител
ревизия
ebcab88650
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7 2
      core/wma/src/wma_main.c

+ 7 - 2
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;