diff options
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_tdls.c | 26 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_send_sme_rsp_messages.c | 5 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_types.h | 6 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_tdls_process.c | 14 |
4 files changed, 30 insertions, 21 deletions
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index cadcb11a3135..beae6d6a0062 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -512,21 +512,13 @@ static uint32_t lim_prepare_tdls_frame_header(tpAniSirGlobal pMac, uint8_t *pFra static QDF_STATUS lim_mgmt_tdls_tx_complete(tpAniSirGlobal mac_ctx, uint32_t tx_complete) { - tpPESession session_entry = NULL; - lim_log(mac_ctx, LOG1, FL("tdls_frm_session_id %x tx_complete %x"), mac_ctx->lim.tdls_frm_session_id, tx_complete); if (NO_SESSION != mac_ctx->lim.tdls_frm_session_id) { - session_entry = pe_find_session_by_session_id(mac_ctx, - mac_ctx->lim.tdls_frm_session_id); - if (!session_entry) { - lim_log(mac_ctx, LOGE, FL("session id %d is not found"), - mac_ctx->lim.tdls_frm_session_id); - return QDF_STATUS_E_FAILURE; - } - lim_send_sme_mgmt_tx_completion(mac_ctx, session_entry, - tx_complete); + lim_send_sme_mgmt_tx_completion(mac_ctx, + mac_ctx->lim.tdls_frm_session_id, + tx_complete); mac_ctx->lim.tdls_frm_session_id = NO_SESSION; } return QDF_STATUS_SUCCESS; @@ -701,7 +693,7 @@ static tSirRetStatus lim_send_tdls_dis_req_frame(tpAniSirGlobal pMac, lim_trace_tdls_action_string(SIR_MAC_TDLS_DIS_REQ), MAC_ADDR_ARRAY(peer_mac.bytes)); - pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId; + pMac->lim.tdls_frm_session_id = psessionEntry->smeSessionId; qdf_status = wma_tx_frameWithTxComplete(pMac, pPacket, (uint16_t) nBytes, TXRX_FRM_802_11_DATA, @@ -1021,7 +1013,7 @@ static tSirRetStatus lim_send_tdls_dis_rsp_frame(tpAniSirGlobal pMac, lim_trace_tdls_action_string(SIR_MAC_TDLS_DIS_RSP), MAC_ADDR_ARRAY(peer_mac.bytes)); - pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId; + pMac->lim.tdls_frm_session_id = psessionEntry->smeSessionId; /* * Transmit Discovery response and watch if this is delivered to * peer STA. @@ -1415,7 +1407,7 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac, lim_trace_tdls_action_string(SIR_MAC_TDLS_SETUP_REQ), MAC_ADDR_ARRAY(peer_mac.bytes)); - pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId; + pMac->lim.tdls_frm_session_id = psessionEntry->smeSessionId; qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket, (uint16_t) nBytes, @@ -1625,7 +1617,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, "DIRECT"), MAC_ADDR_ARRAY(peer_mac.bytes)); - pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId; + pMac->lim.tdls_frm_session_id = psessionEntry->smeSessionId; qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket, (uint16_t) nBytes, @@ -1903,7 +1895,7 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac, lim_trace_tdls_action_string(SIR_MAC_TDLS_SETUP_RSP), MAC_ADDR_ARRAY(peer_mac.bytes)); - pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId; + pMac->lim.tdls_frm_session_id = psessionEntry->smeSessionId; qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket, (uint16_t) nBytes, @@ -2120,7 +2112,7 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, lim_trace_tdls_action_string(SIR_MAC_TDLS_SETUP_CNF), MAC_ADDR_ARRAY(peer_mac.bytes)); - pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId; + pMac->lim.tdls_frm_session_id = psessionEntry->smeSessionId; qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket, (uint16_t) nBytes, diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index 5f950cc2c0e4..40983a447ccf 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -1277,7 +1277,8 @@ lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac, tpPESession psessionE */ void lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac, - tpPESession psessionEntry, uint32_t txCompleteStatus) + uint32_t sme_session_id, + uint32_t txCompleteStatus) { tSirMsgQ mmhMsg; tSirMgmtTxCompletionInd *pSirMgmtTxCompletionInd; @@ -1296,7 +1297,7 @@ lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac, pSirMgmtTxCompletionInd->length = sizeof(tSirMgmtTxCompletionInd); /* sessionId */ - pSirMgmtTxCompletionInd->sessionId = psessionEntry->smeSessionId; + pSirMgmtTxCompletionInd->sessionId = sme_session_id; pSirMgmtTxCompletionInd->txCompleteStatus = txCompleteStatus; diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index 71cd587ad1d5..99952bc233a0 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -540,8 +540,10 @@ tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf); void lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac, tpPESession psessionEntry); -void lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac, tpPESession psessionEntry, - uint32_t txCompleteStatus); +void lim_send_sme_mgmt_tx_completion( + tpAniSirGlobal pMac, + uint32_t sme_session_id, + uint32_t txCompleteStatus); tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx, tpPESession session_entry); QDF_STATUS lim_process_tdls_add_sta_rsp(tpAniSirGlobal pMac, void *msg, tpPESession); diff --git a/core/sme/src/csr/csr_tdls_process.c b/core/sme/src/csr/csr_tdls_process.c index 0faa5bb689cc..063f24c9019f 100644 --- a/core/sme/src/csr/csr_tdls_process.c +++ b/core/sme/src/csr/csr_tdls_process.c @@ -702,9 +702,23 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType, switch (msgType) { case eWNI_SME_TDLS_SEND_MGMT_RSP: + { + tSirSmeRsp *msg = (tSirSmeRsp *) pMsgBuf; + tCsrRoamInfo roam_info = {0}; + /* remove pending eSmeCommandTdlsDiscovery command */ csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsSendMgmt); + if (eSIR_SME_SUCCESS != msg->statusCode) { + /* Tx failed, so there wont be any ack confirmation*/ + /* Indicate ack failure to upper layer */ + roamInfo.reasonCode = 0; + csr_roam_call_callback(pMac, msg->sessionId, + &roam_info, 0, + eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND, + 0); + } break; + } case eWNI_SME_TDLS_ADD_STA_RSP: qdf_copy_macaddr(&roamInfo.peerMac, &addStaRsp->peermac); roamInfo.staId = addStaRsp->staId; |
