Kaynağa Gözat

qcacld-3.0: Remove addts and delts command on roam sync ind

When DUT receives roam sync ind, addts and delts commands
needs to be removed as part of csr_roam_sync_callback,
Otherwise these commands will be active SME commands forever
as PE wont send resp as older PE session is deleted as part
of RSI indication.

Fix is to remove addts and delts command on roam sync ind.

Change-Id: I1df8416a76dff3899c146823bec04595877788f7
CRs-Fixed: 2023723
yeshwanth sriram guntuka 8 yıl önce
ebeveyn
işleme
8fa6fa3042

+ 3 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3681,6 +3681,9 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
 						 &sessionId);
 	if (psessionEntry == NULL) {
 		lim_log(pMac, LOGE, "Session Does not exist for given bssId");
+		lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
+				       NULL, pSirAddts->req.tspec,
+				       smesessionId, smetransactionId);
 		return;
 	}
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */

+ 12 - 1
core/sme/inc/sme_qos_internal.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -123,6 +123,17 @@ QDF_STATUS sme_qos_msg_processor(tpAniSirGlobal pMac, uint16_t msg_type,
   ------------------------------------------------------------------------*/
 QDF_STATUS sme_qos_validate_params(tpAniSirGlobal pMac,
 		tSirBssDescription *pBssDesc);
+/**
+ * sme_qos_remove_addts_delts_cmd - Remove addts/delts command
+ * @mac_ctx: Pointer to the global MAC structure.
+ * @session_id: Session id
+ *
+ * This function is used to remove addts/delts command
+ * during csr roam sync callback.
+ *
+ * Return: void
+ */
+void sme_qos_remove_addts_delts_cmd(tpAniSirGlobal mac_ctx, uint8_t session_id);
 QDF_STATUS sme_qos_csr_event_ind(tpAniSirGlobal pMac,
 		uint8_t sessionId,
 		sme_qos_csr_event_indType ind, void *pEvent_info);

+ 1 - 0
core/sme/src/csr/csr_api_roam.c

@@ -20536,6 +20536,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx,
 		eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED;
 	sme_qos_csr_event_ind(mac_ctx, session_id,
 		SME_QOS_CSR_REASSOC_COMPLETE, &assoc_info);
+	sme_qos_remove_addts_delts_cmd(mac_ctx, session_id);
 	roam_info->pBssDesc = bss_desc;
 	conn_profile->acm_mask = sme_qos_get_acm_mask(mac_ctx,
 			bss_desc, NULL);

+ 21 - 0
core/sme/src/qos/sme_qos.c

@@ -909,6 +909,27 @@ QDF_STATUS sme_qos_validate_params(tpAniSirGlobal pMac,
 	return status;
 }
 
+void sme_qos_remove_addts_delts_cmd(tpAniSirGlobal mac_ctx, uint8_t session_id)
+{
+	tListElem *entry;
+	tSmeCmd *command;
+
+	entry = csr_nonscan_active_ll_peek_head(mac_ctx, LL_ACCESS_LOCK);
+	if (NULL == entry)
+		return;
+	command = GET_BASE_ADDR(entry, tSmeCmd, Link);
+	if ((eSmeCommandAddTs   == command->command ||
+	    eSmeCommandDelTs == command->command) &&
+	    command->sessionId == session_id) {
+		if (csr_nonscan_active_ll_remove_entry(mac_ctx, entry,
+		    LL_ACCESS_LOCK)) {
+			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
+				  "%s: removed addts/delts command", __func__);
+			qos_release_command(mac_ctx, command);
+		}
+	}
+}
+
 /*--------------------------------------------------------------------------
    \brief sme_qos_csr_event_ind() - The QoS sub-module in SME expects notifications
    from CSR when certain events occur as mentioned in sme_qos_csr_event_indType.