Ver Fonte

qcacld-3.0: Fix csr_get11h_power_constraint() context param

Currently csr_get11h_power_constraint() takes a tHalHandle context
param.  However CSR is an internal module, and hence it should be
using the "real" context pointer type tpAniSirGlobal instead of the
opaque reference tHalhandle, so update the API.

Change-Id: Ic7f622b8633726a03ace11951c6e53b7e0936beb
CRs-Fixed: 2255547
Jeff Johnson há 6 anos atrás
pai
commit
b7de91b47c
2 ficheiros alterados com 7 adições e 8 exclusões
  1. 2 2
      core/sme/inc/csr_support.h
  2. 5 6
      core/sme/src/csr/csr_util.c

+ 2 - 2
core/sme/inc/csr_support.h

@@ -229,8 +229,8 @@ tSirResultCodes csr_get_de_auth_rsp_status_code(tSirSmeDeauthRsp *pSmeRsp);
 uint32_t csr_get_frag_thresh(tpAniSirGlobal mac_ctx);
 uint32_t csr_get_rts_thresh(tpAniSirGlobal mac_ctx);
 eCsrPhyMode csr_get_phy_mode_from_bssDesc(tSirBssDescription *pSirBssDesc);
-uint32_t csr_get11h_power_constraint(tHalHandle hHal,
-		tDot11fIEPowerConstraints *pPowerConstraint);
+uint32_t csr_get11h_power_constraint(tpAniSirGlobal mac_ctx,
+				     tDot11fIEPowerConstraints *constraints);
 uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
 		struct csr_roam_profile *pProfile,
 		tSirBssDescription *pSirBssDesc,

+ 5 - 6
core/sme/src/csr/csr_util.c

@@ -2215,18 +2215,17 @@ enum csr_cfgdot11mode csr_find_best_phy_mode(tpAniSirGlobal pMac,
 	return cfgDot11ModeToUse;
 }
 
-uint32_t csr_get11h_power_constraint(tHalHandle hHal,
-				    tDot11fIEPowerConstraints *pPowerConstraint)
+uint32_t csr_get11h_power_constraint(tpAniSirGlobal mac_ctx,
+				     tDot11fIEPowerConstraints *constraints)
 {
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	uint32_t localPowerConstraint = 0;
 
 	/* check if .11h support is enabled, if not,
 	 * the power constraint is 0.
 	 */
-	if (pMac->roam.configParam.Is11hSupportEnabled
-	    && pPowerConstraint->present) {
-		localPowerConstraint = pPowerConstraint->localPowerConstraints;
+	if (mac_ctx->roam.configParam.Is11hSupportEnabled &&
+	    constraints->present) {
+		localPowerConstraint = constraints->localPowerConstraints;
 	}
 
 	return localPowerConstraint;