Browse Source

qcacld-3.0: Disable GAP when concurrent sessions running

GAP should be enabled by host only when SAP is operating in stand
alone mode. Host should disable when there is a concurrent STA or
P2P session.

CRs-Fixed: 1065543
Change-Id: I1649bd5caca07abf2799892ad92d906474277acc
Ganesh Kondabattini 8 years ago
parent
commit
e353184920
2 changed files with 11 additions and 2 deletions
  1. 5 0
      core/cds/src/cds_concurrency.c
  2. 6 2
      core/hdd/src/wlan_hdd_green_ap.c

+ 5 - 0
core/cds/src/cds_concurrency.c

@@ -66,6 +66,7 @@
 #include "wlan_hdd_ipa.h"
 #include "cdp_txrx_flow_ctrl_legacy.h"
 #include "pld_common.h"
+#include "wlan_hdd_green_ap.h"
 
 static struct cds_conc_connection_info
 	conc_connection_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
@@ -3467,6 +3468,8 @@ void cds_set_concurrency_mode(enum tQDF_ADAPTER_MODE mode)
 	cds_info("concurrency_mode = 0x%x Number of open sessions for mode %d = %d",
 		hdd_ctx->concurrency_mode, mode,
 		hdd_ctx->no_of_open_sessions[mode]);
+
+	hdd_green_ap_start_bss(hdd_ctx);
 }
 
 /**
@@ -3507,6 +3510,8 @@ void cds_clear_concurrency_mode(enum tQDF_ADAPTER_MODE mode)
 	cds_info("concurrency_mode = 0x%x Number of open sessions for mode %d = %d",
 		hdd_ctx->concurrency_mode, mode,
 		hdd_ctx->no_of_open_sessions[mode]);
+
+	hdd_green_ap_start_bss(hdd_ctx);
 }
 
 /**

+ 6 - 2
core/hdd/src/wlan_hdd_green_ap.c

@@ -425,8 +425,12 @@ void hdd_green_ap_start_bss(struct hdd_context_s *hdd_ctx)
 		 */
 	}
 
-	if (!(QDF_STA_MASK & hdd_ctx->concurrency_mode) &&
-	    cfg->enable2x2 && cfg->enableGreenAP) {
+	if ((hdd_ctx->concurrency_mode & QDF_SAP_MASK) &&
+			!(hdd_ctx->concurrency_mode & (QDF_SAP_MASK)) &&
+			cfg->enable2x2 && cfg->enableGreenAP) {
+		hdd_notice("Green AP enabled - sta_con: %d, 2x2: %d, GAP: %d",
+			QDF_STA_MASK & hdd_ctx->concurrency_mode,
+			cfg->enable2x2, cfg->enableGreenAP);
 		hdd_green_ap_mc(hdd_ctx, GREEN_AP_PS_START_EVENT);
 	} else {
 		hdd_green_ap_mc(hdd_ctx, GREEN_AP_PS_STOP_EVENT);