From b7de91b47c2a9f4f502388a0bf93ebf55278fb0b Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 3 Jun 2018 18:15:02 -0700 Subject: [PATCH] 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 --- core/sme/inc/csr_support.h | 4 ++-- core/sme/src/csr/csr_util.c | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/sme/inc/csr_support.h b/core/sme/inc/csr_support.h index d76115d767ae..740d80273327 100644 --- a/core/sme/inc/csr_support.h +++ b/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, diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 599c5deab06f..c360ae4115a4 100644 --- a/core/sme/src/csr/csr_util.c +++ b/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;