diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 801b1c67ecc6..90fee3275e39 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -5267,15 +5267,22 @@ bool hdd_is_fils_connection(struct hdd_adapter *adapter) * * Return: 0 on success, error number otherwise */ +#ifdef WLAN_FEATURE_11W static int32_t hdd_process_genie(struct hdd_adapter *adapter, u8 *bssid, eCsrEncryptionType *encrypt_type, eCsrEncryptionType *mc_encrypt_type, enum csr_akm_type *auth_type, -#ifdef WLAN_FEATURE_11W uint8_t *mfp_required, uint8_t *mfp_capable, -#endif uint16_t gen_ie_len, uint8_t *gen_ie) +#else +static int32_t hdd_process_genie(struct hdd_adapter *adapter, + u8 *bssid, + eCsrEncryptionType *encrypt_type, + eCsrEncryptionType *mc_encrypt_type, + enum csr_akm_type *auth_type, + uint16_t gen_ie_len, uint8_t *gen_ie) +#endif { mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter); tDot11fIERSN dot11_rsn_ie = {0}; @@ -5484,6 +5491,45 @@ static void hdd_set_mfp_enable(struct csr_roam_profile *roam_profile) } #endif +#ifdef WLAN_FEATURE_11W +static uint32_t wlan_hdd_process_genie(struct hdd_adapter *adapter, + u8 *bssid, + eCsrEncryptionType *encrypt_type, + eCsrEncryptionType *mc_encrypt_type, + enum csr_akm_type *auth_type, + uint8_t *mfp_required, + uint8_t *mfp_capable, + uint16_t gen_ie_len, uint8_t *gen_ie) +{ + uint32_t status; + + status = hdd_process_genie(adapter, bssid, + encrypt_type, mc_encrypt_type, + auth_type, mfp_required, mfp_capable, + gen_ie_len, gen_ie); + + return status; +} +#else +static uint32_t wlan_hdd_process_genie(struct hdd_adapter *adapter, + u8 *bssid, + eCsrEncryptionType *encrypt_type, + eCsrEncryptionType *mc_encrypt_type, + enum csr_akm_type *auth_type, + uint8_t *mfp_required, + uint8_t *mfp_capable, + uint16_t gen_ie_len, uint8_t *gen_ie) +{ + uint32_t status; + + status = hdd_process_genie(adapter, bssid, + encrypt_type, mc_encrypt_type, + auth_type, gen_ie_len, gen_ie); + + return status; +} +#endif + /** * hdd_set_genie_to_csr() - set genie to csr * @adapter: pointer to adapter @@ -5519,12 +5565,12 @@ int hdd_set_genie_to_csr(struct hdd_adapter *adapter, /* The actual processing may eventually be more extensive than this. */ /* Right now, just consume any PMKIDs that are sent in by the app. */ - status = hdd_process_genie(adapter, bssid, - &rsn_encrypt_type, - &mc_rsn_encrypt_type, rsn_auth_type, - &mfp_required, &mfp_capable, - security_ie[1] + 2, - security_ie); + status = wlan_hdd_process_genie(adapter, bssid, + &rsn_encrypt_type, + &mc_rsn_encrypt_type, rsn_auth_type, + &mfp_required, &mfp_capable, + security_ie[1] + 2, + security_ie); if (status == 0) { /* 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 1225c377065b..d0853cd2282e 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 @@ -907,7 +907,7 @@ static enum mac_status_code lim_check_wpa_ie(struct pe_session *session, * * Return: mac_status_code */ -#ifdef WLAN_FEATURE_SAE +#if defined(WLAN_FEATURE_SAE) && defined(WLAN_FEATURE_11W) static enum mac_status_code lim_check_sae_pmf_cap(struct pe_session *session, tDot11fIERSN *rsn, enum ani_akm_type akm_type) diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c index ebe7154999bd..f3842fe95ec2 100644 --- a/core/mac/src/pe/lim/lim_process_deauth_frame.c +++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -75,11 +75,13 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo, pBody = WMA_GET_RX_MPDU_DATA(pRxPacketInfo); frame_rssi = (int32_t)WMA_GET_RX_RSSI_NORMALIZED(pRxPacketInfo); +#ifdef WLAN_FEATURE_11W frameLen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); if (frameLen < sizeof(reasonCode)) { pe_err("Deauth Frame length invalid %d", frameLen); return ; } +#endif if (LIM_IS_STA_ROLE(pe_session) && ((eLIM_SME_WT_DISASSOC_STATE == pe_session->limSmeState) || diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index ded00ef3b04b..c0e03a3d67f5 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -162,6 +162,19 @@ void lim_process_mlm_req_messages(struct mac_context *mac_ctx, } /* switch (msg->type) */ } +#ifdef WLAN_FEATURE_11W +static void update_rmfEnabled(struct bss_params *addbss_param, + struct pe_session *session) +{ + addbss_param->rmfEnabled = session->limRmfEnabled; +} +#else +static void update_rmfEnabled(struct bss_params *addbss_param, + struct pe_session *session) +{ +} +#endif + /** * lim_mlm_add_bss() - HAL interface for WMA_ADD_BSS_REQ * @mac_ctx: global MAC context @@ -213,7 +226,7 @@ lim_mlm_add_bss(struct mac_context *mac_ctx, addbss_param->vhtCapable = mlm_start_req->htCapable; addbss_param->htCapable = session->vhtCapability; addbss_param->ch_width = session->ch_width; - addbss_param->rmfEnabled = session->limRmfEnabled; + update_rmfEnabled(addbss_param, session); addbss_param->staContext.fShortGI20Mhz = lim_get_ht_capability(mac_ctx, eHT_SHORT_GI_20MHZ, session); addbss_param->staContext.fShortGI40Mhz = diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index bdc412a1e837..90edf5239253 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1498,9 +1498,8 @@ void csr_update_pmf_cap_from_connected_profile(tCsrRoamConnectedProfile *profile, struct scan_filter *filter); #else -inline void +void csr_update_pmf_cap_from_connected_profile(tCsrRoamConnectedProfile *profile, - struct scan_filter *filter) -{} + struct scan_filter *filter); #endif #endif diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index 3ed517afbea6..d45f3ade27c8 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -333,6 +333,11 @@ csr_update_pmf_cap_from_connected_profile(tCsrRoamConnectedProfile *profile, if (profile->MFPRequired) filter->pmf_cap = WLAN_PMF_REQUIRED; } +#else +void +csr_update_pmf_cap_from_connected_profile(tCsrRoamConnectedProfile *profile, + struct scan_filter *filter) +{} #endif QDF_STATUS diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index a29483761b53..a4f49fcd5a15 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -2627,6 +2627,7 @@ bool csr_is_profile_wapi(struct csr_roam_profile *pProfile) } #endif /* FEATURE_WLAN_WAPI */ +#ifdef WLAN_FEATURE_11W static bool csr_is_wpa_oui_equal(struct mac_context *mac, uint8_t *Oui1, uint8_t *Oui2) { @@ -2686,6 +2687,7 @@ static bool csr_is_group_mgmt_gmac_256(struct mac_context *mac, return csr_is_oui_match(mac, AllSuites, cAllSuites, csr_group_mgmt_oui[ENUM_GMAC_256], Oui); } +#endif bool csr_is_pmkid_found_for_peer(struct mac_context *mac, struct csr_roam_session *session, diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 7ee60ee88a63..516aaac656e4 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -632,7 +632,6 @@ struct wma_version_info { u_int32_t revision; }; -#ifdef WLAN_FEATURE_11W #define CMAC_IPN_LEN (6) #define WMA_IGTK_KEY_INDEX_4 (4) #define WMA_IGTK_KEY_INDEX_5 (5) @@ -663,7 +662,6 @@ typedef struct { wma_igtk_ipn_t key_id[2]; uint32_t key_cipher; } wma_igtk_key_t; -#endif struct roam_synch_frame_ind { uint32_t bcn_probe_rsp_len; @@ -759,9 +757,7 @@ struct wma_txrx_node { tAddStaParams *addBssStaContext; uint8_t aid; uint8_t rmfEnabled; -#ifdef WLAN_FEATURE_11W wma_igtk_key_t key; -#endif /* WLAN_FEATURE_11W */ uint32_t uapsd_cached_val; void *del_staself_req; bool is_del_sta_defered; diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index 990bfa072bd5..1e8724f22a6f 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -2374,6 +2374,7 @@ static void wma_update_tx_send_params(struct tx_send_params *tx_param, tx_param->preamble_type); } +#ifdef WLAN_FEATURE_11W uint8_t *wma_get_igtk(struct wma_txrx_node *iface, uint16_t *key_len) { struct wlan_crypto_key *crypto_key; @@ -2388,6 +2389,7 @@ uint8_t *wma_get_igtk(struct wma_txrx_node *iface, uint16_t *key_len) return &crypto_key->keyval[0]; } +#endif QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, eFrameType frmType, eFrameTxDir txDir, uint8_t tid, @@ -2411,6 +2413,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, uint8_t *pFrame = NULL; void *pPacket = NULL; uint16_t newFrmLen = 0; + uint8_t *igtk; + uint16_t key_len; #endif /* WLAN_FEATURE_11W */ struct wma_txrx_node *iface; struct mac_context *mac; @@ -2424,8 +2428,6 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, void *mac_addr; bool is_5g = false; uint8_t pdev_id; - uint8_t *igtk; - uint16_t key_len; if (!wma_handle) { WMA_LOGE("wma_handle is NULL"); diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 4013d7bf2234..039d2474ad43 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -3140,6 +3140,7 @@ rel_peer_ref: return ret; } +#ifdef WLAN_FEATURE_11W /** * wma_process_bip() - process mmie in rmf frame * @wma_handle: wma handle @@ -3250,6 +3251,7 @@ int wma_process_bip(tp_wma_handle wma_handle, return 0; } +#endif /** * wma_process_rmf_frame() - process rmf frame