Browse Source

qcacld-3.0: Replace MAX_SME_SESSIONS macro to SIR_MAX_SUPPORTED_BSS

Use SIR_MAX_SUPPORTED_BSS macro to decide max number of SME sessions
to avoid timer leak issue as SIR_MAX_SUPPORTED_BSS can be
configured through kbuild.

Change-Id: I86377d43ceb1b5cfcaa7c17a15a4fb300b79246b
CRs-Fixed: 2288864
Nirav Shah 6 years ago
parent
commit
6a17618a8a
2 changed files with 2 additions and 4 deletions
  1. 1 3
      core/sme/inc/sme_power_save.h
  2. 1 1
      core/sme/src/common/sme_power_save.c

+ 1 - 3
core/sme/inc/sme_power_save.h

@@ -25,8 +25,6 @@
 #include "ani_system_defs.h"
 #include "sir_api.h"
 
-#define MAX_SME_SESSIONS 5
-
 /*
  * Auto Ps Entry User default timeout value, used instead of negative timeouts
  * from user space - 5000ms
@@ -91,7 +89,7 @@ struct ps_params {
 struct ps_global_info {
 	bool ps_enabled;
 	uint32_t auto_bmps_timer_val;
-	struct ps_params ps_params[MAX_SME_SESSIONS];
+	struct ps_params ps_params[SIR_MAX_SUPPORTED_BSS];
 	/* Remain in Power active till DHCP completes */
 	bool remain_in_power_active_till_dhcp;
 };

+ 1 - 1
core/sme/src/common/sme_power_save.c

@@ -788,7 +788,7 @@ QDF_STATUS sme_ps_open(tHalHandle hal_ctx)
 
 	uint32_t i;
 
-	for (i = 0; i < MAX_SME_SESSIONS; i++) {
+	for (i = 0; i < SIR_MAX_SUPPORTED_BSS; i++) {
 		if (QDF_STATUS_SUCCESS != sme_ps_open_per_session(hal_ctx, i)) {
 			sme_err("PMC Init Failed for session: %d", i);
 			return QDF_STATUS_E_FAILURE;