summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKanchanapally, Vidyullatha <vkanchan@qti.qualcomm.com>2016-04-28 12:06:30 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-05-02 12:29:44 +0530
commitc844635588275d1ac32806eaee8f30ebfe95f94b (patch)
tree8d068df21349196cbd7a2515d7a09268a52cb112
parentbf09d4458716d4bb2fe2afa236ab5cc0340e8230 (diff)
qcacld-2.0: Buffer delTs if an addTs is buffered
Currently when an addTs is buffered for processing in SME and a delTs for the corresponding addTs is issued, the delTs is getting dropped since the addTs has not yet been processed. Fix this by buffering the delTs command if a corresponding flow is not found. Change-Id: Ib759ee7f2a5d4c089d5362f93568fb4dd6eda8cf CRs-Fixed: 1008956
-rw-r--r--CORE/HDD/src/wlan_hdd_wmm.c3
-rw-r--r--CORE/SME/inc/sme_QosApi.h6
-rw-r--r--CORE/SME/src/QoS/sme_Qos.c31
3 files changed, 32 insertions, 8 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c
index e0a21f6f8626..ff929711f767 100644
--- a/CORE/HDD/src/wlan_hdd_wmm.c
+++ b/CORE/HDD/src/wlan_hdd_wmm.c
@@ -2646,7 +2646,8 @@ hdd_wlan_wmm_status_e hdd_wmm_delts( hdd_adapter_t* pAdapter,
__func__, handle, qosFlowId, acType, pQosContext);
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
- smeStatus = sme_QosReleaseReq( WLAN_HDD_GET_HAL_CTX(pAdapter), qosFlowId );
+ smeStatus = sme_QosReleaseReq(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId, qosFlowId);
VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW,
"%s: SME flow %d released, SME status %d",
diff --git a/CORE/SME/inc/sme_QosApi.h b/CORE/SME/inc/sme_QosApi.h
index 1497b57a20bc..f3225e1131a8 100644
--- a/CORE/SME/inc/sme_QosApi.h
+++ b/CORE/SME/inc/sme_QosApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -332,6 +332,7 @@ sme_QosStatusType sme_QosModifyReq(tHalHandle hHal,
API only if an explicit request for QoS release has come from Application
\param hHal - The handle returned by macOpen.
+ \param session_id - session_id returned by sme_OpenSession.
\param QosFlowID - Identification per flow running on each AC generated by SME
It is only meaningful if the QoS setup for the flow is
successful
@@ -342,7 +343,8 @@ sme_QosStatusType sme_QosModifyReq(tHalHandle hHal,
\sa
--------------------------------------------------------------------------*/
-sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, v_U32_t QosFlowID);
+sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, uint8_t session_id,
+ v_U32_t QosFlowID);
/*--------------------------------------------------------------------------
\brief sme_QosIsTSInfoAckPolicyValid() - The SME QoS API exposed to HDD to
diff --git a/CORE/SME/src/QoS/sme_Qos.c b/CORE/SME/src/QoS/sme_Qos.c
index 7cc0181d7ba8..b45f62b3e5ae 100644
--- a/CORE/SME/src/QoS/sme_Qos.c
+++ b/CORE/SME/src/QoS/sme_Qos.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -412,6 +412,7 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac,
v_U32_t QosFlowID,
v_BOOL_t buffered_cmd);
sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac,
+ uint8_t session_id,
v_U32_t QosFlowID,
v_BOOL_t buffered_cmd);
sme_QosStatusType sme_QosSetup(tpAniSirGlobal pMac,
@@ -906,6 +907,7 @@ sme_QosStatusType sme_QosModifyReq(tHalHandle hHal,
API only if an explicit request for QoS release has come from Application
\param hHal - The handle returned by macOpen.
+ \param session_id - session_id returned by sme_OpenSession.
\param QosFlowID - Identification per flow running on each AC generated by SME
It is only meaningful if the QoS setup for the flow is
successful
@@ -915,7 +917,8 @@ sme_QosStatusType sme_QosModifyReq(tHalHandle hHal,
\sa
--------------------------------------------------------------------------*/
-sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, v_U32_t QosFlowID)
+sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, uint8_t session_id,
+ v_U32_t QosFlowID)
{
eHalStatus lock_status = eHAL_STATUS_FAILURE;
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -933,7 +936,7 @@ sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, v_U32_t QosFlowID)
return SME_QOS_STATUS_RELEASE_FAILURE_RSP;
}
//Call the internal function for QoS release, adding a layer of abstraction
- status = sme_QosInternalReleaseReq(pMac, QosFlowID, VOS_FALSE);
+ status = sme_QosInternalReleaseReq(pMac, session_id, QosFlowID, VOS_FALSE);
sme_ReleaseGlobalLock( &pMac->sme );
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: %d: QoS Release return status on Flow %d is %d",
@@ -2278,6 +2281,7 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac,
for releasing a QoS flow running on a particular AC.
\param pMac - Pointer to the global MAC parameter structure.
+ \param sessionId - sessionId returned by sme_OpenSession.
\param QosFlowID - Identification per flow running on each AC generated by SME
It is only meaningful if the QoS setup for the flow is
successful
@@ -2288,6 +2292,7 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac,
--------------------------------------------------------------------------*/
sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac,
+ uint8_t sessionId,
v_U32_t QosFlowID,
v_BOOL_t buffered_cmd)
{
@@ -2304,7 +2309,6 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac,
sme_QosCmdInfo cmd;
tCsrRoamModifyProfileFields modifyProfileFields;
v_BOOL_t deltsIssued = VOS_FALSE;
- v_U8_t sessionId;
v_BOOL_t bufferCommand;
eHalStatus hstatus;
v_BOOL_t biDirectionalFlowsPresent = VOS_FALSE;
@@ -2331,6 +2335,21 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac,
"%s: %d: no match found for flowID = %d",
__func__, __LINE__,
QosFlowID);
+
+ pSession = &sme_QosCb.sessionInfo[sessionId];
+ if (!buffered_cmd &&
+ !csrLLIsListEmpty(&pSession->bufferedCommandList, VOS_FALSE)) {
+ cmd.command = SME_QOS_RELEASE_REQ;
+ cmd.pMac = pMac;
+ cmd.sessionId = sessionId;
+ cmd.u.releaseCmdInfo.QosFlowID = QosFlowID;
+ hstatus = sme_QosBufferCmd(&cmd, buffered_cmd);
+ if(HAL_STATUS_SUCCESS(hstatus)) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH,
+ "%s: %d: Buffered release request for flow = %d",
+ __func__, __LINE__, QosFlowID);
+ }
+ }
return SME_QOS_STATUS_RELEASE_INVALID_PARAMS_RSP;
}
// find the AC
@@ -6683,6 +6702,7 @@ static eHalStatus sme_QosProcessBufferedCmd(v_U8_t sessionId)
break;
case SME_QOS_RELEASE_REQ:
hdd_status = sme_QosInternalReleaseReq(pcmd->cmdInfo.pMac,
+ pcmd->cmdInfo.sessionId,
pcmd->cmdInfo.u.releaseCmdInfo.QosFlowID,
VOS_TRUE);
if(SME_QOS_STATUS_RELEASE_FAILURE_RSP == hdd_status)
@@ -7019,7 +7039,8 @@ eHalStatus sme_QosDelTsIndFnp(tpAniSirGlobal pMac, tListElem *pEntry)
return SME_QOS_STATUS_RELEASE_FAILURE_RSP;
}
//Call the internal function for QoS release, adding a layer of abstraction
- status = sme_QosInternalReleaseReq(pMac, flow_info->QosFlowID, VOS_FALSE);
+ status = sme_QosInternalReleaseReq(pMac, flow_info->sessionId,
+ flow_info->QosFlowID, VOS_FALSE);
sme_ReleaseGlobalLock( &pMac->sme );
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: %d: QoS Release return status on Flow %d is %d",