From 0477ee3aeccdd04f17ed925cbdb29e27ce4ba58b Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Fri, 10 Feb 2017 20:02:03 +0800 Subject: [PATCH] qcacld-3.0: fix compilation error related with FEATURE_WLAN_ESE Some FEATURE_WLAN_ESE feature related code are not embraced by macro FEATURE_WLAN_ESE, which will cause compilation error if FEATURE_WLAN_ESE is not enabled Embraced FEATURE_WLAN_ESE feature related code with macro FEATURE_WLAN_ESE Change-Id: Iab843b6f48b81e2ddaf8a52e771b49d38482e184 CRs-Fixed: 2007111 --- core/mac/src/pe/lim/lim_api.c | 17 ++++++++++++++--- core/sme/src/csr/csr_api_roam.c | 25 +++++++++++++++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 6ffcf6ac1e7f..fe6e0767dfc3 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2089,8 +2089,15 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, curr_sta_ds->nss = local_nss; ft_session_ptr->limMlmState = eLIM_MLM_LINK_ESTABLISHED_STATE; lim_init_tdls_data(mac_ctx, ft_session_ptr); - join_rsp_len = ft_session_ptr->RICDataLen + ft_session_ptr->tspecLen + + join_rsp_len = ft_session_ptr->RICDataLen + sizeof(tSirSmeJoinRsp) - sizeof(uint8_t); + +#ifdef FEATURE_WLAN_ESE + join_rsp_len += ft_session_ptr->tspecLen; + lim_log(mac_ctx, LOG1, FL("tspecLen = %d"), + ft_session_ptr->tspecLen); +#endif + roam_sync_ind_ptr->join_rsp = qdf_mem_malloc(join_rsp_len); if (NULL == roam_sync_ind_ptr->join_rsp) { lim_log(mac_ctx, LOGE, FL("LFR3:mem alloc failed")); @@ -2101,8 +2108,8 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, return QDF_STATUS_E_NOMEM; } - lim_log(mac_ctx, LOG1, FL("Session RicLength = %d tspecLen = %d"), - ft_session_ptr->RICDataLen, ft_session_ptr->tspecLen); + lim_log(mac_ctx, LOG1, FL("Session RicLength = %d"), + ft_session_ptr->RICDataLen); if (ft_session_ptr->ricData != NULL) { roam_sync_ind_ptr->join_rsp->parsedRicRspLen = ft_session_ptr->RICDataLen; @@ -2113,6 +2120,8 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, ft_session_ptr->ricData = NULL; ft_session_ptr->RICDataLen = 0; } + +#ifdef FEATURE_WLAN_ESE if (ft_session_ptr->tspecIes != NULL) { roam_sync_ind_ptr->join_rsp->tspecIeLen = ft_session_ptr->tspecLen; @@ -2124,6 +2133,8 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, ft_session_ptr->tspecIes = NULL; ft_session_ptr->tspecLen = 0; } +#endif + roam_sync_ind_ptr->join_rsp->vht_channel_width = ft_session_ptr->ch_width; roam_sync_ind_ptr->join_rsp->staId = curr_sta_ds->staIndex; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 8c3752daff84..ed6660f43522 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -17530,8 +17530,11 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx, = {MIN_TX_PWR_CAP, MAX_TX_PWR_CAP}; uint8_t max_tx_pwr_cap = 0; uint8_t supp_chan_ie[DOT11F_IE_SUPPCHANNELS_MAX_LEN], supp_chan_ie_len; + +#ifdef FEATURE_WLAN_ESE uint8_t ese_ie[DOT11F_IE_ESEVERSION_MAX_LEN] = { 0x0, 0x40, 0x96, 0x3, ESE_VERSION_SUPPORTED}; +#endif if (session->pConnectBssDesc) max_tx_pwr_cap = csr_get_cfg_max_tx_power(mac_ctx, @@ -17557,11 +17560,13 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx, supp_chan_ie_len, supp_chan_ie); } +#ifdef FEATURE_WLAN_ESE /* Append ESE version IE if isEseIniFeatureEnabled INI is enabled */ if (mac_ctx->roam.configParam.isEseIniFeatureEnabled) csr_append_assoc_ies(mac_ctx, req_buf, IEEE80211_ELEMID_VENDOR, DOT11F_IE_ESEVERSION_MAX_LEN, ese_ie); +#endif if (mac_ctx->rrm.rrmPEContext.rrmEnable) { /* Append RRM IE */ @@ -19629,7 +19634,10 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, csr_roam_save_security_rsp_ie(mac_ctx, session_id, session->pCurRoamProfile->negotiatedAuthType, bss_desc, ies_local); + +#ifdef FEATURE_WLAN_ESE roam_info->isESEAssoc = conn_profile->isESEAssoc; +#endif /* * Encryption keys for new connection are obtained as follows: @@ -19701,12 +19709,18 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, FL("LFR3:Clear Connected info")); csr_roam_free_connected_info(mac_ctx, &session->connectedInfo); - len = roam_synch_data->join_rsp->parsedRicRspLen + - roam_synch_data->join_rsp->tspecIeLen; + len = roam_synch_data->join_rsp->parsedRicRspLen; + +#ifdef FEATURE_WLAN_ESE + len += roam_synch_data->join_rsp->tspecIeLen; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("LFR3: RIC length - %d tspecLen %d"), - roam_synch_data->join_rsp->parsedRicRspLen, + FL("LFR3: tspecLen %d"), roam_synch_data->join_rsp->tspecIeLen); +#endif + + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + FL("LFR3: RIC length - %d"), + roam_synch_data->join_rsp->parsedRicRspLen); if (len) { session->connectedInfo.pbFrames = qdf_mem_malloc(len); @@ -19715,8 +19729,11 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, roam_synch_data->join_rsp->frames, len); session->connectedInfo.nRICRspLength = roam_synch_data->join_rsp->parsedRicRspLen; + +#ifdef FEATURE_WLAN_ESE session->connectedInfo.nTspecIeLength = roam_synch_data->join_rsp->tspecIeLen; +#endif } } conn_profile->vht_channel_width =