qcacmn: Block WMI cmds before issuing HTC stop

WMI cmds should be blocked, before calling HTC stop
to avoid the race condition in the system

Change-Id: I015b154a3bc422f50d4ed82bc861dd9e054c47a3
CRs-Fixed: 2194234
diff --git a/wmi_unified.c b/wmi_unified.c
index e67f648..006154c 100644
--- a/wmi_unified.c
+++ b/wmi_unified.c
@@ -2506,6 +2506,21 @@
 	wmi_handle->tgt_force_assert_enable = val;
 }
 
+/**
+ * wmi_stop() - generic function to block unified WMI command
+ * @wmi_handle: handle to WMI.
+ *
+ * @Return: success always.
+ */
+int
+wmi_stop(wmi_unified_t wmi_handle)
+{
+	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO,
+		  "WMI Stop\n");
+	wmi_handle->wmi_stopinprogress = 1;
+	return 0;
+}
+
 #ifndef CONFIG_MCL
 /**
  * API to flush all the previous packets  associated with the wmi endpoint
@@ -2521,20 +2536,6 @@
 qdf_export_symbol(wmi_flush_endpoint);
 
 /**
- * generic function to block unified WMI command
- * @param wmi_handle      : handle to WMI.
- * @return 0  on success and -ve on failure.
- */
-int
-wmi_stop(wmi_unified_t wmi_handle)
-{
-	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO,
-			"WMI Stop\n");
-	wmi_handle->wmi_stopinprogress = 1;
-	return 0;
-}
-
-/**
  * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
  *                     By default pdev_id conversion is not done in WMI.
  *                     This API can be used enable conversion in WMI.