diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.h b/components/tdls/core/src/wlan_tdls_cmds_process.h index b6d7387988..c51b3b0a50 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.h +++ b/components/tdls/core/src/wlan_tdls_cmds_process.h @@ -29,25 +29,6 @@ ((TDLS_SETUP_REQUEST <= action) && \ (TDLS_SETUP_CONFIRM >= action)) -/** - * struct tdls_del_sta_req - TDLS Request struct TDLS module --> PE - * same as sSirTdlsDelStaReq - * @message_type: message type eWNI_SME_TDLS_DEL_STA_REQ - * @length: message length - * @session_id: session id - * @transaction_id: transaction id for cmd - * @bssid: bssid - * @peermac: MAC address of the TDLS peer - */ -struct tdls_del_sta_req { - uint16_t message_type; - uint16_t length; - uint8_t session_id; - uint16_t transaction_id; - struct qdf_mac_addr bssid; - struct qdf_mac_addr peermac; -}; - /** * tdls_process_add_peer() - add TDLS peer * @req: TDLS add peer request diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index 2f17b2c7ce..26a5dfb133 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -1288,4 +1288,22 @@ struct tdls_add_sta_req { uint8_t max_sp; }; +/** + * struct tdls_del_sta_req - TDLS Request struct TDLS module --> PE + * @message_type: message type eWNI_SME_TDLS_DEL_STA_REQ + * @length: message length + * @session_id: session id + * @transaction_id: transaction id for cmd + * @bssid: bssid + * @peermac: MAC address of the TDLS peer + */ +struct tdls_del_sta_req { + uint16_t message_type; + uint16_t length; + uint8_t session_id; + uint16_t transaction_id; + struct qdf_mac_addr bssid; + struct qdf_mac_addr peermac; +}; + #endif diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index aa3eb13a18..882893b9e1 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2517,19 +2517,6 @@ struct sir_antenna_mode_resp { enum set_antenna_mode_status status; }; -#ifdef FEATURE_WLAN_TDLS -/* TDLS Request struct SME-->PE */ -typedef struct sSirTdlsDelStaReq { - uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */ - uint16_t length; - uint8_t sessionId; /* Session ID */ - uint16_t transactionId; /* Transaction ID for cmd */ - /* For multi-session, for PE to locate peSession ID */ - struct qdf_mac_addr bssid; - struct qdf_mac_addr peermac; -} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq; -#endif /* FEATURE_WLAN_TDLS */ - /* Reset AP Caps Changed */ typedef struct sSirResetAPCapsChange { uint16_t messageType; diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 2244e8623b..c012c5ab96 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -3019,27 +3019,23 @@ lim_tdls_add_sta_error: return QDF_STATUS_SUCCESS; } -/* - * Process Del Sta Request from SME . - */ QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac, - uint32_t *pMsgBuf) + void *msg) { - /* get all discovery request parameters */ - tSirTdlsDelStaReq *pDelStaReq = (tSirTdlsDelStaReq *) pMsgBuf; + struct tdls_del_sta_req *del_sta_req = msg; struct pe_session *pe_session; - uint8_t sessionId; + uint8_t session_id; QDF_STATUS status = QDF_STATUS_E_FAILURE; pe_debug("TDLS Delete STA Request Received"); pe_session = - pe_find_session_by_bssid(mac, pDelStaReq->bssid.bytes, - &sessionId); + pe_find_session_by_bssid(mac, del_sta_req->bssid.bytes, + &session_id); if (pe_session == NULL) { - pe_err("PE Session does not exist for given sme sessionId: %d", - pDelStaReq->sessionId); - lim_send_sme_tdls_del_sta_rsp(mac, pDelStaReq->sessionId, - pDelStaReq->peermac, NULL, + pe_err("PE Session does not exist for given vdev id: %d", + del_sta_req->session_id); + lim_send_sme_tdls_del_sta_rsp(mac, del_sta_req->session_id, + del_sta_req->peermac, NULL, QDF_STATUS_E_FAILURE); return QDF_STATUS_E_FAILURE; } @@ -3047,15 +3043,15 @@ QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac, /* check if we are in proper state to work as TDLS client */ if (!LIM_IS_STA_ROLE(pe_session)) { pe_err("Del sta received in wrong system Role %d", - GET_LIM_SYSTEM_ROLE(pe_session)); + GET_LIM_SYSTEM_ROLE(pe_session)); goto lim_tdls_del_sta_error; } if (lim_is_roam_synch_in_progress(pe_session)) { pe_err("roaming in progress, reject del sta! for session %d", - pDelStaReq->sessionId); - lim_send_sme_tdls_del_sta_rsp(mac, pDelStaReq->sessionId, - pDelStaReq->peermac, NULL, + del_sta_req->session_id); + lim_send_sme_tdls_del_sta_rsp(mac, del_sta_req->session_id, + del_sta_req->peermac, NULL, QDF_STATUS_E_FAILURE); return QDF_STATUS_E_FAILURE; } @@ -3067,19 +3063,19 @@ QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac, if ((pe_session->limSmeState != eLIM_SME_ASSOCIATED_STATE) && (pe_session->limSmeState != eLIM_SME_LINK_EST_STATE)) { - pe_err("Del Sta received in invalid LIMsme state: (%d", - pe_session->limSmeState); + pe_err("Del Sta received in invalid LIMsme state: %d", + pe_session->limSmeState); goto lim_tdls_del_sta_error; } - status = lim_tdls_del_sta(mac, pDelStaReq->peermac, + status = lim_tdls_del_sta(mac, del_sta_req->peermac, pe_session, true); if (status == QDF_STATUS_SUCCESS) return status; lim_tdls_del_sta_error: lim_send_sme_tdls_del_sta_rsp(mac, pe_session->smeSessionId, - pDelStaReq->peermac, NULL, QDF_STATUS_E_FAILURE); + del_sta_req->peermac, NULL, QDF_STATUS_E_FAILURE); return status; } diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index 0128381477..2a75e81f0f 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -618,8 +618,18 @@ QDF_STATUS lim_process_sme_tdls_mgmt_send_req(struct mac_context *mac_ctx, QDF_STATUS lim_process_sme_tdls_add_sta_req(struct mac_context *mac, void *msg); +/** + * lim_process_sme_tdls_del_sta_req() - process TDLS Del STA + * @mac_ctx: global mac context + * @msg: message buffer received from SME. + * + * Process TDLS Delete Station request + * + * Return: QDF_STATUS_SUCCESS on success, error code otherwise + */ QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac, - uint32_t *pMsgBuf); + void *msg); + void lim_send_sme_mgmt_tx_completion( struct mac_context *mac, uint32_t sme_session_id,