summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasti, Narayanraddi <c_nmasti@qti.qualcomm.com>2016-03-17 15:20:34 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-22 18:30:12 +0530
commit1aa3e5e0090f253e54e67dea0bfa378f60898e19 (patch)
tree2e97f239e4e3b14dd1d4c15f0b6770708fd656ad
parentf12a291416acb25507b29d92ebd52efd78037795 (diff)
qcacld-2.0: Create new member in lim structure to maintain session id for TDLS functionality
Currently, since we are using same member from lim structure for p2p and TDLS there could be possibilities that session id is overwritten by p2p which would lead in not sending Tx completion indication from lim to hdd thus leading to Tx timeout though we have received tx completion indication from FW. Fix is to create new session id for TDLS frames transmission Change-Id: I1f78f24ac01e0b26c92238dbe831af88aa267bd5 CRs-Fixed: 991455
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c6
-rw-r--r--CORE/MAC/inc/aniGlobal.h1
-rw-r--r--CORE/MAC/src/pe/lim/limApi.c1
-rw-r--r--CORE/MAC/src/pe/lim/limProcessTdls.c90
4 files changed, 56 insertions, 42 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b8a8f3a9d038..dee53af9b395 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -20959,8 +20959,10 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
if ((0 == rc) || (TRUE != pAdapter->mgmtTxCompletionStatus)) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Mgmt Tx Completion timed out TxCompletion %u",
- __func__, pAdapter->mgmtTxCompletionStatus);
+ "%s: %s rc %ld mgmtTxCompletionStatus %u",
+ __func__,
+ !rc ? "Mgmt Tx Completion timed out" :"Mgmt Tx Completion failed",
+ rc, pAdapter->mgmtTxCompletionStatus);
if (pHddCtx->isLogpInProgress)
{
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index 5d6080c6c188..18bd56dfc00e 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -988,6 +988,7 @@ tLimMlmOemDataRsp *gpLimMlmOemDataRsp;
tSirRemainOnChnReq *gpLimRemainOnChanReq; //hold remain on chan request in this buf
vos_list_t gLimMgmtFrameRegistratinQueue;
tANI_U32 mgmtFrameSessionId;
+ uint32_t tdls_frm_session_id;
tSirBackgroundScanMode gLimBackgroundScanMode;
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index 47594d27a907..31bbd1edb451 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -1057,6 +1057,7 @@ tSirRetStatus peOpen(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam)
pMac->lim.maxStation, 0);
pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
pMac->lim.deferredMsgCnt = 0;
if (!VOS_IS_STATUS_SUCCESS(vos_lock_init(&pMac->lim.lkPeGlobalLock))) {
diff --git a/CORE/MAC/src/pe/lim/limProcessTdls.c b/CORE/MAC/src/pe/lim/limProcessTdls.c
index 723ee6c50dea..6ad5aa8fd4e5 100644
--- a/CORE/MAC/src/pe/lim/limProcessTdls.c
+++ b/CORE/MAC/src/pe/lim/limProcessTdls.c
@@ -341,27 +341,37 @@ static tANI_U32 limPrepareTdlsFrameHeader(tpAniSirGlobal pMac, tANI_U8* pFrame,
return(header_offset += PAYLOAD_TYPE_TDLS_SIZE) ;
}
-/*
- * 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
*/
- eHalStatus limMgmtTXComplete(tpAniSirGlobal pMac,
- tANI_U32 txCompleteSuccess)
+eHalStatus lim_mgmt_tdls_tx_complete(tpAniSirGlobal mac_ctx,
+ uint32_t tx_complete)
{
- tpPESession psessionEntry = NULL ;
+ tpPESession session_entry = NULL ;
+
+ limLog(mac_ctx, LOG1, FL("tdls_frm_session_id %x tx_complete %x"),
+ mac_ctx->lim.tdls_frm_session_id, tx_complete);
+
+ if (0xff != mac_ctx->lim.tdls_frm_session_id) {
+ session_entry = peFindSessionBySessionId(mac_ctx,
+ mac_ctx->lim.tdls_frm_session_id);
+ if (NULL == session_entry) {
+ limLog(mac_ctx, LOGE, FL("session id %d is not found"),
+ mac_ctx->lim.tdls_frm_session_id);
+ return eHAL_STATUS_FAILURE;
+ }
- if (0xff != pMac->lim.mgmtFrameSessionId)
- {
- psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.mgmtFrameSessionId);
- if (NULL == psessionEntry)
- {
- limLog(pMac, LOGE, FL("sessionID %d is not found"),
- pMac->lim.mgmtFrameSessionId);
- return eHAL_STATUS_FAILURE;
- }
- limSendSmeMgmtTXCompletion(pMac, psessionEntry, txCompleteSuccess);
- pMac->lim.mgmtFrameSessionId = 0xff;
- }
- return eHAL_STATUS_SUCCESS;
+ limSendSmeMgmtTXCompletion(mac_ctx, session_entry, tx_complete);
+ mac_ctx->lim.tdls_frm_session_id = 0xff;
+ }
+
+ return eHAL_STATUS_SUCCESS;
}
/*
@@ -531,18 +541,18 @@ tSirRetStatus limSendTdlsDisReqFrame(tpAniSirGlobal pMac, tSirMacAddr peer_mac,
limTraceTdlsActionString(SIR_MAC_TDLS_DIS_REQ),
MAC_ADDR_ARRAY(peer_mac));
- pMac->lim.mgmtFrameSessionId = psessionEntry->peSessionId;
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, false );
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
- pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
limLog(pMac, LOGE, FL("could not send TDLS Discovery Request frame"));
return eSIR_FAILURE;
}
@@ -848,7 +858,7 @@ static tSirRetStatus limSendTdlsDisRspFrame(tpAniSirGlobal pMac,
MAC_ADDR_ARRAY(peerMac));
- 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.
@@ -862,11 +872,11 @@ static tSirRetStatus limSendTdlsDisRspFrame(tpAniSirGlobal pMac,
ANI_TXDIR_IBSS,
0,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_SELF_STA_REQUESTED_MASK, smeSessionId, false );
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
- pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
limLog(pMac, LOGE, FL("could not send TDLS Discovery Response frame!"));
return eSIR_FAILURE;
}
@@ -1162,14 +1172,14 @@ tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
limTraceTdlsActionString(SIR_MAC_TDLS_SETUP_REQ),
MAC_ADDR_ARRAY(peerMac));
- pMac->lim.mgmtFrameSessionId = psessionEntry->peSessionId;
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
#if defined(CONFIG_HL_SUPPORT)
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, true );
#else
@@ -1178,13 +1188,13 @@ tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, false );
#endif
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
- pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
limLog(pMac, LOGE, FL("could not send TDLS Setup Request frame!"));
return eSIR_FAILURE;
}
@@ -1371,14 +1381,14 @@ tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
"AP": "DIRECT"),
MAC_ADDR_ARRAY(peerMac));
- pMac->lim.mgmtFrameSessionId = psessionEntry->peSessionId;
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
#if defined(CONFIG_HL_SUPPORT)
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId,
(reason == eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE) ? true : false );
@@ -1388,14 +1398,14 @@ tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId,
false );
#endif
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
- pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
limLog(pMac, LOGE, FL("could not send TDLS Teardown frame"));
return eSIR_FAILURE;
@@ -1650,14 +1660,14 @@ static tSirRetStatus limSendTdlsSetupRspFrame(tpAniSirGlobal pMac,
limTraceTdlsActionString(SIR_MAC_TDLS_SETUP_RSP),
MAC_ADDR_ARRAY(peerMac));
- pMac->lim.mgmtFrameSessionId = psessionEntry->peSessionId;
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
#if defined(CONFIG_HL_SUPPORT)
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, true );
#else
@@ -1666,13 +1676,13 @@ static tSirRetStatus limSendTdlsSetupRspFrame(tpAniSirGlobal pMac,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, false );
#endif
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
- pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
limLog(pMac, LOGE, FL("could not send TDLS Setup Response"));
return eSIR_FAILURE;
}
@@ -1881,14 +1891,14 @@ tSirRetStatus limSendTdlsLinkSetupCnfFrame(tpAniSirGlobal pMac,
limTraceTdlsActionString(SIR_MAC_TDLS_SETUP_CNF),
MAC_ADDR_ARRAY(peerMac));
- pMac->lim.mgmtFrameSessionId = psessionEntry->peSessionId;
+ pMac->lim.tdls_frm_session_id = psessionEntry->peSessionId;
#if defined(CONFIG_HL_SUPPORT)
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, true );
#else
@@ -1897,14 +1907,14 @@ tSirRetStatus limSendTdlsLinkSetupCnfFrame(tpAniSirGlobal pMac,
ANI_TXDIR_TODS,
TID_AC_VI,
limTxComplete, pFrame,
- limMgmtTXComplete,
+ lim_mgmt_tdls_tx_complete,
HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME,
smeSessionId, false );
#endif
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
- pMac->lim.mgmtFrameSessionId = 0xff;
+ pMac->lim.tdls_frm_session_id = 0xff;
limLog(pMac, LOGE, FL("could not send TDLS Setup Confirm frame"));
return eSIR_FAILURE;