Forráskód Böngészése

qcacld-3.0: Resolve compilation by protecting LFR3 feature

Few LFR3 related code checks are not protected which creates the
compilation issue on some of the platform.

Fix the compilation issue by moving LFR3 related code checks to
WLAN_FEATURE_ROAM_OFFLOAD macro.

CRs-Fixed: 2055018
Change-Id: I1ca4000c3bb15e33c2fc85f9117aa4f1ca2aeed4
Krunal Soni 8 éve
szülő
commit
4bfecf6e23
2 módosított fájl, 48 hozzáadás és 11 törlés
  1. 1 1
      core/mac/src/pe/lim/lim_api.c
  2. 47 10
      core/mac/src/pe/lim/lim_ft.c

+ 1 - 1
core/mac/src/pe/lim/lim_api.c

@@ -1828,6 +1828,7 @@ void lim_fill_join_rsp_ht_caps(tpPESession session, tpSirSmeJoinRsp join_rsp)
 }
 #endif
 
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /**
  * sir_parse_bcn_fixed_fields() - Parse fixed fields in Beacon IE's
  *
@@ -1852,7 +1853,6 @@ static void sir_parse_bcn_fixed_fields(tpAniSirGlobal mac_ctx,
 	sir_copy_caps_info(mac_ctx, dst, beacon_struct);
 }
 
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
 static QDF_STATUS
 lim_roam_fill_bss_descr(tpAniSirGlobal pMac,
 			roam_offload_synch_ind *roam_offload_synch_ind_ptr,

+ 47 - 10
core/mac/src/pe/lim/lim_ft.c

@@ -478,6 +478,52 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
 }
 #endif
 
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+/**
+ * lim_fill_dot11mode() - to fill 802.11 mode in FT session
+ * @mac_ctx: pointer to mac ctx
+ * @pftSessionEntry: FT session
+ * @psessionEntry: PE session
+ *
+ * This API fills FT session's dot11mode either from pe session or
+ * from CFG depending on the condition.
+ *
+ * Return: none
+ */
+static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
+			tpPESession pftSessionEntry, tpPESession psessionEntry)
+{
+	uint32_t self_dot11_mode;
+
+	if (psessionEntry->ftPEContext.pFTPreAuthReq &&
+			!mac_ctx->roam.configParam.isRoamOffloadEnabled) {
+		pftSessionEntry->dot11mode =
+			psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
+	} else {
+		wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11_mode);
+		pe_debug("selfDot11Mode: %d", self_dot11_mode);
+		pftSessionEntry->dot11mode = self_dot11_mode;
+	}
+}
+#else
+/**
+ * lim_fill_dot11mode() - to fill 802.11 mode in FT session
+ * @mac_ctx: pointer to mac ctx
+ * @pftSessionEntry: FT session
+ * @psessionEntry: PE session
+ *
+ * This API fills FT session's dot11mode either from pe session.
+ *
+ * Return: none
+ */
+static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
+			tpPESession pftSessionEntry, tpPESession psessionEntry)
+{
+	pftSessionEntry->dot11mode =
+			psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
+}
+#endif
+
 #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
 /*------------------------------------------------------------------
  *
@@ -493,7 +539,6 @@ void lim_fill_ft_session(tpAniSirGlobal pMac,
 	int8_t localPowerConstraint;
 	int8_t regMax;
 	tSchBeaconStruct *pBeaconStruct;
-	uint32_t self_dot11_mode;
 	ePhyChanBondState cbEnabledMode;
 
 	pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
@@ -533,16 +578,8 @@ void lim_fill_ft_session(tpAniSirGlobal pMac,
 	pftSessionEntry->ssId.length = pBeaconStruct->ssId.length;
 	qdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId,
 		     pftSessionEntry->ssId.length);
+	lim_fill_dot11mode(pMac, pftSessionEntry, psessionEntry);
 
-	if (psessionEntry->ftPEContext.pFTPreAuthReq &&
-			!pMac->roam.configParam.isRoamOffloadEnabled)
-		pftSessionEntry->dot11mode =
-			psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
-	else {
-		wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &self_dot11_mode);
-		pe_debug("selfDot11Mode: %d", self_dot11_mode);
-		pftSessionEntry->dot11mode = self_dot11_mode;
-	}
 	pe_debug("dot11mode: %d", pftSessionEntry->dot11mode);
 	pftSessionEntry->vhtCapability =
 		(IS_DOT11_MODE_VHT(pftSessionEntry->dot11mode)