Pārlūkot izejas kodu

qcacld-3.0: Donnot send vdev delete via serialization

Presently vdev delete is sent via serialization, which
needs a vdev reference. With the new FR to send the
vdev delete on the physical destroy in object manager
vdev delete cannot be sent via serialization.

Hence, disable the serialization for the vdev and
donot send the vdev delete via serialization.

Change-Id: I3afa34880ddaab68850ed235ec1451370d82e7dd
CRs-Fixed: 2566120
Arun Kumar Khandavalli 5 gadi atpakaļ
vecāks
revīzija
dac7a45e2d

+ 3 - 0
core/hdd/src/wlan_hdd_main.c

@@ -4400,6 +4400,9 @@ int hdd_vdev_destroy(struct hdd_adapter *adapter)
 	ucfg_scan_vdev_set_disable(vdev, REASON_VDEV_DOWN);
 	hdd_objmgr_put_vdev(vdev);
 
+	/* Disable serialization for vdev before sending vdev delete */
+	wlan_ser_vdev_queue_disable(adapter->vdev);
+
 	/* close sme session (destroy vdev in firmware via legacy API) */
 	qdf_event_reset(&adapter->qdf_session_close_event);
 	status = sme_vdev_delete(hdd_ctx->mac_handle, adapter->vdev_id);

+ 0 - 11
core/sme/inc/sme_inside.h

@@ -144,17 +144,6 @@ void csr_roam_wm_status_change_complete(struct mac_context *mac_ctx,
 					uint8_t session_id);
 void csr_roam_process_wm_status_change_command(struct mac_context *mac,
 		tSmeCmd *pCommand);
-/**
- * csr_process_del_vdev_command() - Post eWNI_SME_VDEV_DELETE_REQ to wma
- * @mac_ctx: global mac context
- * @sme_command: received Delete Self station request command
- *
- * This API sends the eWNI_SME_VDEV_DELETE_REQ msg to PE.
- *
- * Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
- */
-QDF_STATUS csr_process_del_vdev_command(struct mac_context *mac_ctx,
-					tSmeCmd *sme_command);
 void csr_reinit_roam_cmd(struct mac_context *mac, tSmeCmd *pCommand);
 void csr_reinit_wm_status_change_cmd(struct mac_context *mac,
 				     tSmeCmd *pCommand);

+ 0 - 1
core/sme/inc/sme_internal.h

@@ -50,7 +50,6 @@ typedef enum eSmeCommandType {
 	eSmeCsrCommandMask = 0x10000,
 	eSmeCommandRoam,
 	eSmeCommandWmStatusChange,
-	e_sme_command_del_vdev,
 	/* QOS */
 	eSmeQosCommandMask = 0x40000,   /* To identify Qos commands */
 	eSmeCommandAddTs,

+ 0 - 8
core/sme/src/common/sme_api.c

@@ -383,11 +383,6 @@ static void dump_csr_command_info(struct mac_context *mac, tSmeCmd *pCmd)
 			pCmd->u.wmStatusChangeCmd.Type);
 		break;
 
-	case e_sme_command_del_vdev:
-		sme_debug("Issue del vdev command for vdev:%d",
-			  pCmd->sessionId);
-		break;
-
 	default:
 		sme_debug("default: Unhandled command %d",
 			pCmd->command);
@@ -516,9 +511,6 @@ QDF_STATUS sme_ser_handle_active_cmd(struct wlan_serialization_command *cmd)
 		csr_roam_process_wm_status_change_command(mac_ctx,
 					sme_cmd);
 		break;
-	case e_sme_command_del_vdev:
-		csr_process_del_vdev_command(mac_ctx, sme_cmd);
-		break;
 	case eSmeCommandAddTs:
 	case eSmeCommandDelTs:
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT

+ 0 - 1
core/sme/src/common/sme_trace.c

@@ -159,7 +159,6 @@ static uint8_t *sme_trace_get_command_string(uint32_t command)
 		CASE_RETURN_STRING(eSmeCsrCommandMask);
 		CASE_RETURN_STRING(eSmeCommandRoam);
 		CASE_RETURN_STRING(eSmeCommandWmStatusChange);
-		CASE_RETURN_STRING(e_sme_command_del_vdev);
 		CASE_RETURN_STRING(eSmeQosCommandMask);
 		CASE_RETURN_STRING(eSmeCommandAddTs);
 		CASE_RETURN_STRING(eSmeCommandDelTs);

+ 27 - 78
core/sme/src/csr/csr_api_roam.c

@@ -13566,43 +13566,6 @@ end:
 	}
 }
 
-QDF_STATUS csr_process_del_vdev_command(struct mac_context *mac_ctx,
-					tSmeCmd *sme_command)
-{
-	struct del_vdev_params *del_vdev_req;
-	struct scheduler_msg msg = {0};
-	QDF_STATUS status;
-
-	del_vdev_req = qdf_mem_malloc(sizeof(struct del_vdev_params));
-	if (!del_vdev_req)
-		return QDF_STATUS_E_NOMEM;
-
-	qdf_mem_copy(del_vdev_req->self_mac_addr,
-		     sme_command->u.delStaSessionCmd.self_mac_addr,
-		     sizeof(tSirMacAddr));
-
-	del_vdev_req->vdev_id = sme_command->sessionId;
-	del_vdev_req->sme_callback =
-		sme_command->u.delStaSessionCmd.session_close_cb;
-	del_vdev_req->sme_ctx = sme_command->u.delStaSessionCmd.context;
-	msg.type = eWNI_SME_VDEV_DELETE_REQ;
-	msg.reserved = 0;
-	msg.bodyptr = del_vdev_req;
-	msg.bodyval = 0;
-
-	sme_debug("sending eWNI_SME_VDEV_DELETE_REQ");
-	status = scheduler_post_message(
-				QDF_MODULE_ID_SME,
-				QDF_MODULE_ID_PE,
-				QDF_MODULE_ID_PE, &msg);
-	if (status != QDF_STATUS_SUCCESS) {
-		sme_err("wma_post_ctrl_msg failed");
-		qdf_mem_free(del_vdev_req);
-		return QDF_STATUS_E_FAILURE;
-	}
-	return QDF_STATUS_SUCCESS;
-}
-
 /**
  * csr_compute_mode_and_band() - computes dot11mode
  * @mac: mac global context
@@ -17415,26 +17378,12 @@ QDF_STATUS csr_process_vdev_del_rsp(struct mac_context *mac_ctx,
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	struct del_vdev_params *rsp;
 	uint8_t vdev_id;
-	tListElem *entry;
-	tSmeCmd *sme_command;
 
 	if (!pmsg) {
 		sme_err("msg ptr is NULL");
 		return status;
 	}
 
-	entry = csr_nonscan_active_ll_peek_head(mac_ctx, LL_ACCESS_LOCK);
-	if (!entry) {
-		sme_err("NO commands are ACTIVE");
-		return status;
-	}
-
-	sme_command = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	if (e_sme_command_del_vdev != sme_command->command) {
-		sme_err("No Del vdev command ACTIVE");
-		return status;
-	}
-
 	rsp = (struct del_vdev_params *)pmsg;
 	vdev_id = rsp->vdev_id;
 	sme_debug("vdev delete rsp status = %d", rsp->status);
@@ -17447,12 +17396,6 @@ QDF_STATUS csr_process_vdev_del_rsp(struct mac_context *mac_ctx,
 	 */
 	csr_cleanup_session(mac_ctx, vdev_id);
 
-	/* Remove this command out of the non scan active list */
-	if (csr_nonscan_active_ll_remove_entry(mac_ctx, entry,
-					       LL_ACCESS_LOCK)) {
-		csr_release_command(mac_ctx, sme_command);
-	}
-
 	if (rsp->sme_callback) {
 		status = sme_release_global_lock(&mac_ctx->sme);
 		if (!QDF_IS_STATUS_SUCCESS(status))
@@ -17475,23 +17418,35 @@ csr_issue_vdev_del_req(struct mac_context *mac_ctx, uint8_t vdev_id,
 		       void *context)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tSmeCmd *sme_command;
+	struct del_vdev_params *del_vdev_req;
+	struct scheduler_msg msg = {0};
 
-	sme_command = csr_get_command_buffer(mac_ctx);
-	if (!sme_command) {
-		status = QDF_STATUS_E_RESOURCES;
-	} else {
-		sme_command->command = e_sme_command_del_vdev;
-		sme_command->sessionId = vdev_id;
-		sme_command->u.delStaSessionCmd.session_close_cb = callback;
-		sme_command->u.delStaSessionCmd.context = context;
-		qdf_mem_copy(sme_command->u.delStaSessionCmd.self_mac_addr,
-			     session_mac_addr, sizeof(tSirMacAddr));
-		status = csr_queue_sme_command(mac_ctx, sme_command, false);
-		if (!QDF_IS_STATUS_SUCCESS(status))
-			sme_err("fail to queue vdev delete command = %d",
-				status);
+	del_vdev_req = qdf_mem_malloc(sizeof(struct del_vdev_params));
+	if (!del_vdev_req)
+		return QDF_STATUS_E_NOMEM;
+
+	qdf_mem_copy(del_vdev_req->self_mac_addr,
+		     session_mac_addr, sizeof(tSirMacAddr));
+
+	del_vdev_req->vdev_id = vdev_id;
+	del_vdev_req->sme_callback = callback;
+	del_vdev_req->sme_ctx = context;
+	msg.type = eWNI_SME_VDEV_DELETE_REQ;
+	msg.reserved = 0;
+	msg.bodyptr = del_vdev_req;
+	msg.bodyval = 0;
+
+	sme_debug("sending eWNI_SME_VDEV_DELETE_REQ");
+	status = scheduler_post_message(
+				QDF_MODULE_ID_SME,
+				QDF_MODULE_ID_PE,
+				QDF_MODULE_ID_PE, &msg);
+	if (status != QDF_STATUS_SUCCESS) {
+		sme_err("wma_post_ctrl_msg failed");
+		qdf_mem_free(del_vdev_req);
+		return QDF_STATUS_E_FAILURE;
 	}
+	return QDF_STATUS_SUCCESS;
 	return status;
 }
 
@@ -20109,9 +20064,6 @@ enum wlan_serialization_cmd_type csr_get_cmd_type(tSmeCmd *sme_cmd)
 	case eSmeCommandWmStatusChange:
 		cmd_type = WLAN_SER_CMD_WM_STATUS_CHANGE;
 		break;
-	case e_sme_command_del_vdev:
-		cmd_type = WLAN_SER_CMD_VDEV_DELETE;
-		break;
 	case eSmeCommandAddTs:
 		cmd_type = WLAN_SER_CMD_ADDTS;
 		break;
@@ -20167,9 +20119,6 @@ static void csr_fill_cmd_timeout(struct wlan_serialization_command *cmd)
 	case WLAN_SER_CMD_FORCE_DEAUTH_STA:
 		cmd->cmd_timeout_duration = SME_CMD_PEER_DISCONNECT_TIMEOUT;
 		break;
-	case WLAN_SER_CMD_VDEV_DELETE:
-		cmd->cmd_timeout_duration = SME_VDEV_DELETE_CMD_TIMEOUT;
-		break;
 	case WLAN_SER_CMD_HDD_ISSUE_REASSOC_SAME_AP:
 	case WLAN_SER_CMD_SME_ISSUE_REASSOC_SAME_AP:
 	case WLAN_SER_CMD_SME_ISSUE_DISASSOC_FOR_HANDOFF: