diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index fc5160ddab..c3deabdc79 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -4953,8 +4953,8 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter, pRsnIe = gen_ie + 2; RSNIeLen = gen_ie_len - 2; /* Unpack the RSN IE */ - dot11f_unpack_ie_rsn((tpAniSirGlobal) halHandle, - pRsnIe, RSNIeLen, &dot11RSNIE, false); + sme_unpack_rsn_ie(halHandle, pRsnIe, RSNIeLen, + &dot11RSNIE, false); /* Copy out the encryption and authentication types */ hdd_debug("pairwise cipher suite count: %d", dot11RSNIE.pwise_cipher_suite_count); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index c1f9de8f1c..fc77bef010 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2727,8 +2727,8 @@ int hdd_softap_unpack_ie(tHalHandle halHandle, RSNIeLen = gen_ie_len - 2; /* Unpack the RSN IE */ memset(&dot11RSNIE, 0, sizeof(tDot11fIERSN)); - dot11f_unpack_ie_rsn((tpAniSirGlobal) halHandle, - pRsnIe, RSNIeLen, &dot11RSNIE, false); + sme_unpack_rsn_ie(halHandle, pRsnIe, RSNIeLen, + &dot11RSNIE, false); /* Copy out the encryption and authentication types */ hdd_debug("pairwise cipher suite count: %d", dot11RSNIE.pwise_cipher_suite_count); diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index 0b0fd017ac..c36f502ba2 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2007, 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2006-2007, 2014-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1417,8 +1417,8 @@ IE RSN (EID_RSN) // 7.3.2.25 { // The version is 2 octets, and we only support version 1. version, 2 MUSTBE 1; - // The next four octets will be the Group Cipher Suite - gp_cipher_suite[4]; + // The next four octets will be the Optional Group Cipher Suite + OPTIONAL gp_cipher_suite[4]; // The IE *may* stop here; if there's any more, we should see two more // octets giving the number of Pairwise Cipher Suites OPTIONAL pwise_cipher_suite_count, 2; diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index ef88902dbf..e44bf95772 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -35,7 +35,7 @@ * * * This file was automatically generated by 'framesc' - * Tue Dec 19 17:58:19 2017 from the following file(s): + * Wed Dec 27 16:34:21 2017 from the following file(s): * * dot11f.frms * @@ -6688,7 +6688,7 @@ typedef struct sDot11fIERSN { #define DOT11F_EID_RSN (48) /* N.B. These #defines do *not* include the EID & length */ -#define DOT11F_IE_RSN_MIN_LEN (6) +#define DOT11F_IE_RSN_MIN_LEN (2) #define DOT11F_IE_RSN_MAX_LEN (130) diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index 4dd9e9ea04..f3d3716aa4 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1192,4 +1192,35 @@ static inline QDF_STATUS populate_dot11f_he_bss_color_change( return QDF_STATUS_SUCCESS; } #endif + +/** + * sir_unpack_rsn_ie: wrapper to uRSN IE and update def RSN params + * if optional fields are not present. + * @mac_ctx: mac context + * @buf: rsn ie buffer pointer + * @buf_len: rsn ie buffer length + * @rsn_ie: outframe rsn ie structure + * @append_ie: flag to indicate if the rsn_ie need to be appended from buf + * + * Return: parse status + */ +uint32_t sir_unpack_rsn_ie(tpAniSirGlobal mac_ctx, uint8_t *buf, + uint8_t buf_len, tDot11fIERSN *rsn_ie, + bool append_ie); + +/** + * sir_unpack_beacon_ie: wrapper to unpack beacon and update def RSN params + * if optional fields are not present. + * @mac_ctx: mac context + * @buf: beacon buffer pointer + * @buf_len: beacon buffer length + * @frame: outframe frame structure + * @append_ie: flag to indicate if the frame need to be appended from buf + * + * Return: parse status + */ +uint32_t sir_unpack_beacon_ie(tpAniSirGlobal mac_ctx, uint8_t *buf, + uint32_t buf_len, + tDot11fBeaconIEs *frame, bool append_ie); + #endif /* __PARSE_H__ */ diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index 947e6a317a..66a9f10708 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -777,7 +777,7 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx, if (assoc_req->rsnPresent) { if (assoc_req->rsn.length) { /* Unpack the RSN IE */ - if (dot11f_unpack_ie_rsn(mac_ctx, + if (sir_unpack_rsn_ie(mac_ctx, &assoc_req->rsn.info[0], assoc_req->rsn.length, &dot11f_ie_rsn, false) != diff --git a/core/mac/src/pe/lim/lim_process_fils.c b/core/mac/src/pe/lim/lim_process_fils.c index 1d6141a0aa..656de0d2a4 100644 --- a/core/mac/src/pe/lim/lim_process_fils.c +++ b/core/mac/src/pe/lim/lim_process_fils.c @@ -1074,7 +1074,7 @@ bool lim_process_fils_auth_frame2(tpAniSirGlobal mac_ctx, if (rx_auth_frm_body->authAlgoNumber != SIR_FILS_SK_WITHOUT_PFS) return false; - if (dot11f_unpack_ie_rsn(mac_ctx, + if (sir_unpack_rsn_ie(mac_ctx, &rx_auth_frm_body->rsn_ie.info[0], rx_auth_frm_body->rsn_ie.length, &dot11f_ie_rsn, 0) != DOT11F_PARSE_SUCCESS) { diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.c b/core/mac/src/pe/lim/lim_sme_req_utils.c index ef022d79d8..1d66be4f95 100644 --- a/core/mac/src/pe/lim/lim_sme_req_utils.c +++ b/core/mac/src/pe/lim/lim_sme_req_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -284,7 +284,7 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(tpAniSirGlobal mac_ctx, } else if ((rsn_ie->length == rsn_ie->rsnIEdata[1] + 2) && (rsn_ie->rsnIEdata[0] == SIR_MAC_RSN_EID)) { pe_debug("Only RSN IE is present"); - dot11f_unpack_ie_rsn(mac_ctx, &rsn_ie->rsnIEdata[2], + sir_unpack_rsn_ie(mac_ctx, &rsn_ie->rsnIEdata[2], (uint8_t) rsn_ie->length, &session->gStartBssRSNIe, false); } else if ((rsn_ie->length == rsn_ie->rsnIEdata[1] + 2) @@ -310,7 +310,7 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(tpAniSirGlobal mac_ctx, return false; } else { /* Both RSN and WPA IEs are present */ - dot11f_unpack_ie_rsn(mac_ctx, &rsn_ie->rsnIEdata[2], + sir_unpack_rsn_ie(mac_ctx, &rsn_ie->rsnIEdata[2], (uint8_t) rsn_ie->length, &session->gStartBssRSNIe, false); dot11f_unpack_ie_wpa(mac_ctx, &rsn_ie->rsnIEdata[wpa_idx + 6], diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index 0a264ed987..d1905c7765 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -33,7 +33,7 @@ * * * This file was automatically generated by 'framesc' - * Tue Dec 19 17:58:19 2017 from the following file(s): + * Wed Dec 27 16:34:21 2017 from the following file(s): * * dot11f.frms * @@ -4912,9 +4912,16 @@ uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx, pDst->present = 0; return status | DOT11F_BAD_FIXED_VALUE; } - DOT11F_MEMCPY(pCtx, pDst->gp_cipher_suite, pBuf, 4); - pBuf += 4; - ielen -= (uint8_t)4; + if (!ielen) { + pDst->pwise_cipher_suite_count = 0U; + pDst->akm_suite_count = 0U; + pDst->pmkid_count = 0U; + return 0U; + } else { + DOT11F_MEMCPY(pCtx, pDst->gp_cipher_suite, pBuf, 4); + pBuf += 4; + ielen -= (uint8_t)4; + } if (!ielen) { pDst->pwise_cipher_suite_count = 0U; pDst->akm_suite_count = 0U; @@ -7623,7 +7630,7 @@ static const tIEDefn IES_Beacon[] = { present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fBeacon, RSN), offsetof(tDot11fIERSN, present), 0, "RSN", - 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, { offsetof(tDot11fBeacon, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, 0, }, @@ -8070,7 +8077,7 @@ static const tIEDefn IES_BeaconIEs[] = { 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fBeaconIEs, RSN), offsetof(tDot11fIERSN, present), 0, - "RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, { offsetof(tDot11fBeaconIEs, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, 0, }, @@ -9421,7 +9428,7 @@ static const tIEDefn IES_TDLSDisRsp[] = { "SuppOperatingClasses", 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, 0, }, { offsetof(tDot11fTDLSDisRsp, RSN), offsetof(tDot11fIERSN, present), 0, - "RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, { offsetof(tDot11fTDLSDisRsp, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, @@ -9552,7 +9559,7 @@ static const tFFDefn FFS_TDLSSetupCnf[] = { static const tIEDefn IES_TDLSSetupCnf[] = { { offsetof(tDot11fTDLSSetupCnf, RSN), offsetof(tDot11fIERSN, present), 0, - "RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, { offsetof(tDot11fTDLSSetupCnf, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, @@ -9627,7 +9634,7 @@ static const tIEDefn IES_TDLSSetupReq[] = { 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0, - "RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, { offsetof(tDot11fTDLSSetupReq, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, @@ -9716,7 +9723,7 @@ static const tIEDefn IES_TDLSSetupRsp[] = { 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0, - "RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, { offsetof(tDot11fTDLSSetupRsp, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, @@ -13130,7 +13137,11 @@ uint32_t dot11f_get_packed_iersn(tpAniSirGlobal pCtx, (void)pCtx; while (pIe->present) { *pnNeeded += 2; - *pnNeeded += 4; + if (pIe->gp_cipher_suite) { + *pnNeeded += 4; + } else { + break; + } if (pIe->pwise_cipher_suite_count) { *pnNeeded += 2; } else { @@ -21457,9 +21468,13 @@ uint32_t dot11f_pack_ie_rsn(tpAniSirGlobal pCtx, frameshtons(pCtx, pBuf, pSrc->version, 0); *pnConsumed += 2; pBuf += 2; - DOT11F_MEMCPY(pCtx, pBuf, pSrc->gp_cipher_suite, 4); - *pnConsumed += 4; - pBuf += 4; + if (pSrc->gp_cipher_suite) { + DOT11F_MEMCPY(pCtx, pBuf, pSrc->gp_cipher_suite, 4); + *pnConsumed += 4; + pBuf += 4; + } else { + break; + } if (pSrc->pwise_cipher_suite_count) { frameshtons(pCtx, pBuf, pSrc->pwise_cipher_suite_count, 0); *pnConsumed += 2; diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index 9eb516e1f4..750c30ef32 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -53,6 +53,8 @@ #include "wlan_utility.h" #include "wifi_pos_api.h" + +#define RSN_OUI_SIZE 4 /* ////////////////////////////////////////////////////////////////////// */ void swap_bit_field16(uint16_t in, uint16_t *out) { @@ -1497,7 +1499,7 @@ populate_dot11f_rsn(tpAniSirGlobal pMac, if (pRsnIe->length) { idx = find_ie_location(pMac, pRsnIe, DOT11F_EID_RSN); if (0 <= idx) { - status = dot11f_unpack_ie_rsn(pMac, pRsnIe->rsnIEdata + idx + 2, /* EID, length */ + status = sir_unpack_rsn_ie(pMac, pRsnIe->rsnIEdata + idx + 2, /* EID, length */ pRsnIe->rsnIEdata[idx + 1], pDot11f, false); if (DOT11F_FAILED(status)) { @@ -3388,7 +3390,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, } qdf_mem_zero(pBies, sizeof(tDot11fBeaconIEs)); /* delegate to the framesc-generated code, */ - status = dot11f_unpack_beacon_i_es(pMac, pPayload, nPayload, + status = sir_unpack_beacon_ie(pMac, pPayload, nPayload, pBies, false); if (DOT11F_FAILED(status)) { @@ -3666,6 +3668,72 @@ static inline void update_bss_color_change_from_beacon_ies( {} #endif +/** + * sir_update_def_rsn_params: Update def RSN params if optional fields are + * not present. + * @rsn_ie: RSN ie structure + * + * Check if the RSN IE contain optional params and if not fill with the + * default values + * + * Return: void + */ +static void sir_update_def_rsn_params(tDot11fIERSN *rsn_ie) +{ + uint8_t zero_gp_cipher_suite[RSN_OUI_SIZE] = {0x00, 0x00, 0x00, 0x00}; + uint8_t def_cipher_suite[RSN_OUI_SIZE] = {0x00, 0x0f, 0xac, 0x04}; + uint8_t def_akm_suite[RSN_OUI_SIZE] = {0x00, 0x0f, 0xac, 0x01}; + + if (!qdf_mem_cmp(rsn_ie->gp_cipher_suite, zero_gp_cipher_suite, + RSN_OUI_SIZE)) { + qdf_mem_copy(rsn_ie->gp_cipher_suite, def_cipher_suite, + RSN_OUI_SIZE); + rsn_ie->pwise_cipher_suite_count = 1; + qdf_mem_copy(rsn_ie->pwise_cipher_suites, def_cipher_suite, + RSN_OUI_SIZE); + rsn_ie->akm_suite_count = 1; + qdf_mem_copy(rsn_ie->akm_suites, def_akm_suite, RSN_OUI_SIZE); + } else if (!rsn_ie->pwise_cipher_suite_count) { + rsn_ie->pwise_cipher_suite_count = 1; + qdf_mem_copy(rsn_ie->pwise_cipher_suites, def_cipher_suite, + RSN_OUI_SIZE); + rsn_ie->akm_suite_count = 1; + qdf_mem_copy(rsn_ie->akm_suites, def_akm_suite, RSN_OUI_SIZE); + + } else if (!rsn_ie->akm_suite_count) { + rsn_ie->akm_suite_count = 1; + qdf_mem_copy(rsn_ie->akm_suites, def_akm_suite, RSN_OUI_SIZE); + } +} + +uint32_t sir_unpack_rsn_ie(tpAniSirGlobal mac_ctx, uint8_t *buf, + uint8_t buf_len, tDot11fIERSN *rsn_ie, + bool append_ie) +{ + uint32_t status; + + status = dot11f_unpack_ie_rsn(mac_ctx, buf, buf_len, rsn_ie, append_ie); + + if (rsn_ie->present) + sir_update_def_rsn_params(rsn_ie); + + return status; +} + +uint32_t sir_unpack_beacon_ie(tpAniSirGlobal mac_ctx, uint8_t *buf, + uint32_t buf_len, tDot11fBeaconIEs *frame, bool append_ie) +{ + uint32_t status; + + status = dot11f_unpack_beacon_i_es(mac_ctx, buf, buf_len, + frame, append_ie); + + if (frame->RSN.present) + sir_update_def_rsn_params(&frame->RSN); + + return status; +} + tSirRetStatus sir_parse_beacon_ie(tpAniSirGlobal pMac, tpSirProbeRespBeacon pBeaconStruct, @@ -3684,7 +3752,7 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, } qdf_mem_zero(pBies, sizeof(tDot11fBeaconIEs)); /* delegate to the framesc-generated code, */ - status = dot11f_unpack_beacon_i_es(pMac, pPayload, nPayload, + status = sir_unpack_beacon_ie(pMac, pPayload, nPayload, pBies, false); if (DOT11F_FAILED(status)) { diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index bbee8f3f45..ab1a3bbe57 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -2007,4 +2007,19 @@ int sme_get_bss_transition_status(tHalHandle hal, uint16_t n_candidates, bool is_bt_in_progress); +/** + * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params + * if optional fields are not present. + * @hal: handle returned by mac_open + * @buf: rsn ie buffer pointer + * @buf_len: rsn ie buffer length + * @rsn_ie: outframe rsn ie structure + * @append_ie: flag to indicate if the rsn_ie need to be appended from buf + * + * Return: parse status + */ +uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf, + uint8_t buf_len, tDot11fIERSN *rsn_ie, + bool append_ie); + #endif /* #if !defined( __SME_API_H ) */ diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index adcce7bd55..1bd1a57b6a 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -15825,6 +15825,15 @@ static bool sme_get_status_for_candidate(tHalHandle *hal, return false; } +uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf, + uint8_t buf_len, tDot11fIERSN *rsn_ie, + bool append_ie) +{ + tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); + + return sir_unpack_rsn_ie(mac_ctx, buf, buf_len, rsn_ie, append_ie); +} + /** * wlan_hdd_get_bss_transition_status() - get bss transition status all cadidates * @adapter : Pointer to adapter diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 6dd3e88f59..68b3156b02 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -1752,7 +1752,7 @@ QDF_STATUS csr_parse_bss_description_ies(tHalHandle hHal, GET_FIELD_OFFSET(tSirBssDescription, ieFields)); if (ieLen > 0 && pIEStruct) { - if (!DOT11F_FAILED(dot11f_unpack_beacon_i_es + if (!DOT11F_FAILED(sir_unpack_beacon_ie (pMac, (uint8_t *) pBssDesc->ieFields, ieLen, pIEStruct, false))) status = QDF_STATUS_SUCCESS; @@ -3388,6 +3388,7 @@ static bool csr_get_rsn_information(tHalHandle hal, tCsrAuthList *auth_type, CSR_RSN_OUI_SIZE); c_ucast_cipher = (uint8_t) (rsn_ie->pwise_cipher_suite_count); + c_auth_suites = (uint8_t) (rsn_ie->akm_suite_count); for (i = 0; i < c_auth_suites && i < CSR_RSN_MAX_AUTH_SUITES; i++) { qdf_mem_copy((void *)&authsuites[i], @@ -3889,7 +3890,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, * the AP, so that only common capability are enabled. */ if (pProfile->pRSNReqIE && pProfile->nRSNReqIELength) { - dot11f_unpack_ie_rsn(pMac, pProfile->pRSNReqIE + 2, + sir_unpack_rsn_ie(pMac, pProfile->pRSNReqIE + 2, pProfile->nRSNReqIELength -2, &rsn_ie, false); pIesLocal->RSN.RSN_Cap[0] = pIesLocal->RSN.RSN_Cap[0] & rsn_ie.RSN_Cap[0];