Browse Source

icnss2: Send wlan boot init and complete commands

When server arrive event is received send wlan boot init command
and when firmware ready indication is received send
wlan boot complete to co-processor subsystem.

Change-Id: I1c75ca772b7b96757f1b060b6c1d5700245b17aa
Dundi Raviteja 2 years ago
parent
commit
6d4715f78c
1 changed files with 16 additions and 5 deletions
  1. 16 5
      icnss2/main.c

+ 16 - 5
icnss2/main.c

@@ -45,6 +45,7 @@
 #include <linux/soc/qcom/pdr.h>
 #include <linux/remoteproc.h>
 #include <trace/hooks/remoteproc.h>
+#include <../drivers/soc/qcom/slatecom_interface.h>
 #include "main.h"
 #include "qmi.h"
 #include "debug.h"
@@ -827,11 +828,16 @@ static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
 
 	set_bit(ICNSS_WLFW_CONNECTED, &priv->state);
 
-	if (priv->is_slate_rfa && !test_bit(ICNSS_SLATE_UP, &priv->state)) {
-		reinit_completion(&priv->slate_boot_complete);
-		icnss_pr_dbg("Waiting for slate boot up notification, 0x%lx\n",
-			     priv->state);
-		wait_for_completion(&priv->slate_boot_complete);
+	if (priv->is_slate_rfa) {
+		if (!test_bit(ICNSS_SLATE_UP, &priv->state)) {
+			reinit_completion(&priv->slate_boot_complete);
+			icnss_pr_dbg("Waiting for slate boot up notification, 0x%lx\n",
+				     priv->state);
+			wait_for_completion(&priv->slate_boot_complete);
+		}
+
+		send_wlan_state(GMI_MGR_WLAN_BOOT_INIT);
+		icnss_pr_info("sent wlan boot init command\n");
 	}
 
 	ret = wlfw_ind_register_send_sync_msg(priv);
@@ -1135,6 +1141,11 @@ static int icnss_driver_event_fw_ready_ind(struct icnss_priv *priv, void *data)
 		goto out;
 	}
 
+	if (priv->is_slate_rfa && test_bit(ICNSS_SLATE_UP, &priv->state)) {
+		send_wlan_state(GMI_MGR_WLAN_BOOT_COMPLETE);
+		icnss_pr_info("sent wlan boot complete command\n");
+	}
+
 	if (test_bit(ICNSS_PD_RESTART, &priv->state)) {
 		ret = icnss_pd_restart_complete(priv);
 	} else {