|
@@ -318,25 +318,34 @@ static uint32_t lim_prepare_tdls_frame_header(tpAniSirGlobal pMac, uint8_t *pFra
|
|
|
return header_offset;
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * TX Complete for Management frames
|
|
|
+/**
|
|
|
+ * lim_mgmt_tdls_tx_complete - callback to indicate Tx completion
|
|
|
+ * @mac_ctx: pointer to mac structure
|
|
|
+ * @tx_complete: indicates tx sucess/failure
|
|
|
+ *
|
|
|
+ * function will be invoked on receiving tx completion indication
|
|
|
+ *
|
|
|
+ * return: success: eHAL_STATUS_SUCCESS failure: eHAL_STATUS_FAILURE
|
|
|
*/
|
|
|
-QDF_STATUS lim_mgmt_tx_complete(tpAniSirGlobal pMac, uint32_t txCompleteSuccess)
|
|
|
+QDF_STATUS lim_mgmt_tdls_tx_complete(tpAniSirGlobal mac_ctx,
|
|
|
+ uint32_t tx_complete)
|
|
|
{
|
|
|
- tpPESession psessionEntry = NULL;
|
|
|
-
|
|
|
- if (0xff != pMac->lim.mgmtFrameSessionId) {
|
|
|
- psessionEntry =
|
|
|
- pe_find_session_by_session_id(pMac,
|
|
|
- pMac->lim.mgmtFrameSessionId);
|
|
|
- if (NULL == psessionEntry) {
|
|
|
- lim_log(pMac, LOGE, FL("sessionID %d is not found"),
|
|
|
- pMac->lim.mgmtFrameSessionId);
|
|
|
+ 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(pMac, psessionEntry,
|
|
|
- txCompleteSuccess);
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ lim_send_sme_mgmt_tx_completion(mac_ctx, session_entry,
|
|
|
+ tx_complete);
|
|
|
+ mac_ctx->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
}
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
@@ -510,17 +519,17 @@ 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.mgmtFrameSessionId = psessionEntry->peSessionId;
|
|
|
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
|
|
|
qdf_status = wma_tx_frameWithTxComplete(pMac, pPacket, (uint16_t) nBytes,
|
|
|
TXRX_FRM_802_11_DATA,
|
|
|
ANI_TXDIR_TODS,
|
|
|
TID_AC_VI,
|
|
|
lim_tx_complete, pFrame,
|
|
|
- lim_mgmt_tx_complete,
|
|
|
+ lim_mgmt_tdls_tx_complete,
|
|
|
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
|
|
|
smeSessionId, false, 0);
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ pMac->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
lim_log(pMac, LOGE,
|
|
|
FL("could not send TDLS Discovery Request frame"));
|
|
|
return eSIR_FAILURE;
|
|
@@ -827,7 +836,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.mgmtFrameSessionId = psessionEntry->peSessionId;
|
|
|
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
|
|
|
/*
|
|
|
* Transmit Discovery response and watch if this is delivered to
|
|
|
* peer STA.
|
|
@@ -841,11 +850,11 @@ static tSirRetStatus lim_send_tdls_dis_rsp_frame(tpAniSirGlobal pMac,
|
|
|
ANI_TXDIR_IBSS,
|
|
|
0,
|
|
|
lim_tx_complete, pFrame,
|
|
|
- lim_mgmt_tx_complete,
|
|
|
+ lim_mgmt_tdls_tx_complete,
|
|
|
HAL_USE_SELF_STA_REQUESTED_MASK,
|
|
|
smeSessionId, false, 0);
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ pMac->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
lim_log(pMac, LOGE,
|
|
|
FL("could not send TDLS Discovery Response frame!"));
|
|
|
return eSIR_FAILURE;
|
|
@@ -924,7 +933,7 @@ wma_tx_frame_with_tx_complete_send(tpAniSirGlobal pMac, void *pPacket,
|
|
|
ANI_TXDIR_TODS,
|
|
|
tid,
|
|
|
lim_tx_complete, pFrame,
|
|
|
- lim_mgmt_tx_complete,
|
|
|
+ lim_mgmt_tdls_tx_complete,
|
|
|
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
|
|
|
smeSessionId, flag, 0);
|
|
|
}
|
|
@@ -943,7 +952,7 @@ wma_tx_frame_with_tx_complete_send(tpAniSirGlobal pMac, void *pPacket,
|
|
|
ANI_TXDIR_TODS,
|
|
|
tid,
|
|
|
lim_tx_complete, pFrame,
|
|
|
- lim_mgmt_tx_complete,
|
|
|
+ lim_mgmt_tdls_tx_complete,
|
|
|
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
|
|
|
smeSessionId, false, 0);
|
|
|
}
|
|
@@ -1208,7 +1217,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.mgmtFrameSessionId = psessionEntry->peSessionId;
|
|
|
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
|
|
|
|
|
|
qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket,
|
|
|
(uint16_t) nBytes,
|
|
@@ -1217,7 +1226,7 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac,
|
|
|
smeSessionId, true);
|
|
|
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ pMac->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
lim_log(pMac, LOGE,
|
|
|
FL("could not send TDLS Setup Request frame!"));
|
|
|
return eSIR_FAILURE;
|
|
@@ -1407,7 +1416,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac,
|
|
|
"DIRECT"),
|
|
|
MAC_ADDR_ARRAY(peer_mac.bytes));
|
|
|
|
|
|
- pMac->lim.mgmtFrameSessionId = psessionEntry->peSessionId;
|
|
|
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
|
|
|
|
|
|
qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket,
|
|
|
(uint16_t) nBytes,
|
|
@@ -1418,7 +1427,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac,
|
|
|
? true : false);
|
|
|
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ pMac->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
lim_log(pMac, LOGE,
|
|
|
FL("could not send TDLS Teardown frame"));
|
|
|
return eSIR_FAILURE;
|
|
@@ -1684,7 +1693,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.mgmtFrameSessionId = psessionEntry->peSessionId;
|
|
|
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
|
|
|
|
|
|
qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket,
|
|
|
(uint16_t) nBytes,
|
|
@@ -1693,7 +1702,7 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac,
|
|
|
smeSessionId, true);
|
|
|
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ pMac->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
lim_log(pMac, LOGE,
|
|
|
FL("could not send TDLS Dis Request frame!"));
|
|
|
return eSIR_FAILURE;
|
|
@@ -1901,7 +1910,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.mgmtFrameSessionId = psessionEntry->peSessionId;
|
|
|
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
|
|
|
|
|
|
qdf_status = wma_tx_frame_with_tx_complete_send(pMac, pPacket,
|
|
|
(uint16_t) nBytes,
|
|
@@ -1910,7 +1919,7 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac,
|
|
|
smeSessionId, true);
|
|
|
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- pMac->lim.mgmtFrameSessionId = 0xff;
|
|
|
+ pMac->lim.tdls_frm_session_id = NO_SESSION;
|
|
|
lim_log(pMac, LOGE,
|
|
|
FL("could not send TDLS Setup Confirm frame"));
|
|
|
return eSIR_FAILURE;
|