mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Fix remaining compilation issues regarding WLAN_FEATURE_11W
When CONFIG_WLAN_FEATURE_11W is disabled, compilation of lahaina still fails in a few areas. Even though CONFIG_WLAN_FEATURE_11W should be always be enabled now, add appropriate fixes for the compilation issues in the event that CONFIG_WLAN_FEATURE_11W is disabled. Change-Id: I1743678df6b66a63160795374de7969f313f55d9 CRs-Fixed: 2601362
This commit is contained in:
parent
4939176a06
commit
9fcd4d39f9
10 changed files with 89 additions and 22 deletions
|
|
@ -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) {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) ||
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue