Browse Source

qcacld-3.0: Remove overlap protection from lim cache

Remove overlap protection cache from lim and make use
of existing pe session caches.

Change-Id: Ifbabb3da1dad6504e5024643182af1c88ae2ca40
CRs-Fixed: 2170187
Arif Hussain 7 years ago
parent
commit
1cd8abf660

+ 0 - 7
core/mac/inc/ani_global.h

@@ -564,13 +564,6 @@ typedef struct sAniSirLim {
 	/* Number of STAs that do not support short slot time */
 	tLimNoShortSlotParams gLimNoShortSlotParams;
 
-	/* OLBC parameters */
-	tLimProtStaParams gLimOverlap11gParams;
-
-	tLimProtStaParams gLimOverlap11aParams;
-	tLimProtStaParams gLimOverlapHt20Params;
-	tLimProtStaParams gLimOverlapNonGfParams;
-
 	/* */
 	/* ---------------- DPH ----------------------- */
 	/* these used to live in DPH but are now moved here (where they belong) */

+ 0 - 8
core/mac/src/pe/lim/lim_api.c

@@ -198,14 +198,6 @@ static void __lim_init_states(tpAniSirGlobal pMac)
 	 * when SME_START_BSS_REQ is received.
 	 */
 
-	qdf_mem_set(&pMac->lim.gLimOverlap11gParams, sizeof(tLimProtStaParams),
-		    0);
-	qdf_mem_set(&pMac->lim.gLimOverlap11aParams, sizeof(tLimProtStaParams),
-		    0);
-	qdf_mem_set(&pMac->lim.gLimOverlapHt20Params, sizeof(tLimProtStaParams),
-		    0);
-	qdf_mem_set(&pMac->lim.gLimOverlapNonGfParams,
-		    sizeof(tLimProtStaParams), 0);
 	qdf_mem_set(&pMac->lim.gLimNoShortParams, sizeof(tLimNoShortParams), 0);
 	qdf_mem_set(&pMac->lim.gLimNoShortSlotParams,
 		    sizeof(tLimNoShortSlotParams), 0);

+ 0 - 8
core/mac/src/pe/lim/lim_session.c

@@ -168,14 +168,6 @@ static void pe_reset_protection_callback(void *ptr)
 	pe_session_entry->beaconParams.fLsigTXOPProtectionFullSupport = 0;
 	pe_session_entry->beaconParams.gHTObssMode = 0;
 
-	qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
-		     sizeof(mac_ctx->lim.gLimOverlap11gParams));
-	qdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams,
-		     sizeof(mac_ctx->lim.gLimOverlap11aParams));
-	qdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params,
-		     sizeof(mac_ctx->lim.gLimOverlapHt20Params));
-	qdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams,
-		     sizeof(mac_ctx->lim.gLimOverlapNonGfParams));
 
 	old_op_mode = pe_session_entry->htOperMode;
 	pe_session_entry->htOperMode = eSIR_HT_OP_MODE_PURE;

+ 9 - 18
core/mac/src/pe/lim/lim_utils.c

@@ -2966,7 +2966,7 @@ lim_enable_11a_protection(tpAniSirGlobal mac_ctx,
 	 */
 	if (LIM_IS_AP_ROLE(pe_session) && (true == pe_session->htCapability)) {
 		if (overlap) {
-			mac_ctx->lim.gLimOverlap11aParams.protectionEnabled =
+			pe_session->gLimOverlap11aParams.protectionEnabled =
 				true;
 			if ((eSIR_HT_OP_MODE_OVERLAP_LEGACY !=
 			    mac_ctx->lim.gHTOperMode)
@@ -3039,7 +3039,7 @@ lim_disable_11a_protection(tpAniSirGlobal mac_ctx,
 	 */
 	if (overlap) {
 		/* Overlap Legacy protection disabled. */
-		mac_ctx->lim.gLimOverlap11aParams.protectionEnabled = false;
+		pe_session->gLimOverlap11aParams.protectionEnabled = false;
 
 		/*
 		 * We need to take care of HT OP mode iff we are HT AP.
@@ -3047,9 +3047,9 @@ lim_disable_11a_protection(tpAniSirGlobal mac_ctx,
 		 * protection enabled.
 		 */
 		if (!pe_session->htCapability ||
-		     (mac_ctx->lim.gLimOverlap11aParams.protectionEnabled
-		     || mac_ctx->lim.gLimOverlapHt20Params.protectionEnabled
-		     || mac_ctx->lim.gLimOverlapNonGfParams.protectionEnabled))
+		     (pe_session->gLimOverlap11aParams.protectionEnabled
+		     || pe_session->gLimOverlapHt20Params.protectionEnabled
+		     || pe_session->gLimOverlapNonGfParams.protectionEnabled))
 			goto disable_11a_end;
 
 		/* Check if there is a need to change HT OP mode. */
@@ -3078,9 +3078,9 @@ lim_disable_11a_protection(tpAniSirGlobal mac_ctx,
 		 */
 
 		/* Change HT OP mode to 01 if any overlap protection enabled */
-		if (mac_ctx->lim.gLimOverlap11aParams.protectionEnabled
-		    || mac_ctx->lim.gLimOverlapHt20Params.protectionEnabled
-		    || mac_ctx->lim.gLimOverlapNonGfParams.protectionEnabled) {
+		if (pe_session->gLimOverlap11aParams.protectionEnabled
+		    || pe_session->gLimOverlapHt20Params.protectionEnabled
+		    || pe_session->gLimOverlapNonGfParams.protectionEnabled) {
 			mac_ctx->lim.gHTOperMode =
 				eSIR_HT_OP_MODE_OVERLAP_LEGACY;
 			pe_session->htOperMode = eSIR_HT_OP_MODE_OVERLAP_LEGACY;
@@ -3102,7 +3102,7 @@ lim_disable_11a_protection(tpAniSirGlobal mac_ctx,
 	}
 
 disable_11a_end:
-	if (!mac_ctx->lim.gLimOverlap11aParams.protectionEnabled &&
+	if (!pe_session->gLimOverlap11aParams.protectionEnabled &&
 	    !pe_session->gLim11aParams.protectionEnabled) {
 		pe_warn("===> Protection from 11A Disabled");
 		bcn_prms->llaCoexist = false;
@@ -6215,15 +6215,6 @@ bool lim_validate_received_frame_a1_addr(tpAniSirGlobal mac_ctx,
 void lim_check_and_reset_protection_params(tpAniSirGlobal mac_ctx)
 {
 	if (!pe_get_active_session_count(mac_ctx)) {
-		qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
-			sizeof(mac_ctx->lim.gLimOverlap11gParams));
-		qdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams,
-			sizeof(mac_ctx->lim.gLimOverlap11aParams));
-		qdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params,
-			sizeof(mac_ctx->lim.gLimOverlapHt20Params));
-		qdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams,
-			sizeof(mac_ctx->lim.gLimOverlapNonGfParams));
-
 		mac_ctx->lim.gHTOperMode = eSIR_HT_OP_MODE_PURE;
 	}
 }

+ 6 - 6
core/mac/src/pe/sch/sch_beacon_process.c

@@ -86,10 +86,10 @@ ap_beacon_process_5_ghz(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 	    || (eSIR_HT_OP_MODE_MIXED == bcn_struct->HTInfo.opMode)
 	    || (eSIR_HT_OP_MODE_OVERLAP_LEGACY == bcn_struct->HTInfo.opMode)) {
 		lim_update_overlap_sta_param(mac_ctx, mac_hdr->bssId,
-					&(mac_ctx->lim.gLimOverlap11aParams));
+					&(session->gLimOverlap11aParams));
 
-		if (mac_ctx->lim.gLimOverlap11aParams.numSta
-		    && !mac_ctx->lim.gLimOverlap11aParams.protectionEnabled) {
+		if (session->gLimOverlap11aParams.numSta
+		    && !session->gLimOverlap11aParams.protectionEnabled) {
 			lim_update_11a_protection(mac_ctx, true, true,
 						 bcn_prm, session);
 		}
@@ -100,10 +100,10 @@ ap_beacon_process_5_ghz(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 		return;
 
 	lim_update_overlap_sta_param(mac_ctx, mac_hdr->bssId,
-				     &(mac_ctx->lim.gLimOverlapHt20Params));
+				     &(session->gLimOverlapHt20Params));
 
-	if (mac_ctx->lim.gLimOverlapHt20Params.numSta
-	    && !mac_ctx->lim.gLimOverlapHt20Params.protectionEnabled)
+	if (session->gLimOverlapHt20Params.numSta
+	    && !session->gLimOverlapHt20Params.protectionEnabled)
 		lim_enable_ht20_protection(mac_ctx, true, true,
 					   bcn_prm, session);
 }