From ad4e805d345103619004d67d387425cde0fe5b7d Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 3 Jun 2018 21:24:49 -0700 Subject: [PATCH] qcacld-3.0: Fix csr_is_security_match() context param Currently csr_is_security_match() 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: Ibaf8273ad45a7019d19f8793e2bfc35032221c8d CRs-Fixed: 2255547 --- core/sme/inc/csr_support.h | 2 +- core/sme/src/csr/csr_util.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/sme/inc/csr_support.h b/core/sme/inc/csr_support.h index c0b50b1d3d5a..3b21508712bd 100644 --- a/core/sme/inc/csr_support.h +++ b/core/sme/inc/csr_support.h @@ -291,7 +291,7 @@ tAniEdType csr_translate_encrypt_type_to_ed_type( * pIes shall contain IEs from pSirBssDesc. * It shall be returned from function csr_get_parsed_bss_description_ies */ -bool csr_is_security_match(tHalHandle hHal, tCsrAuthList *authType, +bool csr_is_security_match(tpAniSirGlobal mac_ctx, tCsrAuthList *authType, tCsrEncryptionList *pUCEncryptionType, tCsrEncryptionList *pMCEncryptionType, bool *pMFPEnabled, uint8_t *pMFPRequired, uint8_t *pMFPCapable, diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index b27735f949a5..9b2e71f8c4d0 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -5127,7 +5127,7 @@ static bool csr_validate_any_default(tHalHandle hal, tCsrAuthList *auth_type, /** * csr_is_security_match() - Check if the security is matching - * @hal: Global HAL handle + * @mac_ctx: Global MAC context * @auth_type: Authentication type * @uc_enc_type: Unicast Encryption type * @mc_enc_type: Multicast encryption type @@ -5142,7 +5142,7 @@ static bool csr_validate_any_default(tHalHandle hal, tCsrAuthList *auth_type, * * Return: Boolean value to tell if matched or not. */ -bool csr_is_security_match(tHalHandle hal, tCsrAuthList *auth_type, +bool csr_is_security_match(tpAniSirGlobal mac_ctx, tCsrAuthList *auth_type, tCsrEncryptionList *uc_enc_type, tCsrEncryptionList *mc_enc_type, bool *mfp_enabled, uint8_t *mfp_required, uint8_t *mfp_capable, @@ -5151,7 +5151,6 @@ bool csr_is_security_match(tHalHandle hal, tCsrAuthList *auth_type, eCsrEncryptionType *neg_uc_cipher, eCsrEncryptionType *neg_mc_cipher) { - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); bool match = false; uint8_t i; eCsrEncryptionType mc_cipher = eCSR_ENCRYPT_TYPE_UNKNOWN; @@ -5224,7 +5223,7 @@ bool csr_is_security_match(tHalHandle hal, tCsrAuthList *auth_type, #ifdef FEATURE_WLAN_WAPI case eCSR_ENCRYPT_TYPE_WPI: /* WAPI */ if (ies_ptr) - match = csr_is_wapi_match(hal, auth_type, + match = csr_is_wapi_match(mac_ctx, auth_type, uc_cipher, mc_enc_type, ies_ptr, &local_neg_auth_type, &mc_cipher); @@ -5234,7 +5233,7 @@ bool csr_is_security_match(tHalHandle hal, tCsrAuthList *auth_type, #endif /* FEATURE_WLAN_WAPI */ case eCSR_ENCRYPT_TYPE_ANY: default: - match = csr_validate_any_default(hal, auth_type, + match = csr_validate_any_default(mac_ctx, auth_type, mc_enc_type, mfp_enabled, mfp_required, mfp_capable, ies_ptr, &local_neg_auth_type, bss_desc,