Jelajahi Sumber

qcacld-3.0: Buffer delTs if an addTs is buffered

qcacld-2.0 to qcacld-3.0 propagation

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
Vidyullatha Kanchanapally 9 tahun lalu
induk
melakukan
5d0a83e23c
3 mengubah file dengan 32 tambahan dan 6 penghapusan
  1. 2 1
      core/hdd/src/wlan_hdd_wmm.c
  2. 2 1
      core/sme/inc/sme_qos_api.h
  3. 28 4
      core/sme/src/qos/sme_qos.c

+ 2 - 1
core/hdd/src/wlan_hdd_wmm.c

@@ -2270,7 +2270,8 @@ hdd_wlan_wmm_status_e hdd_wmm_delts(hdd_adapter_t *pAdapter, uint32_t handle)
 
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
 	smeStatus =
-		sme_qos_release_req(WLAN_HDD_GET_HAL_CTX(pAdapter), qosFlowId);
+		sme_qos_release_req(WLAN_HDD_GET_HAL_CTX(pAdapter),
+				    pAdapter->sessionId, qosFlowId);
 
 	hdd_info("SME flow %d released, SME status %d", qosFlowId, smeStatus);
 

+ 2 - 1
core/sme/inc/sme_qos_api.h

@@ -240,7 +240,8 @@ sme_QosStatusType sme_qos_setup_req(tHalHandle hHal, uint32_t sessionId,
 		sme_QosWmmUpType UPType, uint32_t *pQosFlowID);
 sme_QosStatusType sme_qos_modify_req(tHalHandle hHal,
 		sme_QosWmmTspecInfo *pQoSInfo, uint32_t QosFlowID);
-sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint32_t QosFlowID);
+sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint8_t session_id,
+				      uint32_t QosFlowID);
 bool sme_qos_is_ts_info_ack_policy_valid(tpAniSirGlobal pMac,
 		sme_QosWmmTspecInfo *pQoSInfo, uint8_t sessionId);
 void sme_qos_update_hand_off(uint8_t sessionId, bool updateHandOff);

+ 28 - 4
core/sme/src/qos/sme_qos.c

@@ -379,6 +379,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac,
 					      uint32_t QosFlowID,
 					      bool buffered_cmd);
 sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac,
+					       uint8_t session_id,
 					       uint32_t QosFlowID,
 					       bool buffered_cmd);
 sme_QosStatusType sme_qos_setup(tpAniSirGlobal pMac,
@@ -745,6 +746,7 @@ sme_QosStatusType sme_qos_modify_req(tHalHandle hHal,
  *                         releasing a QoS flow running on a particular AC.
  *
  * @hHal: The handle returned by mac_open.
+ * @session_id: session_id returned by sme_open_session.
  * @QosFlowID: Identification per flow running on each AC generated by SME
  *             It is only meaningful if the QoS setup for the flow is successful
  *
@@ -754,7 +756,8 @@ sme_QosStatusType sme_qos_modify_req(tHalHandle hHal,
  *
  * Return: QDF_STATUS_SUCCESS - Release is successful.
  */
-sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint32_t QosFlowID)
+sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint8_t session_id,
+				      uint32_t QosFlowID)
 {
 	QDF_STATUS lock_status = QDF_STATUS_E_FAILURE;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -769,7 +772,8 @@ sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint32_t QosFlowID)
 		return SME_QOS_STATUS_RELEASE_FAILURE_RSP;
 	}
 	/* Call the internal function for QoS release, adding a layer of abstraction */
-	status = sme_qos_internal_release_req(pMac, QosFlowID, false);
+	status = sme_qos_internal_release_req(pMac, session_id, QosFlowID,
+					      false);
 	sme_release_global_lock(&pMac->sme);
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: %d: QoS Release return status on Flow %d is %d",
@@ -1997,6 +2001,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac,
 /**
  * sme_qos_internal_release_req() - release QOS flow on a particular AC
  * @pMac: Pointer to the global MAC parameter structure.
+ * @sessionId: sessionId returned by sme_open_session.
  * @QosFlowID: Identification per flow running on each AC generated by SME
  *             It is only meaningful if the QoS setup for the flow is successful
  *
@@ -2006,6 +2011,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac,
  * Return: QDF_STATUS_SUCCESS - Release is successful.
  */
 sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac,
+					       uint8_t sessionId,
 					       uint32_t QosFlowID,
 					       bool buffered_cmd)
 {
@@ -2022,7 +2028,6 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac,
 	sme_QosCmdInfo cmd;
 	tCsrRoamModifyProfileFields modifyProfileFields;
 	bool deltsIssued = false;
-	uint8_t sessionId;
 	QDF_STATUS hstatus;
 	bool biDirectionalFlowsPresent = false;
 	bool uplinkFlowsPresent = false;
@@ -2044,6 +2049,23 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac,
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: %d: no match found for flowID = %d",
 			  __func__, __LINE__, QosFlowID);
+
+		pSession = &sme_qos_cb.sessionInfo[sessionId];
+		if (!buffered_cmd &&
+		    !csr_ll_is_list_empty(&pSession->bufferedCommandList,
+					  false)) {
+			cmd.command = SME_QOS_RELEASE_REQ;
+			cmd.pMac = pMac;
+			cmd.sessionId = sessionId;
+			cmd.u.releaseCmdInfo.QosFlowID = QosFlowID;
+			hstatus = sme_qos_buffer_cmd(&cmd, buffered_cmd);
+			if (QDF_IS_STATUS_SUCCESS(hstatus)) {
+				QDF_TRACE(QDF_MODULE_ID_SME,
+					  QDF_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 */
@@ -6409,6 +6431,7 @@ static QDF_STATUS sme_qos_process_buffered_cmd(uint8_t session_id)
 			break;
 		case SME_QOS_RELEASE_REQ:
 			hdd_status = sme_qos_internal_release_req(qos_cmd->pMac,
+					qos_cmd->sessionId,
 					qos_cmd->u.releaseCmdInfo.QosFlowID,
 					true);
 			if (SME_QOS_STATUS_RELEASE_FAILURE_RSP == hdd_status) {
@@ -6721,7 +6744,8 @@ QDF_STATUS sme_qos_del_ts_ind_fnp(tpAniSirGlobal pMac, tListElem *pEntry)
 	}
 	/* Call the internal function for QoS release, adding a layer of abstraction */
 	status =
-		sme_qos_internal_release_req(pMac, flow_info->QosFlowID, false);
+		sme_qos_internal_release_req(pMac, flow_info->sessionId,
+					     flow_info->QosFlowID, false);
 	sme_release_global_lock(&pMac->sme);
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: %d: QoS Release return status on Flow %d is %d",