qcacld-3.0: Code cleanup for connection manager in LIM/WMA

Remove unused code related to ndef FEATURE_CM_ENABLE in LIM/WMA.

Change-Id: I1697f0a6c9102e3b70ce6f7a1c78ea895d4d160b
CRs-Fixed: 2977902
This commit is contained in:
Abhishek Singh
2021-05-27 19:43:14 +05:30
committed by Madan Koyyalamudi
parent 1d037f5650
commit 046eb026ea
31 changed files with 17 additions and 2148 deletions

View File

@@ -74,7 +74,6 @@ target_if_cm_roam_send_vdev_set_pcl_cmd(struct wlan_objmgr_vdev *vdev,
return wmi_unified_vdev_set_pcl_cmd(wmi_handle, &params);
}
#ifdef FEATURE_CM_ENABLE
/**
* target_if_cm_roam_send_roam_invoke_cmd - Send roam invoke command to wmi.
* @vdev: VDEV object pointer
@@ -113,16 +112,13 @@ target_if_cm_roam_send_roam_sync_complete(struct wlan_objmgr_vdev *vdev)
return wmi_unified_roam_synch_complete_cmd(wmi_handle,
wlan_vdev_get_id(vdev));
}
#endif
static void
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{
tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd;
#ifdef FEATURE_CM_ENABLE
tx_ops->send_roam_invoke_cmd = target_if_cm_roam_send_roam_invoke_cmd;
tx_ops->send_roam_sync_complete_cmd = target_if_cm_roam_send_roam_sync_complete;
#endif
}
#else
static inline void

View File

@@ -61,9 +61,6 @@ uint8_t *mac_trace_get_info_log_string(uint16_t infoLog);
#endif
uint8_t *mac_trace_get_wma_msg_string(uint16_t wmaMsg);
#ifndef FEATURE_CM_ENABLE
uint8_t *mac_trace_get_neighbour_roam_state(uint16_t neighbourRoamState);
#endif
uint8_t *mac_trace_getcsr_roam_state(uint16_t csr_roamState);
uint8_t *mac_trace_getcsr_roam_sub_state(uint16_t csr_roamSubState);
uint8_t *mac_trace_get_lim_sme_state(uint16_t limState);

View File

@@ -532,29 +532,6 @@ struct bss_description;
struct roam_offload_synch_ind;
struct roam_pmkid_req_event;
#ifndef FEATURE_CM_ENABLE
/**
* typedef csr_roam_synch_fn_t - CSR roam synch callback routine pointer
* @mac: Global MAC context
* @roam_synch_data: Structure with roam synch parameters
* @bss_desc_ptr: BSS descriptor pointer
* @reason: Reason for calling the callback
*
* This type is for callbacks registered with WMA and used after roaming
* in firmware. The call to this routine completes the roam synch
* propagation at both CSR and HDD levels. The HDD level propagation
* is achieved through the already defined callback for assoc completion
* handler.
*
* Return: Success or Failure.
*/
typedef QDF_STATUS
(*csr_roam_synch_fn_t)(struct mac_context *mac,
struct roam_offload_synch_ind *roam_synch_data,
struct bss_description *bss_desc_ptr,
enum sir_roam_op_code reason);
#endif
/**
* typedef pe_roam_synch_fn_t - PE roam synch callback routine pointer
* @mac_ctx: Global MAC context
@@ -596,9 +573,6 @@ typedef QDF_STATUS
struct sme_ready_req {
uint16_t messageType; /* eWNI_SME_SYS_READY_IND */
uint16_t length;
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb;
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
uint8_t vdev_id,
struct qdf_mac_addr bssid);
@@ -1016,21 +990,6 @@ typedef struct sEsePEContext {
/* Warning Do not add any new param in this struct */
struct join_req {
#ifndef FEATURE_CM_ENABLE
uint16_t messageType; /* eWNI_SME_JOIN_REQ */
uint16_t length;
uint8_t vdev_id;
tSirMacSSid ssId;
tAniEdType UCEncryptionType;
enum ani_akm_type akm;
bool wps_registration;
bool isOSENConnection;
bool force_24ghz_in_ht20;
#ifdef FEATURE_WLAN_ESE
tESETspecInfo eseTspecInfo;
#endif
bool force_rsne_override;
#endif /* FEATURE_CM_ENABLE */
tSirRSNie rsnIE;
tSirAddie addIEScan;
tSirAddie addIEAssoc;
@@ -1044,61 +1003,6 @@ struct join_req {
*/
};
#ifndef FEATURE_CM_ENABLE
/* / Definition for response message to previously issued join request */
/* / MAC ---> */
struct join_rsp {
uint16_t messageType; /* eWNI_SME_JOIN_RSP */
uint16_t length;
uint8_t vdev_id; /* Session ID */
tSirResultCodes status_code;
uint32_t vht_channel_width;
/* It holds reasonCode when join fails due to deauth/disassoc frame.
* Otherwise it holds status code.
*/
uint16_t protStatusCode;
uint32_t beaconLength;
uint32_t assocReqLength;
uint32_t assocRspLength;
uint32_t parsedRicRspLen;
uint8_t uapsd_mask;
#ifdef FEATURE_WLAN_ESE
uint32_t tspecIeLen;
#endif
uint32_t staId; /* Station ID for peer */
/*Timing measurement capability */
uint8_t timingMeasCap;
#ifdef FEATURE_WLAN_TDLS
/* TDLS prohibited and TDLS channel switch prohibited are set as
* per ExtCap IE in received assoc/re-assoc response from AP
*/
bool tdls_prohibited;
bool tdls_chan_swit_prohibited;
#endif
uint8_t nss;
uint32_t max_rate_flags;
tDot11fIEHTCaps ht_caps;
tDot11fIEVHTCaps vht_caps;
tDot11fIEHTInfo ht_operation;
tDot11fIEVHTOperation vht_operation;
#ifdef WLAN_FEATURE_11AX
tDot11fIEhe_op he_operation;
#endif
tDot11fIEhs20vendor_ie hs20vendor_ie;
bool is_fils_connection;
uint16_t fils_seq_num;
#ifdef WLAN_FEATURE_FILS_SK
struct fils_join_rsp_params *fils_join_rsp;
#endif
uint8_t frames[1];
#ifdef WLAN_FEATURE_11BE
tDot11fIEeht_op eht_operation;
#endif
};
#endif
struct oem_channel_info {
uint32_t mhz;
uint32_t band_center_freq1;
@@ -2182,15 +2086,6 @@ struct sir_antenna_mode_resp {
enum set_antenna_mode_status status;
};
#ifndef FEATURE_CM_ENABLE
/* / Definition for Candidate found indication from FW */
typedef struct sSirSmeCandidateFoundInd {
uint16_t messageType; /* eWNI_SME_CANDIDATE_FOUND_IND */
uint16_t length;
uint8_t sessionId; /* Session Identifier */
} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
#endif
typedef struct sSirWlanExcludeUnencryptParam {
bool excludeUnencrypt;
struct qdf_mac_addr bssid;
@@ -2566,19 +2461,6 @@ typedef struct {
} tSirStatsExtEvent, *tpSirStatsExtEvent;
#endif
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
struct handoff_failure_ind {
uint8_t vdev_id;
struct qdf_mac_addr bssid;
};
struct roam_offload_synch_fail {
uint8_t session_id;
};
#endif
#endif
/**
* struct sir_wisa_params - WISA Mode Parameters
* @mode: WISA mode

View File

@@ -87,11 +87,6 @@ enum eWniMsgTypes {
/* unused SIR_SME_MSG_TYPES_BEGIN + 47, */
/* unused SIR_SME_MSG_TYPES_BEGIN + 48, */
#ifndef FEATURE_CM_ENABLE
eWNI_SME_FT_PRE_AUTH_REQ = SIR_SME_MSG_TYPES_BEGIN + 49,
eWNI_SME_FT_PRE_AUTH_RSP = SIR_SME_MSG_TYPES_BEGIN + 50,
#endif
eWNI_SME_FT_AGGR_QOS_REQ = SIR_SME_MSG_TYPES_BEGIN + 52,
eWNI_SME_FT_AGGR_QOS_RSP = SIR_SME_MSG_TYPES_BEGIN + 53,
@@ -122,14 +117,6 @@ enum eWniMsgTypes {
#ifdef WLAN_FEATURE_GTK_OFFLOAD
eWNI_PMC_GTK_OFFLOAD_GETINFO_RSP = SIR_SME_MSG_TYPES_BEGIN + 75,
#endif /* WLAN_FEATURE_GTK_OFFLOAD */
#ifndef FEATURE_CM_ENABLE
/*ROAM candidate indication from FW */
eWNI_SME_CANDIDATE_FOUND_IND = SIR_SME_MSG_TYPES_BEGIN + 76,
/*upper layer requested handoff to driver in STA mode */
eWNI_SME_HANDOFF_REQ = SIR_SME_MSG_TYPES_BEGIN + 77,
/*Fwd the LFR scan offload rsp from FW to SME */
eWNI_SME_ROAM_SCAN_OFFLOAD_RSP = SIR_SME_MSG_TYPES_BEGIN + 78,
#endif
eWNI_SME_GET_TSM_STATS_REQ = SIR_SME_MSG_TYPES_BEGIN + 80,
eWNI_SME_GET_TSM_STATS_RSP = SIR_SME_MSG_TYPES_BEGIN + 81,
eWNI_SME_TSM_IE_IND = SIR_SME_MSG_TYPES_BEGIN + 82,
@@ -161,12 +148,6 @@ enum eWniMsgTypes {
#ifdef QCA_HT_2040_COEX
eWNI_SME_SET_HT_2040_MODE = SIR_SME_MSG_TYPES_BEGIN + 96,
#endif
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/* Hand Off Failure Ind from WMA to SME */
eWNI_SME_HO_FAIL_IND = SIR_SME_MSG_TYPES_BEGIN + 97,
#endif
#endif
#ifdef WLAN_FEATURE_NAN
eWNI_SME_NAN_EVENT = SIR_SME_MSG_TYPES_BEGIN + 98,
#endif
@@ -208,9 +189,6 @@ enum eWniMsgTypes {
eWNI_SME_SEND_DISASSOC_FRAME = SIR_SME_MSG_TYPES_BEGIN + 129,
eWNI_SME_UPDATE_ACCESS_POLICY_VENDOR_IE = SIR_SME_MSG_TYPES_BEGIN + 130,
eWNI_SME_DEFAULT_SCAN_IE = SIR_SME_MSG_TYPES_BEGIN + 131,
#ifndef FEATURE_CM_ENABLE
eWNI_SME_ROAM_INVOKE = SIR_SME_MSG_TYPES_BEGIN + 132,
#endif
/* 133 unused */
eWNI_SME_LOST_LINK_INFO_IND = SIR_SME_MSG_TYPES_BEGIN + 134,
eWNI_SME_DEL_ALL_TDLS_PEERS = SIR_SME_MSG_TYPES_BEGIN + 135,

View File

@@ -497,12 +497,6 @@ enum halmsgtype {
#endif /* DHCP_SERVER_OFFLOAD */
SIR_HAL_LED_FLASHING_REQ = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 223),
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
SIR_HAL_ROAM_OFFLOAD_SYNCH_FAIL = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 226),
SIR_HAL_ROAM_INVOKE = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 227),
#endif
#endif
/*= (SIR_HAL_ITC_MSG_TYPES_BEGIN + 228), is unused */
SIR_HAL_SET_MAS = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 229),

View File

@@ -80,7 +80,6 @@ bool lim_is_valid_fils_auth_frame(struct mac_context *mac_ctx,
QDF_STATUS lim_create_fils_rik(uint8_t *rrk, uint8_t rrk_len,
uint8_t *rik, uint32_t *rik_len);
#ifdef FEATURE_CM_ENABLE
/**
* lim_update_fils_config()- This API updates fils session info to csr config
* from join request.
@@ -93,20 +92,7 @@ QDF_STATUS lim_create_fils_rik(uint8_t *rrk, uint8_t rrk_len,
void lim_update_fils_config(struct mac_context *mac_ctx,
struct pe_session *session,
struct cm_vdev_join_req *join_req);
#else
/**
* lim_update_fils_config()- This API updates fils session info to csr config
* from join request.
* @mac_ctx: pointer to mac context
* @session: PE session
* @sme_join_req: pointer to join request
*
* Return: None
*/
void lim_update_fils_config(struct mac_context *mac_ctx,
struct pe_session *session,
struct join_req *sme_join_req);
#endif
/**
* lim_create_fils_auth_data()- This API creates the fils auth data
* which needs to be sent in auth req.
@@ -137,7 +123,6 @@ static inline void lim_increase_fils_sequence_number(struct pe_session *session_
session_entry->fils_info->sequence_number++;
}
#ifdef FEATURE_CM_ENABLE
/**
* populate_fils_connect_params() - Populate FILS connect params to join rsp
* @mac_ctx: Mac context
@@ -152,21 +137,7 @@ void
populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
struct wlan_cm_connect_resp *connect_rsp);
#else
/**
* populate_fils_connect_params() - Populate FILS connect params to join rsp
* @mac_ctx: Mac context
* @session: PE session
* @sme_join_rsp: SME join rsp
*
* This API copies the FILS connect params from PE session to SME join rsp
*
* Return: None
*/
void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
struct join_rsp *sme_join_rsp);
#endif
/**
* lim_update_fils_hlp_data() - Update the hlp data from association
* response frame to PE session.
@@ -269,18 +240,10 @@ static inline bool lim_is_valid_fils_auth_frame(struct mac_context *mac_ctx,
return true;
}
#ifdef FEATURE_CM_ENABLE
static inline void lim_update_fils_config(struct mac_context *mac_ctx,
struct pe_session *session,
struct cm_vdev_join_req *join_req)
{}
#else
static inline
void lim_update_fils_config(struct mac_context *mac_ctx,
struct pe_session *session,
struct join_req *sme_join_req)
{ }
#endif
static inline
QDF_STATUS lim_create_fils_auth_data(struct mac_context *mac_ctx,
@@ -296,18 +259,11 @@ static inline bool lim_is_fils_connection(struct pe_session *pe_session)
return false;
}
#ifdef FEATURE_CM_ENABLE
static inline void
populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
struct wlan_cm_connect_resp *connect_rsp)
{ }
#else
static inline void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
struct join_rsp *sme_join_rsp)
{ }
#endif
static inline
void lim_update_fils_hlp_data(struct qdf_mac_addr *hlp_frm_src_mac,

View File

@@ -142,9 +142,7 @@ struct obss_detection_cfg {
struct pe_session {
/* To check session table is in use or free */
uint8_t available;
#ifdef FEATURE_CM_ENABLE
wlan_cm_id cm_id;
#endif
uint16_t peSessionId;
union {
uint8_t smeSessionId;

View File

@@ -1331,9 +1331,6 @@ void pe_register_callbacks_with_wma(struct mac_context *mac,
QDF_STATUS status;
status = wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
ready_req->csr_roam_synch_cb,
#endif
ready_req->csr_roam_auth_event_handle_cb,
ready_req->pe_roam_synch_cb,
ready_req->pe_disconnect_cb);

View File

@@ -568,7 +568,6 @@ void lim_process_ft_preauth_rsp_timeout(struct mac_context *mac_ctx)
lim_handle_ft_pre_auth_rsp(mac_ctx, QDF_STATUS_E_FAILURE, NULL, 0, session);
}
#ifdef FEATURE_CM_ENABLE
/*
* lim_cm_post_preauth_rsp() - post preauth response to osif.
*
@@ -634,7 +633,6 @@ lim_cm_post_preauth_rsp(struct mac_context *mac_ctx, QDF_STATUS status,
qdf_mem_free(rsp);
}
}
#endif
/*
* lim_post_ft_pre_auth_rsp() - post ft pre auth response to SME.
@@ -655,76 +653,13 @@ void lim_post_ft_pre_auth_rsp(struct mac_context *mac_ctx,
uint16_t auth_rsp_length,
struct pe_session *session)
{
#ifndef FEATURE_CM_ENABLE
tpSirFTPreAuthRsp ft_pre_auth_rsp;
struct scheduler_msg mmh_msg = {0};
uint16_t rsp_len = sizeof(tSirFTPreAuthRsp);
ft_pre_auth_rsp = qdf_mem_malloc(rsp_len);
if (!ft_pre_auth_rsp) {
QDF_ASSERT(ft_pre_auth_rsp);
return;
}
pe_debug("Auth Rsp = %pK", ft_pre_auth_rsp);
if (session) {
/* Nothing to be done if the session is not in STA mode */
if (!LIM_IS_STA_ROLE(session)) {
pe_err("session is not in STA mode");
qdf_mem_free(ft_pre_auth_rsp);
return;
}
ft_pre_auth_rsp->vdev_id = session->vdev_id;
/* The bssid of the AP we are sending Auth1 to. */
if (session->ftPEContext.pFTPreAuthReq)
sir_copy_mac_addr(ft_pre_auth_rsp->preAuthbssId,
session->ftPEContext.pFTPreAuthReq->preAuthbssId);
}
ft_pre_auth_rsp->messageType = eWNI_SME_FT_PRE_AUTH_RSP;
ft_pre_auth_rsp->length = (uint16_t) rsp_len;
ft_pre_auth_rsp->status = status;
/* Attach the auth response now back to SME */
ft_pre_auth_rsp->ft_ies_length = 0;
if ((auth_rsp) && (auth_rsp_length < MAX_FTIE_SIZE)) {
/* Only 11r assoc has FT IEs */
qdf_mem_copy(ft_pre_auth_rsp->ft_ies,
auth_rsp, auth_rsp_length);
ft_pre_auth_rsp->ft_ies_length = auth_rsp_length;
}
if (status != QDF_STATUS_SUCCESS) {
/*
* Ensure that on Pre-Auth failure the cached Pre-Auth Req and
* other allocated memory is freed up before returning.
*/
pe_debug("Pre-Auth Failed, Cleanup!");
lim_ft_cleanup(mac_ctx, session);
}
mmh_msg.type = ft_pre_auth_rsp->messageType;
mmh_msg.bodyptr = ft_pre_auth_rsp;
mmh_msg.bodyval = 0;
pe_debug("Posted Auth Rsp to SME with status of 0x%x", status);
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
if (status == QDF_STATUS_SUCCESS)
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_PREAUTH_DONE,
session, status, 0);
#endif
lim_sys_process_mmh_msg_api(mac_ctx, &mmh_msg);
#else
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
if (status == QDF_STATUS_SUCCESS)
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_PREAUTH_DONE,
session, status, 0);
#endif
lim_cm_post_preauth_rsp(mac_ctx, status, auth_rsp, auth_rsp_length, session);
#endif
lim_cm_post_preauth_rsp(mac_ctx, status, auth_rsp, auth_rsp_length,
session);
}
/**

View File

@@ -1408,7 +1408,6 @@ bool lim_process_fils_auth_frame2(struct mac_context *mac_ctx,
return true;
}
#ifdef FEATURE_CM_ENABLE
static enum eAniAuthType lim_get_auth_type(uint8_t auth_type)
{
switch (auth_type) {
@@ -1550,119 +1549,6 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
fils_info->pmk_len);
}
#else
void lim_update_fils_config(struct mac_context *mac_ctx,
struct pe_session *session,
struct join_req *sme_join_req)
{
struct pe_fils_session *pe_fils_info;
struct wlan_fils_connection_info *fils_info = NULL;
tDot11fIERSN dot11f_ie_rsn = {0};
uint32_t ret;
fils_info = wlan_cm_get_fils_connection_info(mac_ctx->psoc,
session->vdev_id);
if (!fils_info) {
pe_debug("FILS: CM Fils info is NULL");
return;
}
pe_fils_info = session->fils_info;
if (!pe_fils_info)
return;
if (!fils_info->is_fils_connection)
return;
pe_fils_info->is_fils_connection = fils_info->is_fils_connection;
pe_fils_info->keyname_nai_length = fils_info->key_nai_length;
pe_fils_info->fils_rrk_len = fils_info->r_rk_length;
pe_fils_info->akm = fils_info->akm_type;
pe_fils_info->auth = fils_info->auth_type;
pe_fils_info->sequence_number = fils_info->erp_sequence_number;
if (fils_info->key_nai_length > FILS_MAX_KEYNAME_NAI_LENGTH) {
pe_err("Restricting the key_nai_length of %d to max %d",
fils_info->key_nai_length,
FILS_MAX_KEYNAME_NAI_LENGTH);
fils_info->key_nai_length = FILS_MAX_KEYNAME_NAI_LENGTH;
}
if (fils_info->key_nai_length) {
pe_fils_info->keyname_nai_data =
qdf_mem_malloc(fils_info->key_nai_length);
if (!pe_fils_info->keyname_nai_data)
return;
qdf_mem_copy(pe_fils_info->keyname_nai_data,
fils_info->keyname_nai,
fils_info->key_nai_length);
}
if (fils_info->r_rk_length) {
pe_fils_info->fils_rrk =
qdf_mem_malloc(fils_info->r_rk_length);
if (!pe_fils_info->fils_rrk) {
qdf_mem_free(pe_fils_info->keyname_nai_data);
return;
}
if (fils_info->r_rk_length <= WLAN_FILS_MAX_RRK_LENGTH)
qdf_mem_copy(pe_fils_info->fils_rrk,
fils_info->r_rk,
fils_info->r_rk_length);
}
qdf_mem_copy(pe_fils_info->fils_pmkid, fils_info->pmkid,
PMKID_LEN);
pe_fils_info->rsn_ie_len = sme_join_req->rsnIE.length;
qdf_mem_copy(pe_fils_info->rsn_ie,
sme_join_req->rsnIE.rsnIEdata,
sme_join_req->rsnIE.length);
/*
* When AP is MFP capable and STA is also MFP capable,
* the supplicant fills the RSN IE with PMKID count as 0
* and PMKID as 0, then appends the group management cipher
* suite. This opaque RSN IE is copied into fils_info in pe
* session. For FT-FILS association, STA has to fill the
* PMKR0 derived after authentication response is received from
* the AP. So unpack the RSN IE to find if group management cipher
* suite is present and based on this RSN IE will be constructed in
* lim_generate_fils_pmkr1_name() for FT-FILS connection.
*/
ret = dot11f_unpack_ie_rsn(mac_ctx, pe_fils_info->rsn_ie + 2,
pe_fils_info->rsn_ie_len - 2,
&dot11f_ie_rsn, 0);
if (DOT11F_SUCCEEDED(ret))
pe_fils_info->group_mgmt_cipher_present =
dot11f_ie_rsn.gp_mgmt_cipher_suite_present;
else
pe_err("FT-FILS: Invalid RSN IE");
pe_fils_info->fils_pmk_len = fils_info->pmk_len;
if (fils_info->pmk_len) {
pe_fils_info->fils_pmk =
qdf_mem_malloc(fils_info->pmk_len);
if (!pe_fils_info->fils_pmk) {
qdf_mem_free(pe_fils_info->keyname_nai_data);
qdf_mem_free(pe_fils_info->fils_rrk);
return;
}
qdf_mem_copy(pe_fils_info->fils_pmk, fils_info->pmk,
fils_info->pmk_len);
}
pe_debug("FILS: fils=%d nai-len=%d rrk_len=%d akm=%d auth=%d pmk_len=%d",
fils_info->is_fils_connection,
fils_info->key_nai_length,
fils_info->r_rk_length,
fils_info->akm_type,
fils_info->auth_type,
fils_info->pmk_len);
}
#endif
#define EXTENDED_IE_HEADER_LEN 3
/**
* lim_create_fils_auth_data()- This API creates the fils auth data
@@ -1718,7 +1604,6 @@ QDF_STATUS lim_create_fils_auth_data(struct mac_context *mac_ctx,
return QDF_STATUS_SUCCESS;
}
#ifdef FEATURE_CM_ENABLE
void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
struct wlan_cm_connect_resp *connect_rsp)
@@ -1776,67 +1661,6 @@ void populate_fils_connect_params(struct mac_context *mac_ctx,
pe_debug("FILS connect params copied lim");
}
#else
void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
struct join_rsp *sme_join_rsp)
{
struct fils_join_rsp_params *fils_join_rsp;
struct pe_fils_session *fils_info = session->fils_info;
if (!lim_is_fils_connection(session))
return;
if (!fils_info->fils_pmk_len ||
!fils_info->tk_len || !fils_info->gtk_len ||
!fils_info->fils_pmk || !fils_info->kek_len) {
pe_err("Invalid FILS info pmk len %d kek len %d tk len %d gtk len %d",
fils_info->fils_pmk_len,
fils_info->kek_len,
fils_info->tk_len,
fils_info->gtk_len);
return;
}
sme_join_rsp->fils_join_rsp = qdf_mem_malloc(sizeof(*fils_join_rsp));
if (!sme_join_rsp->fils_join_rsp) {
pe_delete_fils_info(session);
return;
}
fils_join_rsp = sme_join_rsp->fils_join_rsp;
fils_join_rsp->fils_pmk = qdf_mem_malloc(fils_info->fils_pmk_len);
if (!fils_join_rsp->fils_pmk) {
qdf_mem_free(fils_join_rsp);
pe_delete_fils_info(session);
return;
}
fils_join_rsp->fils_pmk_len = fils_info->fils_pmk_len;
qdf_mem_copy(fils_join_rsp->fils_pmk, fils_info->fils_pmk,
fils_info->fils_pmk_len);
qdf_mem_copy(fils_join_rsp->fils_pmkid, fils_info->fils_pmkid,
PMKID_LEN);
fils_join_rsp->kek_len = fils_info->kek_len;
qdf_mem_copy(fils_join_rsp->kek, fils_info->kek, fils_info->kek_len);
fils_join_rsp->tk_len = fils_info->tk_len;
qdf_mem_copy(fils_join_rsp->tk, fils_info->tk, fils_info->tk_len);
fils_join_rsp->gtk_len = fils_info->gtk_len;
qdf_mem_copy(fils_join_rsp->gtk, fils_info->gtk, fils_info->gtk_len);
cds_copy_hlp_info(&fils_info->dst_mac, &fils_info->src_mac,
fils_info->hlp_data_len, fils_info->hlp_data,
&fils_join_rsp->dst_mac, &fils_join_rsp->src_mac,
&fils_join_rsp->hlp_data_len,
fils_join_rsp->hlp_data);
pe_debug("FILS connect params copied lim");
}
#endif
/**
* lim_parse_kde_elements() - Parse Key Delivery Elements

View File

@@ -1749,9 +1749,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
case eWNI_SME_BEACON_REPORT_RESP_XMIT_IND:
#if defined FEATURE_WLAN_ESE
case eWNI_SME_ESE_ADJACENT_AP_REPORT:
#endif
#ifndef FEATURE_CM_ENABLE
case eWNI_SME_FT_PRE_AUTH_REQ:
#endif
case eWNI_SME_FT_AGGR_QOS_REQ:
case eWNI_SME_REGISTER_MGMT_FRAME_REQ:
@@ -1760,9 +1757,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
#endif /* FEATURE_WLAN_ESE */
case eWNI_SME_REGISTER_MGMT_FRAME_CB:
case eWNI_SME_EXT_CHANGE_CHANNEL:
#ifndef FEATURE_CM_ENABLE
case eWNI_SME_ROAM_INVOKE:
#endif
/* fall through */
case eWNI_SME_ROAM_SEND_SET_PCL_REQ:
case eWNI_SME_SET_ADDBA_ACCEPT:
@@ -2100,7 +2094,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
break;
case SIR_LIM_PROCESS_DEFERRED_QUEUE:
break;
#ifdef FEATURE_CM_ENABLE
case CM_BSS_PEER_CREATE_REQ:
cm_process_peer_create(msg);
break;
@@ -2116,7 +2109,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
case CM_PREAUTH_REQ:
cm_process_preauth_req(msg);
break;
#endif
default:
qdf_mem_free((void *)msg->bodyptr);
msg->bodyptr = NULL;

View File

@@ -598,14 +598,6 @@ void lim_process_mlm_ft_reassoc_req(struct mac_context *mac,
else
val = mac->mlme_cfg->sap_cfg.listen_interval;
/* For connection manager CM will create the peer before reassoc */
#ifndef FEATURE_CM_ENABLE
status = wma_add_bss_peer_sta(session->vdev_id, session->bssId, false);
if (QDF_IS_STATUS_ERROR(status)) {
qdf_mem_free(reassoc_req);
return;
}
#endif
reassoc_req->listenInterval = (uint16_t) val;
vdev = session->vdev;

View File

@@ -390,7 +390,6 @@ failure:
lim_post_sme_message(mac, LIM_MLM_JOIN_CNF, (uint32_t *) &mlm_join_cnf);
}
#ifdef FEATURE_CM_ENABLE
void lim_send_peer_create_resp(struct mac_context *mac, uint8_t vdev_id,
QDF_STATUS status, uint8_t *peer_mac)
{
@@ -419,26 +418,6 @@ lim_process_mlm_post_join_suspend_link(struct mac_context *mac_ctx,
lim_post_join_set_link_state_callback(mac_ctx, session->vdev_id,
QDF_STATUS_SUCCESS);
}
#else
void lim_send_peer_create_resp(struct mac_context *mac, uint8_t vdev_id,
QDF_STATUS status, uint8_t *peer_mac)
{
lim_post_join_set_link_state_callback(mac, vdev_id, status);
}
static void
lim_process_mlm_post_join_suspend_link(struct mac_context *mac_ctx,
struct pe_session *session)
{
lim_deactivate_and_change_timer(mac_ctx, eLIM_JOIN_FAIL_TIMER);
/* assign appropriate sessionId to the timer object */
mac_ctx->lim.lim_timers.gLimJoinFailureTimer.sessionId =
session->peSessionId;
wma_add_bss_peer_sta(session->vdev_id, session->bssId, true);
}
#endif
/**
* lim_process_mlm_join_req() - process mlm join request.

View File

@@ -3049,7 +3049,6 @@ lim_send_connect_req_to_mlm(struct pe_session *session)
return QDF_STATUS_SUCCESS;
}
#ifdef FEATURE_CM_ENABLE
static struct pe_session *
lim_cm_create_session(struct mac_context *mac_ctx, struct cm_vdev_join_req *req)
{
@@ -4385,227 +4384,6 @@ QDF_STATUS cm_process_preauth_req(struct scheduler_msg *msg)
}
#endif
#else
/**
* __lim_process_sme_join_req() - process SME_JOIN_REQ message
* @mac_ctx: Pointer to Global MAC structure
* @msg_buf: A pointer to the SME message buffer
*
* This function is called to process SME_JOIN_REQ message
* from HDD or upper layer application.
*
* Return: None
*/
static void
__lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
{
struct join_req *in_req = msg_buf;
struct join_req *sme_join_req = NULL;
tSirResultCodes ret_code = eSIR_SME_SUCCESS;
uint8_t session_id;
struct pe_session *session = NULL;
uint8_t vdev_id = 0;
struct bss_description *bss_desc;
QDF_STATUS status;
int32_t ucast_cipher, auth_mode, akm;
tSirMacCapabilityInfo *ap_cap_info;
if (!mac_ctx || !msg_buf) {
QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
FL("JOIN REQ with invalid data"));
return;
}
/* FEATURE_WLAN_DIAG_SUPPORT */
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
/*
* Not sending any session, since it is not created yet.
* The response whould have correct state.
*/
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_JOIN_REQ_EVENT, NULL, 0, 0);
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
/*
* Expect Join request in idle state.
* Reassociate request is expected in link established state.
*/
/* Global SME and LIM states are not defined yet for BT-AMP Support */
if (mac_ctx->lim.gLimSmeState == eLIM_SME_IDLE_STATE) {
sme_join_req = qdf_mem_malloc(in_req->length);
if (!sme_join_req) {
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
qdf_mem_copy(sme_join_req, in_req, in_req->length);
if (!lim_is_sme_join_req_valid(mac_ctx, sme_join_req)) {
/* Received invalid eWNI_SME_JOIN_REQ */
/* Log the event */
pe_warn("vdev_id:%d JOIN REQ with invalid data",
sme_join_req->vdev_id);
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
}
bss_desc = &sme_join_req->bssDescription;
/* check for the existence of start BSS session */
session = pe_find_session_by_bssid(mac_ctx, bss_desc->bssId,
&session_id);
if (session) {
pe_err("Session(%d) Already exists for BSSID: "
QDF_MAC_ADDR_FMT " in limSmeState = %X",
session_id,
QDF_MAC_ADDR_REF(bss_desc->bssId),
session->limSmeState);
if (session->limSmeState == eLIM_SME_LINK_EST_STATE &&
session->smeSessionId == sme_join_req->vdev_id) {
/*
* Received eWNI_SME_JOIN_REQ for same
* BSS as currently associated.
* Log the event and send success
*/
pe_warn("SessionId: %d", session_id);
pe_warn("JOIN_REQ for current joined BSS");
/* Send Join success response to host */
ret_code = eSIR_SME_ALREADY_JOINED_A_BSS;
session = NULL;
goto end;
} else {
pe_err("JOIN_REQ not for current joined BSS");
ret_code = eSIR_SME_REFUSED;
session = NULL;
goto end;
}
} else {
/*
* Session Entry does not exist for given BSSId
* Try to Create a new session
*/
session = pe_create_session(mac_ctx, bss_desc->bssId,
&session_id,
mac_ctx->lim.max_sta_of_pe_session,
eSIR_INFRASTRUCTURE_MODE,
sme_join_req->vdev_id);
if (!session) {
pe_err("Session Can not be created");
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
}
/* store the smejoin req handle in session table */
session->lim_join_req = sme_join_req;
session->force_24ghz_in_ht20 =
sme_join_req->force_24ghz_in_ht20;
status = lim_fill_pe_session(mac_ctx, session, bss_desc);
if (QDF_IS_STATUS_ERROR(status)) {
pe_err("Failed to fill pe session vdev id %d",
session->vdev_id);
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
}
session->wps_registration = sme_join_req->wps_registration;
/* Copy the SSID from smejoinreq to session entry */
session->ssId.length = sme_join_req->ssId.length;
qdf_mem_copy(session->ssId.ssId, sme_join_req->ssId.ssId,
session->ssId.length);
session->connected_akm = sme_join_req->akm;
lim_update_fils_config(mac_ctx, session, sme_join_req);
session->encryptType = sme_join_req->UCEncryptionType;
if (wlan_reg_is_6ghz_chan_freq(session->curr_op_freq)) {
if (!lim_is_session_he_capable(session)) {
pe_err("JOIN_REQ with invalid 6G security");
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
}
}
if (sme_join_req->addIEScan.length)
qdf_mem_copy(&session->lim_join_req->addIEScan,
&sme_join_req->addIEScan,
sizeof(tSirAddie));
if (sme_join_req->addIEAssoc.length)
qdf_mem_copy(&session->lim_join_req->addIEAssoc,
&sme_join_req->addIEAssoc,
sizeof(tSirAddie));
session->isOSENConnection = sme_join_req->isOSENConnection;
pe_debug("Freq %d width %d freq0 %d freq1 %d, Smps %d: mode %d action %d, nss 1x1 %d vdev_nss %d nss %d cbMode %d dot11mode %d subfer %d subfee %d csn %d is_cisco %d",
session->curr_op_freq, session->ch_width,
session->ch_center_freq_seg0,
session->ch_center_freq_seg1,
session->enableHtSmps, session->htSmpsvalue,
session->send_smps_action, session->supported_nss_1x1,
session->vdev_nss, session->nss,
session->htSupportedChannelWidthSet,
session->dot11mode,
session->vht_config.su_beam_former,
session->vht_config.su_beam_formee,
session->vht_config.csnof_beamformer_antSup,
session->isCiscoVendorAP);
ucast_cipher = wlan_crypto_get_param(session->vdev,
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
auth_mode = wlan_crypto_get_param(session->vdev,
WLAN_CRYPTO_PARAM_AUTH_MODE);
akm = wlan_crypto_get_param(session->vdev,
WLAN_CRYPTO_PARAM_KEY_MGMT);
ap_cap_info = (tSirMacCapabilityInfo *)
&session->lim_join_req->bssDescription.capabilityInfo;
lim_set_privacy(mac_ctx, ucast_cipher, auth_mode, akm,
ap_cap_info->privacy);
/* Issue LIM_MLM_JOIN_REQ to MLM */
status = lim_send_connect_req_to_mlm(session);
if (QDF_IS_STATUS_ERROR(status)) {
ret_code = eSIR_SME_REFUSED;
goto end;
}
return;
} else {
/* Received eWNI_SME_JOIN_REQ un expected state */
pe_err("received unexpected SME_JOIN_REQ in state %X",
mac_ctx->lim.gLimSmeState);
lim_print_sme_state(mac_ctx, LOGE, mac_ctx->lim.gLimSmeState);
ret_code = eSIR_SME_UNEXPECTED_REQ_RESULT_CODE;
session = NULL;
goto end;
}
end:
vdev_id = in_req->vdev_id;
if (sme_join_req) {
qdf_mem_free(sme_join_req);
sme_join_req = NULL;
if (session)
session->lim_join_req = NULL;
}
if (ret_code != eSIR_SME_SUCCESS) {
if (session) {
pe_delete_session(mac_ctx, session);
session = NULL;
}
}
pe_debug("Send failure status on vdev_id: %d with ret_code: %d",
vdev_id, ret_code);
lim_send_sme_join_reassoc_rsp(mac_ctx, eWNI_SME_JOIN_RSP, ret_code,
STATUS_UNSPECIFIED_FAILURE, session, vdev_id);
}
#endif
static uint8_t lim_get_num_tpe_octets(uint8_t max_transmit_power_count)
{
if (!max_transmit_power_count)
@@ -5041,368 +4819,6 @@ void lim_calculate_tpc(struct mac_context *mac,
num_pwr_levels, is_psd_power, reg_max, ap_power_type_6g);
}
#ifndef FEATURE_CM_ENABLE
/**
* __lim_process_sme_reassoc_req() - process reassoc req
*
* @mac_ctx: Pointer to Global MAC structure
* @msg_buf: pointer to the SME message buffer
*
* This function is called to process SME_REASSOC_REQ message
* from HDD or upper layer application.
*
* Return: None
*/
static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
void *msg_buf)
{
uint16_t caps;
uint32_t val;
struct join_req *in_req = msg_buf;
struct join_req *reassoc_req;
tLimMlmReassocReq *mlm_reassoc_req;
tSirResultCodes ret_code = eSIR_SME_SUCCESS;
struct pe_session *session_entry = NULL;
uint8_t session_id;
uint8_t vdev_id;
int8_t local_pwr_constraint = 0, reg_max = 0;
uint32_t tele_bcn_en = 0;
QDF_STATUS status;
tDot11fBeaconIEs *ie_struct;
ePhyChanBondState cb_mode;
tSirMacCapabilityInfo *ap_cap_info;
struct bss_description *bss_desc;
uint8_t wmm_mode, value;
bool is_pwr_constraint;
int32_t ucast_cipher;
int32_t auth_mode;
int32_t akm;
vdev_id = in_req->vdev_id;
reassoc_req = qdf_mem_malloc(in_req->length);
if (!reassoc_req) {
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
qdf_mem_copy(reassoc_req, in_req, in_req->length);
if (!lim_is_sme_join_req_valid(mac_ctx, reassoc_req)) {
/*
* Received invalid eWNI_SME_REASSOC_REQ
*/
pe_warn("received SME_REASSOC_REQ with invalid data");
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
}
session_entry = pe_find_session_by_bssid(mac_ctx,
reassoc_req->bssDescription.bssId,
&session_id);
if (!session_entry) {
pe_err("Session does not exist for given bssId");
lim_print_mac_addr(mac_ctx, reassoc_req->bssDescription.bssId,
LOGE);
ret_code = eSIR_SME_INVALID_PARAMETERS;
session_entry =
pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (session_entry)
lim_handle_sme_join_result(mac_ctx,
eSIR_SME_INVALID_PARAMETERS,
STATUS_UNSPECIFIED_FAILURE,
session_entry);
goto end;
}
#ifdef FEATURE_WLAN_DIAG_SUPPORT /* FEATURE_WLAN_DIAG_SUPPORT */
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_REASSOC_REQ_EVENT,
session_entry, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
/* mac_ctx->lim.gpLimReassocReq = reassoc_req;//TO SUPPORT BT-AMP */
/* Store the reassoc handle in the session Table */
session_entry->pLimReAssocReq = reassoc_req;
session_entry->lim_join_req = reassoc_req;
status = wlan_get_parsed_bss_description_ies(mac_ctx,
&session_entry->pLimReAssocReq->bssDescription,
&ie_struct);
if (QDF_IS_STATUS_ERROR(status)) {
pe_err("IE parsing failed vdev id %d",
session_entry->vdev_id);
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
ucast_cipher = wlan_crypto_get_param(session_entry->vdev,
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
auth_mode = wlan_crypto_get_param(session_entry->vdev,
WLAN_CRYPTO_PARAM_AUTH_MODE);
akm = wlan_crypto_get_param(session_entry->vdev,
WLAN_CRYPTO_PARAM_KEY_MGMT);
ap_cap_info = (tSirMacCapabilityInfo *)
&session_entry->pLimReAssocReq->bssDescription.capabilityInfo;
lim_set_privacy(mac_ctx, ucast_cipher, auth_mode, akm,
ap_cap_info->privacy);
if (session_entry->vhtCapability) {
if (session_entry->opmode == QDF_STA_MODE) {
session_entry->vht_config.su_beam_formee =
mac_ctx->mlme_cfg->vht_caps.vht_cap_info.su_bformee;
} else {
session_entry->vht_config.su_beam_formee = 0;
}
session_entry->enableVhtpAid =
mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_paid;
session_entry->enableVhtGid =
mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_gid;
pe_debug("vht su bformer [%d]", session_entry->vht_config.su_beam_former);
}
if (session_entry->nss == 1)
session_entry->supported_nss_1x1 = true;
lim_check_oui_and_update_session(mac_ctx, session_entry, ie_struct);
session_entry->lim_reassoc_chan_freq =
session_entry->pLimReAssocReq->bssDescription.chan_freq;
cb_mode = wlan_get_cb_mode(mac_ctx,
session_entry->lim_reassoc_chan_freq,
ie_struct);
session_entry->reAssocHtSupportedChannelWidthSet = cb_mode ? 1 : 0;
session_entry->reAssocHtRecommendedTxWidthSet =
session_entry->reAssocHtSupportedChannelWidthSet;
session_entry->reAssocHtSecondaryChannelOffset = cb_mode;
session_entry->enable_session_twt_support =
lim_enable_twt(mac_ctx, ie_struct);
qdf_mem_free(ie_struct);
pe_debug("vhtCapability: %d su_beam_formee: %d su_tx_bformer %d",
session_entry->vhtCapability,
session_entry->vht_config.su_beam_formee,
session_entry->vht_config.su_beam_former);
session_entry->enableHtSmps = mac_ctx->mlme_cfg->ht_caps.enable_smps;
session_entry->htSmpsvalue = mac_ctx->mlme_cfg->ht_caps.smps;
session_entry->send_smps_action =
mac_ctx->roam.configParam.send_smps_action;
pe_debug("enableHtSmps: %d htSmps: %d send action: %d supported nss 1x1: %d",
session_entry->enableHtSmps,
session_entry->htSmpsvalue,
session_entry->send_smps_action,
session_entry->supported_nss_1x1);
session_entry->lim_join_req = NULL;
/*
* Reassociate request is expected
* in link established state only.
*/
if (session_entry->limSmeState != eLIM_SME_LINK_EST_STATE) {
if (session_entry->limSmeState == eLIM_SME_WT_REASSOC_STATE) {
/*
* May be from 11r FT pre-auth. So lets check it
* before we bail out
*/
pe_debug("Session in reassoc state is %d",
session_entry->peSessionId);
/* Make sure its our preauth bssid */
if (qdf_mem_cmp(reassoc_req->bssDescription.bssId,
session_entry->limReAssocbssId,
6)) {
lim_print_mac_addr(mac_ctx,
reassoc_req->bssDescription.
bssId, LOGE);
pe_err("Unknown bssId in reassoc state");
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
}
session_entry->vdev_id = vdev_id;
mlm_reassoc_req =
qdf_mem_malloc(sizeof(*mlm_reassoc_req));
if (!mlm_reassoc_req) {
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
/* Update PE sessionId */
mlm_reassoc_req->sessionId = session_entry->peSessionId;
status = lim_send_ft_reassoc_req(session_entry,
mlm_reassoc_req);
if (QDF_IS_STATUS_ERROR(status)) {
qdf_mem_free(mlm_reassoc_req);
ret_code = eSIR_SME_REFUSED;
goto end;
}
return;
}
/*
* Should not have received eWNI_SME_REASSOC_REQ
*/
pe_err("received unexpected SME_REASSOC_REQ in state %X",
session_entry->limSmeState);
lim_print_sme_state(mac_ctx, LOGE, session_entry->limSmeState);
ret_code = eSIR_SME_UNEXPECTED_REQ_RESULT_CODE;
goto end;
}
qdf_mem_copy(session_entry->limReAssocbssId,
session_entry->pLimReAssocReq->bssDescription.bssId,
sizeof(tSirMacAddr));
bss_desc = &session_entry->pLimReAssocReq->bssDescription;
session_entry->limReassocBssCaps =
session_entry->pLimReAssocReq->bssDescription.capabilityInfo;
reg_max = wlan_reg_get_channel_reg_power_for_freq(
mac_ctx->pdev, session_entry->curr_op_freq);
local_pwr_constraint = reg_max;
lim_extract_ap_capability(mac_ctx,
(uint8_t *)session_entry->pLimReAssocReq->bssDescription.ieFields,
lim_get_ielen_from_bss_description(
&session_entry->pLimReAssocReq->bssDescription),
&session_entry->limReassocBssQosCaps,
&session_entry->gLimCurrentBssUapsd,
&local_pwr_constraint, session_entry,
&is_pwr_constraint);
if (is_pwr_constraint)
local_pwr_constraint = reg_max - local_pwr_constraint;
session_entry->maxTxPower = QDF_MIN(reg_max, (local_pwr_constraint));
session_entry->max_11h_pwr =
QDF_MIN(lim_get_cfg_max_tx_power(mac_ctx,
bss_desc->chan_freq),
MAX_TX_PWR_CAP);
session_entry->min_11h_pwr = MIN_TX_PWR_CAP;
if (!session_entry->max_11h_pwr)
session_entry->max_11h_pwr = MAX_TX_PWR_CAP;
if (session_entry->max_11h_pwr > session_entry->maxTxPower)
session_entry->max_11h_pwr = session_entry->maxTxPower;
pe_err("Reg max = %d, local pwr constraint = %d, max tx = %d",
reg_max, local_pwr_constraint, session_entry->maxTxPower);
/* Copy the SSID from session entry to local variable */
session_entry->limReassocSSID.length = reassoc_req->ssId.length;
qdf_mem_copy(session_entry->limReassocSSID.ssId,
reassoc_req->ssId.ssId,
session_entry->limReassocSSID.length);
if (!session_entry->enable_session_twt_support) {
status = wlan_mlme_get_wmm_mode(mac_ctx->psoc, &wmm_mode);
if (!QDF_IS_STATUS_SUCCESS(status)) {
pe_err("Get wmm_mode failed");
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
} else if (wmm_mode == 2) {
/*QoS not enabled in cfg file */
session_entry->gUapsdPerAcBitmask = 0;
} else {
/*QoS enabled, update uapsd mask from cfg file */
status = wlan_mlme_get_wmm_uapsd_mask(mac_ctx->psoc,
&value);
if (QDF_IS_STATUS_ERROR(status)) {
pe_err("Get uapsd_mask failed");
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto end;
} else
session_entry->gUapsdPerAcBitmask = value;
}
}
if (session_entry->gLimCurrentBssUapsd)
pe_debug("UAPSD flag for all AC - 0x%2x",
session_entry->gUapsdPerAcBitmask);
mlm_reassoc_req = qdf_mem_malloc(sizeof(tLimMlmReassocReq));
if (!mlm_reassoc_req) {
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
qdf_mem_copy(mlm_reassoc_req->peerMacAddr,
session_entry->limReAssocbssId, sizeof(tSirMacAddr));
if (lim_get_capability_info(mac_ctx, &caps, session_entry) !=
QDF_STATUS_SUCCESS)
pe_err("could not retrieve Capabilities value");
lim_update_caps_info_for_bss(mac_ctx, &caps,
reassoc_req->bssDescription.capabilityInfo);
pe_debug("Capabilities info Reassoc: 0x%X", caps);
mlm_reassoc_req->capabilityInfo = caps;
/* Update PE session_id */
mlm_reassoc_req->sessionId = session_id;
/*
* If telescopic beaconing is enabled, set listen interval to
* CFG_TELE_BCN_MAX_LI
*/
tele_bcn_en = mac_ctx->mlme_cfg->sap_cfg.tele_bcn_wakeup_en;
if (tele_bcn_en)
val = mac_ctx->mlme_cfg->sap_cfg.tele_bcn_max_li;
else
val = mac_ctx->mlme_cfg->sap_cfg.listen_interval;
mlm_reassoc_req->listenInterval = (uint16_t) val;
if (mac_ctx->mlme_cfg->gen.enabled_11h &&
ap_cap_info->spectrumMgt && bss_desc->nwType == eSIR_11A_NW_TYPE)
session_entry->spectrumMgtEnabled = true;
/* Enable the spectrum management if this is a DFS channel */
if (session_entry->country_info_present &&
lim_isconnected_on_dfs_freq(
mac_ctx, session_entry->curr_op_freq))
session_entry->spectrumMgtEnabled = true;
session_entry->limPrevSmeState = session_entry->limSmeState;
session_entry->limSmeState = eLIM_SME_WT_REASSOC_STATE;
MTRACE(mac_trace(mac_ctx, TRACE_CODE_SME_STATE,
session_entry->peSessionId,
session_entry->limSmeState));
status = lim_send_reassoc_req(session_entry, mlm_reassoc_req);
if (QDF_IS_STATUS_ERROR(status)) {
qdf_mem_free(mlm_reassoc_req);
ret_code = eSIR_SME_REFUSED;
goto end;
}
return;
end:
if (reassoc_req) {
qdf_mem_free(reassoc_req);
if (session_entry)
session_entry->pLimReAssocReq = NULL;
}
if (session_entry)
/*
* error occurred after we determined the session so
* extract session id from there, otherwise we'll use
* the value already extracted from the message
*/
vdev_id = session_entry->vdev_id;
/*
* Send Reassoc failure response to host
* (note session_entry may be NULL, but that's OK)
*/
lim_send_sme_join_reassoc_rsp(mac_ctx, eWNI_SME_REASSOC_RSP,
ret_code, STATUS_UNSPECIFIED_FAILURE,
session_entry, vdev_id);
}
#endif
bool send_disassoc_frame = 1;
/**
* __lim_process_sme_disassoc_req()
@@ -6968,41 +6384,6 @@ static inline void lim_send_roam_set_pcl(struct mac_context *mac_ctx,
}
#endif
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/**
* lim_process_roam_invoke() - process the Roam Invoke req
* @mac_ctx: Pointer to Global MAC structure
* @msg_buf: Pointer to the SME message buffer
*
* This function is called by limProcessMessageQueue(). This function sends the
* ROAM_INVOKE command to WMA.
*
* Return: None
*/
static void lim_process_roam_invoke(struct mac_context *mac_ctx,
uint32_t *msg_buf)
{
struct scheduler_msg msg = {0};
QDF_STATUS status;
msg.type = SIR_HAL_ROAM_INVOKE;
msg.bodyptr = msg_buf;
msg.reserved = 0;
status = wma_post_ctrl_msg(mac_ctx, &msg);
if (QDF_STATUS_SUCCESS != status)
pe_err("Not able to post SIR_HAL_ROAM_INVOKE to WMA");
}
#else
static void lim_process_roam_invoke(struct mac_context *mac_ctx,
uint32_t *msg_buf)
{
qdf_mem_free(msg_buf);
}
#endif
#endif
static void lim_handle_update_ssid_hidden(struct mac_context *mac_ctx,
struct pe_session *session, uint8_t ssid_hidden)
{
@@ -7944,14 +7325,6 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
case eWNI_SME_START_BSS_REQ:
bufConsumed = __lim_process_sme_start_bss_req(mac, pMsg);
break;
#ifndef FEATURE_CM_ENABLE
case eWNI_SME_JOIN_REQ:
__lim_process_sme_join_req(mac, msg_buf);
break;
case eWNI_SME_REASSOC_REQ:
__lim_process_sme_reassoc_req(mac, msg_buf);
break;
#endif
case eWNI_SME_DISASSOC_REQ:
lim_process_sme_disassoc_req(mac, pMsg);
break;
@@ -8013,12 +7386,6 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
lim_send_roam_set_pcl(mac, (struct set_pcl_req *)msg_buf);
bufConsumed = false;
break;
#ifndef FEATURE_CM_ENABLE
case eWNI_SME_ROAM_INVOKE:
lim_process_roam_invoke(mac, msg_buf);
bufConsumed = false;
break;
#endif
case eWNI_SME_CHNG_MCC_BEACON_INTERVAL:
/* Update the beaconInterval */
__lim_process_sme_change_bi(mac, msg_buf);
@@ -8034,15 +7401,6 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
case eWNI_SME_BEACON_REPORT_RESP_XMIT_IND:
__lim_process_report_message(mac, pMsg);
break;
#ifndef FEATURE_CM_ENABLE
case eWNI_SME_FT_PRE_AUTH_REQ:
bufConsumed = lim_process_ft_pre_auth_req(
mac, (tpSirFTPreAuthReq)pMsg->bodyptr);
break;
#else
/* handle new command */
#endif
case eWNI_SME_FT_AGGR_QOS_REQ:
lim_process_ft_aggr_qos_req(mac, msg_buf);
break;

View File

@@ -453,11 +453,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
*qos_cap = 0;
*uapsd = 0;
#ifndef FEATURE_CM_ENABLE
pe_debug("The IE's being received:");
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
p_ie, ie_len);
#endif
if (sir_parse_beacon_ie(mac_ctx, beacon_struct, p_ie,
(uint32_t) ie_len) != QDF_STATUS_SUCCESS) {
pe_err("sir_parse_beacon_ie failed to parse beacon");

View File

@@ -266,11 +266,7 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac_ctx,
else
rate = TSRS_11B_RATE_5_5MBPS;
#ifdef FEATURE_CM_ENABLE
if (mlme_priv->connect_info.ese_tspec_info.numTspecs)
#else
if (pe_session->pLimReAssocReq->eseTspecInfo.numTspecs)
#endif
{
struct ese_tsrs_ie tsrs_ie;
@@ -382,31 +378,12 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac_ctx,
pe_debug("*** Sending Re-Assoc Request length: %d %d to",
bytes, payload);
if (pe_session->assoc_req) {
qdf_mem_free(pe_session->assoc_req);
pe_session->assoc_req = NULL;
pe_session->assocReqLen = 0;
}
if (add_ie_len) {
qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
add_ie, add_ie_len);
payload += add_ie_len;
}
#ifndef FEATURE_CM_ENABLE
pe_session->assoc_req = qdf_mem_malloc(payload);
if (pe_session->assoc_req) {
/*
* Store the Assoc request. This is sent to csr/hdd in
* join cnf response.
*/
qdf_mem_copy(pe_session->assoc_req,
frame + sizeof(tSirMacMgmtHdr), payload);
pe_session->assocReqLen = payload;
}
#endif
if (pe_session->is11Rconnection &&
mlme_priv->connect_info.ft_info.reassoc_ie_len) {
int i = 0;
@@ -432,7 +409,12 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac_ctx,
pe_session->opmode == QDF_P2P_GO_MODE)
tx_flag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
#ifdef FEATURE_CM_ENABLE
if (pe_session->assoc_req) {
qdf_mem_free(pe_session->assoc_req);
pe_session->assoc_req = NULL;
pe_session->assocReqLen = 0;
}
pe_session->assoc_req = qdf_mem_malloc(payload);
if (pe_session->assoc_req) {
/*
@@ -443,31 +425,6 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac_ctx,
frame + sizeof(tSirMacMgmtHdr), payload);
pe_session->assocReqLen = payload;
}
#else
if (pe_session->assoc_req) {
qdf_mem_free(pe_session->assoc_req);
pe_session->assoc_req = NULL;
pe_session->assocReqLen = 0;
}
if (ft_ies_length) {
pe_session->assoc_req = qdf_mem_malloc(ft_ies_length);
if (!pe_session->assoc_req) {
pe_session->assocReqLen = 0;
} else {
/*
* Store the FT IEs. This is sent to csr/hdd in
* join cnf response.
*/
qdf_mem_copy(pe_session->assoc_req,
mlme_priv->connect_info.ft_info.reassoc_ft_ie,
ft_ies_length);
pe_session->assocReqLen = ft_ies_length;
}
} else {
pe_debug("FT IEs not present");
pe_session->assocReqLen = 0;
}
#endif
MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_MGMT,
pe_session->peSessionId, mac_hdr->fc.subType));

View File

@@ -139,7 +139,6 @@ uint32_t lim_get_max_rate_flags(struct mac_context *mac_ctx, tpDphHashNode sta_d
return rate_flags;
}
#ifdef FEATURE_CM_ENABLE
static void lim_send_smps_intolerent(struct mac_context *mac_ctx,
struct pe_session *pe_session,
uint32_t bcn_len, uint8_t *bcn_ptr)
@@ -533,371 +532,6 @@ void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
/* add reassoc resp API */
}
#else
/**
* lim_send_sme_join_reassoc_rsp_after_resume() - Send Response to SME
* @mac_ctx: Pointer to Global MAC structure
* @status: Resume link status
* @sme_join_rsp: Join response to be sent
*
* This function is called to send Join/Reassoc rsp
* message to SME after the resume link.
*
* Return: None
*/
static void
lim_send_sme_join_reassoc_rsp_after_resume(struct mac_context *mac_ctx,
QDF_STATUS status,
struct join_rsp *sme_join_rsp)
{
struct scheduler_msg msg = {0};
msg.type = sme_join_rsp->messageType;
msg.bodyptr = sme_join_rsp;
msg.bodyval = 0;
MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
lim_sys_process_mmh_msg_api(mac_ctx, &msg);
}
/**
* lim_handle_join_rsp_status() - Handle the response.
* @mac_ctx: Pointer to Global MAC structure
* @session_entry: PE Session Info
* @result_code: Indicates the result of previously issued
* eWNI_SME_msgType_REQ message
* @sme_join_rsp The received response.
*
* This function will handle both the success and failure status
* of the received response.
*
* Return: None
*/
static void lim_handle_join_rsp_status(struct mac_context *mac_ctx,
struct pe_session *session_entry,
tSirResultCodes result_code,
struct join_rsp *sme_join_rsp)
{
uint16_t bss_ie_len;
void *bss_ies;
bool is_vendor_ap_1_present;
struct join_req *join_reassoc_req = NULL;
if (session_entry->beacon &&
session_entry->bcnLen > sizeof(struct wlan_frame_hdr)) {
sme_join_rsp->beaconLength = session_entry->bcnLen -
sizeof(struct wlan_frame_hdr);
qdf_mem_copy(sme_join_rsp->frames,
session_entry->beacon +
sizeof(struct wlan_frame_hdr),
sme_join_rsp->beaconLength);
qdf_mem_free(session_entry->beacon);
session_entry->beacon = NULL;
session_entry->bcnLen = 0;
}
if (session_entry->assoc_req) {
sme_join_rsp->assocReqLength =
session_entry->assocReqLen;
qdf_mem_copy(sme_join_rsp->frames +
sme_join_rsp->beaconLength,
session_entry->assoc_req,
sme_join_rsp->assocReqLength);
qdf_mem_free(session_entry->assoc_req);
session_entry->assoc_req = NULL;
session_entry->assocReqLen = 0;
}
if (session_entry->assocRsp) {
sme_join_rsp->assocRspLength =
session_entry->assocRspLen;
qdf_mem_copy(sme_join_rsp->frames +
sme_join_rsp->beaconLength +
sme_join_rsp->assocReqLength,
session_entry->assocRsp,
sme_join_rsp->assocRspLength);
qdf_mem_free(session_entry->assocRsp);
session_entry->assocRsp = NULL;
session_entry->assocRspLen = 0;
}
pe_debug("Beacon len %d Assoc Req len %d Assoc Rsp len %d",
sme_join_rsp->beaconLength, sme_join_rsp->assocReqLength,
sme_join_rsp->assocRspLength);
if (result_code == eSIR_SME_SUCCESS) {
if (session_entry->ricData) {
sme_join_rsp->parsedRicRspLen =
session_entry->RICDataLen;
qdf_mem_copy(sme_join_rsp->frames +
sme_join_rsp->beaconLength +
sme_join_rsp->assocReqLength +
sme_join_rsp->assocRspLength,
session_entry->ricData,
sme_join_rsp->parsedRicRspLen);
qdf_mem_free(session_entry->ricData);
session_entry->ricData = NULL;
session_entry->RICDataLen = 0;
pe_debug("RicLength: %d",
sme_join_rsp->parsedRicRspLen);
}
#ifdef FEATURE_WLAN_ESE
if (session_entry->tspecIes) {
sme_join_rsp->tspecIeLen =
session_entry->tspecLen;
qdf_mem_copy(sme_join_rsp->frames +
sme_join_rsp->beaconLength +
sme_join_rsp->assocReqLength +
sme_join_rsp->assocRspLength +
sme_join_rsp->parsedRicRspLen,
session_entry->tspecIes,
sme_join_rsp->tspecIeLen);
qdf_mem_free(session_entry->tspecIes);
session_entry->tspecIes = NULL;
session_entry->tspecLen = 0;
pe_debug("ESE-TspecLen: %d",
sme_join_rsp->tspecIeLen);
}
#endif
sme_join_rsp->vht_channel_width =
session_entry->ch_width;
pe_debug("lim_join_req:%pK, pLimReAssocReq:%pK",
session_entry->lim_join_req,
session_entry->pLimReAssocReq);
if (session_entry->lim_join_req)
join_reassoc_req = session_entry->lim_join_req;
if (session_entry->pLimReAssocReq)
join_reassoc_req = session_entry->pLimReAssocReq;
if (!join_reassoc_req) {
pe_err("both lim_join_req and pLimReAssocReq NULL");
return;
}
bss_ie_len = lim_get_ielen_from_bss_description(
&join_reassoc_req->bssDescription);
bss_ies = &join_reassoc_req->bssDescription.ieFields;
is_vendor_ap_1_present = (wlan_get_vendor_ie_ptr_from_oui(
SIR_MAC_VENDOR_AP_1_OUI, SIR_MAC_VENDOR_AP_1_OUI_LEN,
bss_ies, bss_ie_len) != NULL);
if (mac_ctx->roam.configParam.is_force_1x1 &&
is_vendor_ap_1_present && (session_entry->nss == 2) &&
(!mac_ctx->mlme_cfg->gen.as_enabled ||
wlan_reg_is_5ghz_ch_freq(session_entry->curr_op_freq))) {
/* SET vdev param */
pe_debug("sending SMPS intolrent vdev_param");
wma_cli_set_command(session_entry->smeSessionId,
(int)WMI_VDEV_PARAM_SMPS_INTOLERANT,
1, VDEV_CMD);
}
} else {
if (session_entry->beacon) {
qdf_mem_free(session_entry->beacon);
session_entry->beacon = NULL;
session_entry->bcnLen = 0;
}
if (session_entry->assoc_req) {
qdf_mem_free(session_entry->assoc_req);
session_entry->assoc_req = NULL;
session_entry->assocReqLen = 0;
}
if (session_entry->assocRsp) {
qdf_mem_free(session_entry->assocRsp);
session_entry->assocRsp = NULL;
session_entry->assocRspLen = 0;
}
if (session_entry->ricData) {
qdf_mem_free(session_entry->ricData);
session_entry->ricData = NULL;
session_entry->RICDataLen = 0;
}
#ifdef FEATURE_WLAN_ESE
if (session_entry->tspecIes) {
qdf_mem_free(session_entry->tspecIes);
session_entry->tspecIes = NULL;
session_entry->tspecLen = 0;
}
#endif
}
}
#ifdef WLAN_FEATURE_11AX
static void lim_add_he_info(struct parsed_ies *parsed_ies,
struct join_rsp *sme_join_rsp)
{
if (parsed_ies->he_operation.present)
sme_join_rsp->he_operation = parsed_ies->he_operation;
}
#else
static inline void lim_add_he_info(struct parsed_ies *parsed_ies,
struct join_rsp *sme_join_rsp)
{
}
#endif
#ifdef WLAN_FEATURE_11BE
static void lim_add_eht_info(struct parsed_ies *parsed_ies,
struct join_rsp *sme_join_rsp)
{
if (parsed_ies->eht_operation.present)
sme_join_rsp->eht_operation = parsed_ies->eht_operation;
}
#else
static inline void lim_add_eht_info(struct parsed_ies *parsed_ies,
struct join_rsp *sme_join_rsp)
{
}
#endif
/**
* lim_add_bss_info() - copy data from session entry to join rsp
* @sta_ds: Station dph entry
* @sme_join_rsp: Join response buffer to be filled up
*
* Return: None
*/
static void lim_add_bss_info(tpDphHashNode sta_ds,
struct join_rsp *sme_join_rsp)
{
struct parsed_ies *parsed_ies = &sta_ds->parsed_ies;
if (parsed_ies->hs20vendor_ie.present)
sme_join_rsp->hs20vendor_ie = parsed_ies->hs20vendor_ie;
if (parsed_ies->vht_caps.present)
sme_join_rsp->vht_caps = parsed_ies->vht_caps;
if (parsed_ies->ht_caps.present)
sme_join_rsp->ht_caps = parsed_ies->ht_caps;
if (parsed_ies->ht_operation.present)
sme_join_rsp->ht_operation = parsed_ies->ht_operation;
if (parsed_ies->vht_operation.present)
sme_join_rsp->vht_operation = parsed_ies->vht_operation;
lim_add_he_info(parsed_ies, sme_join_rsp);
lim_add_eht_info(parsed_ies, sme_join_rsp);
}
#ifdef WLAN_FEATURE_FILS_SK
static void lim_update_fils_seq_num(struct join_rsp *sme_join_rsp,
struct pe_session *session_entry)
{
sme_join_rsp->fils_seq_num =
session_entry->fils_info->sequence_number;
}
#else
static inline void lim_update_fils_seq_num(struct join_rsp *sme_join_rsp,
struct pe_session *session_entry)
{}
#endif
void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
uint16_t msg_type,
tSirResultCodes result_code,
uint16_t prot_status_code,
struct pe_session *session_entry,
uint8_t vdev_id)
{
struct join_rsp *sme_join_rsp;
uint32_t rsp_len;
tpDphHashNode sta_ds = NULL;
uint32_t bcn_data_len = 0;
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
if (msg_type == eWNI_SME_REASSOC_RSP)
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_REASSOC_RSP_EVENT,
session_entry, (uint16_t) result_code, 0);
else
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_JOIN_RSP_EVENT,
session_entry, (uint16_t) result_code, 0);
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
pe_debug("Sending message: %s with reasonCode: %s",
lim_msg_str(msg_type), lim_result_code_str(result_code));
if (!session_entry) {
rsp_len = sizeof(*sme_join_rsp);
sme_join_rsp = qdf_mem_malloc(rsp_len);
if (!sme_join_rsp)
return;
sme_join_rsp->beaconLength = 0;
sme_join_rsp->assocReqLength = 0;
sme_join_rsp->assocRspLength = 0;
} else {
if (session_entry->bcnLen > sizeof(struct wlan_frame_hdr))
bcn_data_len = session_entry->bcnLen -
sizeof(struct wlan_frame_hdr);
rsp_len = session_entry->assocReqLen +
session_entry->assocRspLen + bcn_data_len +
session_entry->RICDataLen +
#ifdef FEATURE_WLAN_ESE
session_entry->tspecLen +
#endif
sizeof(*sme_join_rsp) - sizeof(uint8_t);
sme_join_rsp = qdf_mem_malloc(rsp_len);
if (!sme_join_rsp)
return;
if (lim_is_fils_connection(session_entry)) {
sme_join_rsp->is_fils_connection = true;
lim_update_fils_seq_num(sme_join_rsp,
session_entry);
}
if (result_code == eSIR_SME_SUCCESS) {
sta_ds = dph_get_hash_entry(mac_ctx,
DPH_STA_HASH_INDEX_PEER,
&session_entry->dph.dphHashTable);
if (!sta_ds) {
pe_err("Get Self Sta Entry fail");
} else {
sme_join_rsp->timingMeasCap =
sta_ds->timingMeasCap;
#ifdef FEATURE_WLAN_TDLS
sme_join_rsp->tdls_prohibited =
mlme_get_tdls_prohibited(
session_entry->vdev);
sme_join_rsp->tdls_chan_swit_prohibited =
mlme_get_tdls_chan_switch_prohibited(
session_entry->vdev);
#endif
sme_join_rsp->nss = sta_ds->nss;
sme_join_rsp->max_rate_flags =
lim_get_max_rate_flags(mac_ctx, sta_ds);
lim_add_bss_info(sta_ds, sme_join_rsp);
/* Copy FILS params only for Successful join */
populate_fils_connect_params(mac_ctx,
session_entry, sme_join_rsp);
}
}
sme_join_rsp->beaconLength = 0;
sme_join_rsp->assocReqLength = 0;
sme_join_rsp->assocRspLength = 0;
sme_join_rsp->parsedRicRspLen = 0;
#ifdef FEATURE_WLAN_ESE
sme_join_rsp->tspecIeLen = 0;
#endif
lim_handle_join_rsp_status(mac_ctx, session_entry, result_code,
sme_join_rsp);
sme_join_rsp->uapsd_mask = session_entry->gUapsdPerAcBitmask;
}
sme_join_rsp->messageType = msg_type;
sme_join_rsp->length = (uint16_t) rsp_len;
sme_join_rsp->status_code = result_code;
sme_join_rsp->protStatusCode = prot_status_code;
sme_join_rsp->vdev_id = vdev_id;
lim_send_sme_join_reassoc_rsp_after_resume(mac_ctx, QDF_STATUS_SUCCESS,
sme_join_rsp);
}
#endif
void lim_send_sme_start_bss_rsp(struct mac_context *mac,
uint16_t msgType,
tSirResultCodes resultCode,
@@ -1006,7 +640,6 @@ void lim_send_sme_start_bss_rsp(struct mac_context *mac,
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
} /*** end lim_send_sme_start_bss_rsp() ***/
#ifdef FEATURE_CM_ENABLE
static void lim_send_sta_disconnect_ind(struct mac_context *mac,
struct scheduler_msg *msg)
{
@@ -1140,28 +773,6 @@ void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac,
lim_sap_send_sme_disassoc_deauth_ntf(mac, status, pCtx);
}
#else
static void lim_send_sta_disconnect_ind(struct mac_context *mac,
struct scheduler_msg *msg)
{
lim_sys_process_mmh_msg_api(mac, msg);
}
void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac,
QDF_STATUS status, uint32_t *pCtx)
{
struct scheduler_msg mmhMsg = {0};
struct scheduler_msg *pMsg = (struct scheduler_msg *)pCtx;
mmhMsg.type = pMsg->type;
mmhMsg.bodyptr = pMsg;
mmhMsg.bodyval = 0;
MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
}
#endif
void lim_send_sme_disassoc_ntf(struct mac_context *mac,
tSirMacAddr peerMacAddr,

View File

@@ -94,7 +94,6 @@ void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
struct pe_session *session_entry,
uint8_t vdev_id);
#ifdef FEATURE_CM_ENABLE
/**
* lim_cm_send_connect_rsp() - Send Response to Upper Layers
* @mac_ctx: Pointer to Global MAC structure
@@ -114,7 +113,6 @@ void lim_cm_send_connect_rsp(struct mac_context *mac_ctx,
QDF_STATUS connect_status,
enum wlan_status_code status_code,
bool is_reassoc);
#endif
/**
* lim_prepare_disconnect_done_ind() - Prepares the disconnect done ind message

View File

@@ -152,55 +152,6 @@ lim_is_rsn_ie_valid_in_sme_req_message(struct mac_context *mac_ctx,
return true;
} /*** end lim_is_rs_nie_valid_in_sme_req_message() ***/
#ifndef FEATURE_CM_ENABLE
/**
* lim_is_addie_valid_in_sme_req_message()
*
***FUNCTION:
* This function is called to verify if the Add IE
* received in various SME_REQ messages is valid or not
*
***LOGIC:
* Add IE validity checks are performed on only length
*
***ASSUMPTIONS:
*
***NOTE:
*
* @param mac Pointer to Global MAC structure
* @param pWSCie Pointer to received WSC IE
* @return true when WSC IE is valid, false otherwise
*/
static uint8_t
lim_is_addie_valid_in_sme_req_message(struct mac_context *mac, tpSirAddie pAddie)
{
int left = pAddie->length;
uint8_t *ptr = pAddie->addIEdata;
uint8_t elem_id, elem_len;
if (left == 0)
return true;
while (left >= 2) {
elem_id = ptr[0];
elem_len = ptr[1];
left -= 2;
if (elem_len > left) {
pe_err("Invalid Add IEs eid: %d elem_len: %d left: %d",
elem_id, elem_len, left);
return false;
}
left -= elem_len;
ptr += (elem_len + 2);
}
/* there shouldn't be any left byte */
return true;
} /*** end lim_is_addie_valid_in_sme_req_message() ***/
#endif
/**
* lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message() - to set rsnie/wpaie
*
@@ -323,39 +274,6 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *mac_ctx,
return true;
}
#ifndef FEATURE_CM_ENABLE
/**
* lim_is_bss_descr_valid_in_sme_req_message()
*
***FUNCTION:
* This function is called to verify if the BSS Descr
* received in various SME_REQ messages is valid or not
*
***LOGIC:
* BSS Descritipion validity checks are performed in this function
*
***ASSUMPTIONS:
*
***NOTE:
*
* @param mac Pointer to Global MAC structure
* @param pBssDescr Pointer to received Bss Descritipion
* @return true when BSS description is valid, false otherwise
*/
static uint8_t
lim_is_bss_descr_valid_in_sme_req_message(struct mac_context *mac,
struct bss_description *pBssDescr)
{
uint8_t valid = true;
if (QDF_IS_ADDR_BROADCAST(pBssDescr->bssId) || !pBssDescr->chan_freq)
valid = false;
return valid;
} /*** end lim_is_bss_descr_valid_in_sme_req_message() ***/
#endif
bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
struct start_bss_req *start_bss_req)
{
@@ -439,50 +357,6 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
return true;
}
#ifndef FEATURE_CM_ENABLE
uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
struct join_req *pJoinReq)
{
uint8_t valid = true;
/*
* If force_rsne_override is enabled that mean User has provided the
* test RSNIE which need to be send as it is in assoc req and thus RSNIE
* validity is not required.
*/
if (!pJoinReq->force_rsne_override &&
!lim_is_rsn_ie_valid_in_sme_req_message(mac, &pJoinReq->rsnIE)) {
pe_err("received SME_JOIN_REQ with invalid RSNIE");
valid = false;
goto end;
}
if (!lim_is_addie_valid_in_sme_req_message(mac, &pJoinReq->addIEScan)) {
pe_err("received SME_JOIN_REQ with invalid additional IE for scan");
valid = false;
goto end;
}
if (!lim_is_addie_valid_in_sme_req_message(mac, &pJoinReq->addIEAssoc)) {
pe_err("received SME_JOIN_REQ with invalid additional IE for assoc");
valid = false;
goto end;
}
if (!lim_is_bss_descr_valid_in_sme_req_message(mac, &pJoinReq->bssDescription)) {
/* / Received eWNI_SME_JOIN_REQ with invalid BSS Info */
/* Log the event */
pe_err("received SME_JOIN_REQ with invalid bssInfo");
valid = false;
goto end;
}
end:
return valid;
} /*** end lim_is_sme_join_req_valid() ***/
#endif
bool lim_is_sme_disassoc_req_valid(struct mac_context *mac,
struct disassoc_req *disassoc_req,
struct pe_session *pe_session)

View File

@@ -51,21 +51,6 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
tpSirRSNie, struct pe_session *);
#ifndef FEATURE_CM_ENABLE
/**
* lim_is_sme_join_req_valid() - Verify join request message is valid
* @mac: Pointer to Global MAC structure
* @pJoinReq: Pointer to received SME_JOIN_REQ message
*
* This function is called by lim_process_sme_req_messages() upon
* receiving SME_JOIN_REQ message from application.
*
* Return: true when received SME_JOIN_REQ is formatted correctly
* false otherwise
*/
uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
struct join_req *pJoinReq);
#endif
/**
* lim_is_sme_disassoc_req_valid() - Validate disassoc req message
* @mac: Pointer to Global MAC structure

View File

@@ -1145,7 +1145,6 @@ QDF_STATUS lim_deauth_tx_complete_cnf(void *context,
uint32_t txCompleteSuccess,
void *params);
#ifdef FEATURE_CM_ENABLE
/**
* lim_cm_send_disconnect_rsp() - To send disconnect rsp to CM
* @ctx: pointer to mac structure
@@ -1154,7 +1153,6 @@ QDF_STATUS lim_deauth_tx_complete_cnf(void *context,
* return: None
*/
void lim_cm_send_disconnect_rsp(struct mac_context *mac_ctx, uint8_t vdev_id);
#endif
void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac_ctx,
QDF_STATUS status, uint32_t *ctx);

View File

@@ -41,32 +41,6 @@
#include "wma_if.h"
#include "wma.h"
#ifndef FEATURE_CM_ENABLE
/**
* mac_trace_get_neighbour_roam_state() - Get the neighbor roam state
* @neighbourroamstate: State in numeric form
*
* This function will return a string equivalent of the state.
*
* Return: String equivalent of the state.
**/
uint8_t *mac_trace_get_neighbour_roam_state(uint16_t neighbourroamstate)
{
switch (neighbourroamstate) {
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CLOSED);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_INIT);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE);
CASE_RETURN_STRING(eNEIGHBOR_STATE_MAX);
default:
return (uint8_t *) "UNKNOWN";
break;
}
}
#endif
/**
* mac_trace_getcsr_roam_state() - Get the csr roam state
* @csr_roam_state: State in numeric form
@@ -104,16 +78,6 @@ uint8_t *mac_trace_getcsr_roam_sub_state(uint16_t csr_roam_sub_state)
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_START_BSS_REQ);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DISASSOC_REQ);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_STOP_BSS_REQ);
#ifndef FEATURE_CM_ENABLE
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_JOIN_REQ);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_REASSOC_REQ);
CASE_RETURN_STRING
(eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DISASSOC_FORCED);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF);
#endif
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_CONFIG);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DEAUTH_REQ);
CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY);
@@ -252,10 +216,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
CASE_RETURN_STRING(eWNI_SME_NEIGHBOR_REPORT_IND);
CASE_RETURN_STRING(eWNI_SME_BEACON_REPORT_REQ_IND);
CASE_RETURN_STRING(eWNI_SME_BEACON_REPORT_RESP_XMIT_IND);
#ifndef FEATURE_CM_ENABLE
CASE_RETURN_STRING(eWNI_SME_FT_PRE_AUTH_REQ);
CASE_RETURN_STRING(eWNI_SME_FT_PRE_AUTH_RSP);
#endif
CASE_RETURN_STRING(eWNI_SME_FT_AGGR_QOS_REQ);
CASE_RETURN_STRING(eWNI_SME_FT_AGGR_QOS_RSP);
#if defined FEATURE_WLAN_ESE
@@ -267,9 +227,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
#ifdef WLAN_FEATURE_GTK_OFFLOAD
CASE_RETURN_STRING(eWNI_PMC_GTK_OFFLOAD_GETINFO_RSP);
#endif /* WLAN_FEATURE_GTK_OFFLOAD */
#ifndef FEATURE_CM_ENABLE
CASE_RETURN_STRING(eWNI_SME_ROAM_SCAN_OFFLOAD_RSP);
#endif
CASE_RETURN_STRING(eWNI_SME_DFS_RADAR_FOUND);
CASE_RETURN_STRING(eWNI_SME_CHANNEL_CHANGE_REQ);
CASE_RETURN_STRING(eWNI_SME_CHANNEL_CHANGE_RSP);
@@ -283,11 +240,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
CASE_RETURN_STRING(eWNI_SME_AUTO_SHUTDOWN_IND);
#endif
CASE_RETURN_STRING(eWNI_SME_SET_HT_2040_MODE);
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
CASE_RETURN_STRING(eWNI_SME_HO_FAIL_IND);
#endif
#endif
#ifdef FEATURE_WLAN_TDLS
CASE_RETURN_STRING(eWNI_SME_TDLS_SEND_MGMT_REQ);
CASE_RETURN_STRING(eWNI_SME_TDLS_SEND_MGMT_RSP);
@@ -305,10 +257,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
CASE_RETURN_STRING(eWNI_SME_TDLS_PEER_DISCONNECTED);
#endif
CASE_RETURN_STRING(eWNI_SME_UNPROT_MGMT_FRM_IND);
#ifndef FEATURE_CM_ENABLE
CASE_RETURN_STRING(eWNI_SME_CANDIDATE_FOUND_IND);
CASE_RETURN_STRING(eWNI_SME_HANDOFF_REQ);
#endif
CASE_RETURN_STRING(eWNI_SME_GET_TSM_STATS_REQ);
CASE_RETURN_STRING(eWNI_SME_GET_TSM_STATS_RSP);
CASE_RETURN_STRING(eWNI_SME_TSM_IE_IND);
@@ -495,11 +443,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
CASE_RETURN_STRING(WMA_INIT_THERMAL_INFO_CMD);
CASE_RETURN_STRING(WMA_SET_THERMAL_LEVEL);
CASE_RETURN_STRING(WMA_SET_SAP_INTRABSS_DIS);
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
CASE_RETURN_STRING(WMA_ROAM_OFFLOAD_SYNCH_FAIL);
#endif
#endif
CASE_RETURN_STRING(SIR_HAL_SET_BASE_MACADDR_IND);
CASE_RETURN_STRING(WMA_LINK_STATUS_GET_REQ);
#ifdef DHCP_SERVER_OFFLOAD
@@ -524,11 +467,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
CASE_RETURN_STRING(WMA_SET_PDEV_IE_REQ);
CASE_RETURN_STRING(WMA_SEND_FREQ_RANGE_CONTROL_IND);
CASE_RETURN_STRING(WMA_POWER_DEBUG_STATS_REQ);
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
CASE_RETURN_STRING(SIR_HAL_ROAM_INVOKE);
#endif
#endif
CASE_RETURN_STRING(SIR_HAL_SET_MAS);
CASE_RETURN_STRING(SIR_HAL_SET_MIRACAST);
CASE_RETURN_STRING(SIR_HAL_CONFIG_STATS_FACTOR);

View File

@@ -2153,7 +2153,6 @@ void populate_dot11f_re_assoc_tspec(struct mac_context *mac,
{
uint8_t numTspecs = 0, idx;
tTspecInfo *pTspec = NULL;
#ifdef FEATURE_CM_ENABLE
struct mlme_legacy_priv *mlme_priv;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(pe_session->vdev);
@@ -2162,11 +2161,6 @@ void populate_dot11f_re_assoc_tspec(struct mac_context *mac,
numTspecs = mlme_priv->connect_info.ese_tspec_info.numTspecs;
pTspec = &mlme_priv->connect_info.ese_tspec_info.tspec[0];
#else
numTspecs = pe_session->pLimReAssocReq->eseTspecInfo.numTspecs;
pTspec = &pe_session->pLimReAssocReq->eseTspecInfo.tspec[0];
#endif
pReassoc->num_WMMTSPEC = numTspecs;
if (numTspecs) {
for (idx = 0; idx < numTspecs; idx++) {

View File

@@ -112,28 +112,6 @@ QDF_STATUS sme_release_global_lock(struct sme_context *sme)
return qdf_mutex_release(&sme->sme_global_lock);
}
#ifndef FEATURE_CM_ENABLE
QDF_STATUS cm_roam_acquire_lock(struct wlan_objmgr_vdev *vdev)
{
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_SME);
if (!mac)
return QDF_STATUS_E_FAILURE;
return sme_acquire_global_lock(&mac->sme);
}
QDF_STATUS cm_roam_release_lock(struct wlan_objmgr_vdev *vdev)
{
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_SME);
if (!mac)
return QDF_STATUS_E_FAILURE;
return sme_release_global_lock(&mac->sme);
}
#endif
struct mac_context *sme_get_mac_context(void)
{
struct mac_context *mac_ctx;

View File

@@ -999,12 +999,6 @@ typedef struct {
bool tx_chain_mask_cck;
qdf_mc_timer_t service_ready_ext_timer;
#ifndef FEATURE_CM_ENABLE
QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
struct roam_offload_synch_ind *roam_synch_data,
struct bss_description *bss_desc_ptr,
enum sir_roam_op_code reason);
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
uint8_t vdev_id,
struct qdf_mac_addr bssid);

View File

@@ -171,13 +171,6 @@ QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
*/
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifndef FEATURE_CM_ENABLE
void wma_process_roam_invoke(WMA_HANDLE handle,
struct roam_invoke_req *roaminvoke);
void wma_process_roam_synch_fail(WMA_HANDLE handle,
struct roam_offload_synch_fail *synch_fail);
#endif
int wma_roam_synch_event_handler(void *handle, uint8_t *event,
uint32_t len);
@@ -558,12 +551,6 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id);
int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
uint32_t len);
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id);
#endif
#endif
/*
* wma_dev_if.c functions declarations
*/

View File

@@ -220,11 +220,6 @@ enum wmamsgtype {
WMA_ROAM_PRE_AUTH_STATUS = SIR_HAL_ROAM_PRE_AUTH_STATUS_IND,
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
WMA_ROAM_OFFLOAD_SYNCH_FAIL = SIR_HAL_ROAM_OFFLOAD_SYNCH_FAIL,
#endif
#endif
WMA_8023_MULTICAST_LIST_REQ = SIR_HAL_8023_MULTICAST_LIST_REQ,
#ifdef WLAN_FEATURE_PACKET_FILTERING
@@ -726,9 +721,6 @@ QDF_STATUS wma_register_mgmt_frm_client(void);
QDF_STATUS wma_de_register_mgmt_frm_client(void);
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
QDF_STATUS wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb,
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(
struct mac_context *mac,
uint8_t vdev_id,
@@ -741,9 +733,6 @@ QDF_STATUS wma_register_roaming_callbacks(
uint16_t reason_code));
#else
static inline QDF_STATUS wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb,
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(
struct mac_context *mac,
uint8_t vdev_id,

View File

@@ -2221,7 +2221,6 @@ void wma_send_vdev_down(tp_wma_handle wma, struct del_bss_resp *resp)
sizeof(*resp), resp);
}
#ifdef FEATURE_CM_ENABLE
/**
* wma_send_vdev_down_req() - handle vdev down req
* @wma: wma handle
@@ -2248,17 +2247,6 @@ static void wma_send_vdev_down_req(tp_wma_handle wma,
WLAN_VDEV_SM_EV_MLME_DOWN_REQ,
sizeof(*resp), resp);
}
#else
static void wma_send_vdev_down_req(tp_wma_handle wma,
struct del_bss_resp *resp)
{
struct wma_txrx_node *iface = &wma->interfaces[resp->vdev_id];
wlan_vdev_mlme_sm_deliver_evt(iface->vdev,
WLAN_VDEV_SM_EV_MLME_DOWN_REQ,
sizeof(*resp), resp);
}
#endif
static QDF_STATUS
wma_delete_peer_on_vdev_stop(tp_wma_handle wma, uint8_t vdev_id)
@@ -2332,7 +2320,6 @@ free_params:
return status;
}
#ifdef FEATURE_CM_ENABLE
QDF_STATUS
cm_send_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev)
{
@@ -2394,39 +2381,7 @@ __wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event)
return wma_delete_peer_on_vdev_stop(wma, resp_event->vdev_id);
}
#else
QDF_STATUS
__wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event)
{
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
struct wma_txrx_node *iface;
if (!wma)
return QDF_STATUS_E_INVAL;
/* Ignore stop_response in Monitor mode */
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
return QDF_STATUS_SUCCESS;
iface = &wma->interfaces[resp_event->vdev_id];
/* vdev in stopped state, no more waiting for key */
iface->is_waiting_for_key = false;
/*
* Reset the rmfEnabled as there might be MGMT action frames
* sent on this vdev before the next session is established.
*/
if (iface->rmfEnabled) {
iface->rmfEnabled = 0;
wma_debug("Reset rmfEnabled for vdev %d",
resp_event->vdev_id);
}
return wma_delete_peer_on_vdev_stop(wma, resp_event->vdev_id);
}
#endif
/**
* wma_handle_vdev_stop_rsp() - handle vdev stop resp
* @wma: wma handle

View File

@@ -8817,21 +8817,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
qdf_mem_free(msg->bodyptr);
break;
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifndef FEATURE_CM_ENABLE
case WMA_ROAM_OFFLOAD_SYNCH_FAIL:
wma_process_roam_synch_fail(wma_handle,
(struct roam_offload_synch_fail *)msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case SIR_HAL_ROAM_INVOKE:
wma_debug("SIR_HAL_ROAM_INVOKE - wma_process_roam_invoke");
wma_process_roam_invoke(wma_handle,
(struct roam_invoke_req *)msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
#endif
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
case SIR_HAL_SET_BASE_MACADDR_IND:
wma_set_base_macaddr_indicate(wma_handle,
(tSirMacAddr *) msg->bodyptr);

View File

@@ -3719,7 +3719,6 @@ QDF_STATUS wma_de_register_mgmt_frm_client(void)
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/**
* wma_register_roaming_callbacks() - Register roaming callbacks
* @csr_roam_synch_cb: CSR roam synch callback routine pointer
* @csr_roam_auth_event_handle_cb: CSR callback routine pointer
* @pe_roam_synch_cb: PE roam synch callback routine pointer
*
@@ -3729,9 +3728,6 @@ QDF_STATUS wma_de_register_mgmt_frm_client(void)
* Return: Success or Failure Status
*/
QDF_STATUS wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb,
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
uint8_t vdev_id,
struct qdf_mac_addr bssid),
@@ -3748,9 +3744,6 @@ QDF_STATUS wma_register_roaming_callbacks(
if (!wma)
return QDF_STATUS_E_FAILURE;
#ifndef FEATURE_CM_ENABLE
wma->csr_roam_synch_cb = csr_roam_synch_cb;
#endif
wma->csr_roam_auth_event_handle_cb = csr_roam_auth_event_handle_cb;
wma->pe_roam_synch_cb = pe_roam_synch_cb;
wma->pe_disconnect_cb = pe_disconnect_cb;

View File

@@ -85,9 +85,7 @@
#ifdef FEATURE_WLAN_DIAG_SUPPORT /* FEATURE_WLAN_DIAG_SUPPORT */
#include "host_diag_core_log.h"
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
#ifdef FEATURE_CM_ENABLE
#include <../../core/src/wlan_cm_roam_i.h>
#endif
#ifdef FEATURE_WLAN_EXTSCAN
#define WMA_EXTSCAN_CYCLE_WAKE_LOCK_DURATION WAKELOCK_DURATION_RECOMMENDED
@@ -497,70 +495,6 @@ wma_send_roam_preauth_status(tp_wma_handle wma_handle,
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifndef FEATURE_CM_ENABLE
/**
* wma_process_roam_invoke() - send roam invoke command to fw.
* @handle: wma handle
* @roaminvoke: roam invoke command
*
* Send roam invoke command to fw for fastreassoc.
*
* Return: none
*/
void wma_process_roam_invoke(WMA_HANDLE handle,
struct roam_invoke_req *roaminvoke)
{
tp_wma_handle wma_handle = (tp_wma_handle) handle;
struct wmi_unified *wmi_handle;
if (wma_validate_handle(wma_handle))
goto free_frame_buf;
wmi_handle = wma_handle->wmi_handle;
if (wmi_validate_handle(wmi_handle))
goto free_frame_buf;
if (!wma_is_vdev_valid(roaminvoke->vdev_id)) {
wma_err("Invalid vdev id:%d", roaminvoke->vdev_id);
goto free_frame_buf;
}
wma_err("Sending ROAM INVOKE CMD vdev id:%d", roaminvoke->vdev_id);
wmi_unified_roam_invoke_cmd(wmi_handle,
(struct roam_invoke_req *)roaminvoke);
free_frame_buf:
if (roaminvoke->frame_len) {
qdf_mem_free(roaminvoke->frame_buf);
roaminvoke->frame_buf = NULL;
}
}
/**
* wma_process_roam_synch_fail() -roam synch failure handle
* @handle: wma handle
* @synch_fail: roam synch fail parameters
*
* Return: none
*/
void wma_process_roam_synch_fail(WMA_HANDLE handle,
struct roam_offload_synch_fail *synch_fail)
{
tp_wma_handle wma_handle = (tp_wma_handle) handle;
struct wmi_unified *wmi_handle;
if (wma_validate_handle(wma_handle))
return;
wmi_handle = wma_handle->wmi_handle;
if (wmi_validate_handle(wmi_handle))
return;
wlan_roam_debug_log(synch_fail->session_id,
DEBUG_ROAM_SYNCH_FAIL,
DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0);
}
#endif
/**
* wma_free_roam_synch_frame_ind() - Free the bcn_probe_rsp, reassoc_req,
* reassoc_rsp received as part of the ROAM_SYNC_FRAME event
@@ -755,15 +689,9 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
roam_synch_ind_ptr->rssi,
roam_synch_ind_ptr->isBeacon);
#ifdef FEATURE_CM_ENABLE
if (!QDF_IS_STATUS_SUCCESS(
cm_fw_roam_sync_start_ind(iface->vdev,
roam_synch_ind_ptr)))
#else
if (!QDF_IS_STATUS_SUCCESS(
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
NULL, SIR_ROAMING_DEREGISTER_STA)))
#endif
{
wma_err("LFR3: CSR Roam synch cb failed");
wma_free_roam_synch_frame_ind(iface);
@@ -1027,15 +955,6 @@ static void wma_update_phymode_on_roam(tp_wma_handle wma, uint8_t *bssid,
wma_debug("LFR3: new phymode %d", bss_phymode);
}
#ifndef FEATURE_CM_ENABLE
static void wma_post_roam_sync_failure(tp_wma_handle wma, uint8_t vdev_id)
{
wlan_cm_roam_stop_req(wma->psoc, vdev_id, REASON_ROAM_SYNCH_FAILED);
wma_debug("In cleanup: RSO Command:%d, reason %d vdev %d",
ROAM_SCAN_OFFLOAD_STOP, REASON_ROAM_SYNCH_FAILED, vdev_id);
}
#endif
int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
uint32_t len)
{
@@ -1230,45 +1149,23 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
wma_update_phymode_on_roam(wma, roam_synch_ind_ptr->bssid.bytes,
param_buf->chan,
&wma->interfaces[synch_event->vdev_id]);
#ifdef FEATURE_CM_ENABLE
cm_fw_roam_sync_propagation(wma->psoc,
synch_event->vdev_id,
roam_synch_ind_ptr);
#else
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_PROPAGATION);
wma_process_roam_synch_complete(wma, synch_event->vdev_id);
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_COMPLETE);
#endif
wma->interfaces[synch_event->vdev_id].roam_synch_delay =
qdf_get_system_timestamp() - roam_synch_received;
wma_debug("LFR3: roam_synch_delay:%d",
wma->interfaces[synch_event->vdev_id].roam_synch_delay);
#ifndef FEATURE_CM_ENABLE
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_NAPI_OFF);
#endif
status = 0;
cleanup_label:
if (status != 0) {
#ifdef FEATURE_CM_ENABLE
if (synch_event) {
cm_fw_roam_abort_req(wma->psoc, synch_event->vdev_id);
cm_roam_stop_req(wma->psoc, synch_event->vdev_id,
REASON_ROAM_SYNCH_FAILED);
}
#else
if (roam_synch_ind_ptr)
wma->csr_roam_synch_cb(wma->mac_context,
roam_synch_ind_ptr, NULL,
SIR_ROAMING_ABORT);
if (synch_event)
wma_post_roam_sync_failure(wma, synch_event->vdev_id);
#endif
}
if (roam_synch_ind_ptr && roam_synch_ind_ptr->ric_tspec_data)
@@ -1433,11 +1330,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
wmi_roam_synch_event_fixed_param *synch_event = NULL;
WMI_ROAM_SYNCH_EVENTID_param_tlvs *param_buf = NULL;
tp_wma_handle wma = (tp_wma_handle)handle;
#ifndef FEATURE_CM_ENABLE
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
struct wma_txrx_node *iface = NULL;
struct vdev_mlme_obj *mlme_obj;
#endif
if (!event) {
wma_err_rl("event param null");
return status;
@@ -1459,26 +1352,9 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
synch_event->vdev_id);
return status;
}
#ifdef FEATURE_CM_ENABLE
cm_fw_roam_sync_req(wma->psoc, synch_event->vdev_id, event, len);
#else
iface = &wma->interfaces[synch_event->vdev_id];
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(iface->vdev);
if (mlme_obj)
mlme_obj->mgmt.generic.tx_pwrlimit =
synch_event->max_allowed_tx_power;
qdf_status = wlan_vdev_mlme_sm_deliver_evt(iface->vdev,
WLAN_VDEV_SM_EV_ROAM,
len,
event);
if (QDF_IS_STATUS_ERROR(qdf_status)) {
wma_err("Failed to send the EV_ROAM");
wma_post_roam_sync_failure(wma, synch_event->vdev_id);
return status;
}
wma_debug("Posted EV_ROAM to VDEV SM");
#endif
cm_fw_roam_sync_req(wma->psoc, synch_event->vdev_id, event, len);
return 0;
}
@@ -2439,83 +2315,6 @@ int wma_rssi_breached_event_handler(void *handle,
}
#endif /* FEATURE_RSSI_MONITOR */
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/**
* wma_roam_ho_fail_handler() - LFR3.0 roam hand off failed handler
* @wma: wma handle
* @vdev_id: vdev id
*
* Return: none
*/
static void
wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id,
struct qdf_mac_addr bssid)
{
struct handoff_failure_ind *ho_failure_ind;
struct scheduler_msg sme_msg = { 0 };
QDF_STATUS qdf_status;
ho_failure_ind = qdf_mem_malloc(sizeof(*ho_failure_ind));
if (!ho_failure_ind)
return;
ho_failure_ind->vdev_id = vdev_id;
ho_failure_ind->bssid = bssid;
sme_msg.type = eWNI_SME_HO_FAIL_IND;
sme_msg.bodyptr = ho_failure_ind;
sme_msg.bodyval = 0;
qdf_status = scheduler_post_message(QDF_MODULE_ID_WMA,
QDF_MODULE_ID_SME,
QDF_MODULE_ID_SME, &sme_msg);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
wma_err("Fail to post eWNI_SME_HO_FAIL_IND msg to SME");
qdf_mem_free(ho_failure_ind);
return;
}
}
/**
* wma_process_roam_synch_complete() - roam synch complete command to fw.
* @handle: wma handle
* @synchcnf: offload synch confirmation params
*
* This function sends roam synch complete event to fw.
*
* Return: none
*/
void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id)
{
tp_wma_handle wma_handle = (tp_wma_handle) handle;
struct wmi_unified *wmi_handle;
if (wma_validate_handle(wma_handle))
return;
wmi_handle = wma_handle->wmi_handle;
if (wmi_validate_handle(wmi_handle))
return;
if (!wma_is_vdev_valid(vdev_id))
return;
if (wmi_unified_roam_synch_complete_cmd(wmi_handle, vdev_id))
return;
DPTRACE(qdf_dp_trace_record_event(QDF_DP_TRACE_EVENT_RECORD,
vdev_id, QDF_TRACE_DEFAULT_PDEV_ID,
QDF_PROTO_TYPE_EVENT, QDF_ROAM_COMPLETE));
wma_info("LFR3: vdev[%d] Sent ROAM_SYNCH_COMPLETE", vdev_id);
wlan_roam_debug_log(vdev_id, DEBUG_ROAM_SYNCH_CNF,
DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0);
}
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#endif /* FEATURE_CM_ENABLE */
QDF_STATUS wma_pre_chan_switch_setup(uint8_t vdev_id)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -4186,13 +3985,8 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id)
{
struct scheduler_msg msg = {0};
QDF_STATUS status;
#ifdef FEATURE_CM_ENABLE
struct cm_host_roam_start_ind *ind;
#else
tSirSmeCandidateFoundInd *candidate_ind;
#endif
#ifdef FEATURE_CM_ENABLE
ind = qdf_mem_malloc(sizeof(*ind));
if (!ind)
return;
@@ -4208,24 +4002,6 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id)
QDF_MODULE_ID_OS_IF,
QDF_MODULE_ID_SCAN, &msg);
#else
candidate_ind = qdf_mem_malloc(sizeof(tSirSmeCandidateFoundInd));
if (!candidate_ind)
return;
wma->interfaces[vdev_id].roaming_in_progress = true;
candidate_ind->messageType = eWNI_SME_CANDIDATE_FOUND_IND;
candidate_ind->sessionId = vdev_id;
candidate_ind->length = sizeof(tSirSmeCandidateFoundInd);
msg.type = eWNI_SME_CANDIDATE_FOUND_IND;
msg.bodyptr = candidate_ind;
msg.callback = sme_mc_process_handler;
wma_debug("Posting candidate ind to SME, vdev %d", vdev_id);
status = scheduler_post_message(QDF_MODULE_ID_WMA, QDF_MODULE_ID_SME,
QDF_MODULE_ID_SCAN, &msg);
#endif
if (QDF_IS_STATUS_ERROR(status))
qdf_mem_free(msg.bodyptr);
}
@@ -4307,15 +4083,12 @@ static void wma_invalid_roam_reason_handler(tp_wma_handle wma_handle,
if (notif != WMI_ROAM_NOTIF_ROAM_START)
wma_handle->pe_roam_synch_cb(wma_handle->mac_context,
roam_synch_data, NULL, op_code);
#ifdef FEATURE_CM_ENABLE
if (notif == WMI_ROAM_NOTIF_ROAM_START)
cm_fw_roam_start_req(wma_handle->psoc, vdev_id);
else
cm_fw_roam_abort_req(wma_handle->psoc, vdev_id);
#else
wma_handle->csr_roam_synch_cb(wma_handle->mac_context, roam_synch_data,
NULL, op_code);
#endif
qdf_mem_free(roam_synch_data);
}
@@ -4471,11 +4244,8 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
wma_debug("mac addr to avoid "QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(bssid.bytes));
wma_handle_hw_mode_transition(wma_handle, param_buf);
#ifdef FEATURE_CM_ENABLE
cm_fw_ho_fail_req(wma_handle->psoc, wmi_event->vdev_id, bssid);
#else
wma_roam_ho_fail_handler(wma_handle, wmi_event->vdev_id, bssid);
#endif
lim_sae_auth_cleanup_retry(wma_handle->mac_context,
wmi_event->vdev_id);
break;
@@ -4496,13 +4266,7 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
lim_sae_auth_cleanup_retry(wma_handle->mac_context,
wmi_event->vdev_id);
roam_synch_data->roamed_vdev_id = wmi_event->vdev_id;
#ifdef FEATURE_CM_ENABLE
cm_fw_roam_invoke_fail(wma_handle->psoc, wmi_event->vdev_id);
#else
wma_handle->csr_roam_synch_cb(wma_handle->mac_context,
roam_synch_data, NULL,
SIR_ROAMING_INVOKE_FAIL);
#endif
wlan_cm_update_roam_states(wma_handle->psoc, wmi_event->vdev_id,
wmi_event->notif_params,
ROAM_INVOKE_FAIL_REASON);
@@ -4523,11 +4287,6 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
return -ENOMEM;
roam_synch_data->roamed_vdev_id = wmi_event->vdev_id;
#ifndef FEATURE_CM_ENABLE
wma_handle->csr_roam_synch_cb(
wma_handle->mac_context,
roam_synch_data, NULL, SIR_ROAMING_DEAUTH);
#endif
qdf_mem_free(roam_synch_data);
break;
default: