qcacld-3.0: Enable Force wake

Enable Force wake feature through Kbuild
to access address range greater than BAR+4K
at runtime.

Change-Id: Ibe3c3b9b765c256493b1d5f9258e462760d45dc6
CRs-Fixed: 2557978
diff --git a/Kbuild b/Kbuild
index 79afe8b..eebf94a 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2638,7 +2638,7 @@
 cppflags-$(CONFIG_FEATURE_TSO) += -DFEATURE_TSO
 cppflags-$(CONFIG_FEATURE_TSO_DEBUG) += -DFEATURE_TSO_DEBUG
 cppflags-$(CONFIG_FEATURE_TSO_STATS) += -DFEATURE_TSO_STATS
-
+cppflags-$(CONFIG_FEATURE_FORCE_WAKE) += -DFORCE_WAKE
 cppflags-$(CONFIG_WLAN_LRO) += -DFEATURE_LRO
 
 cppflags-$(CONFIG_FEATURE_AP_MCC_CH_AVOIDANCE) += -DFEATURE_AP_MCC_CH_AVOIDANCE
diff --git a/configs/default_defconfig b/configs/default_defconfig
index 4c939e3..8a103fe 100644
--- a/configs/default_defconfig
+++ b/configs/default_defconfig
@@ -413,6 +413,7 @@
 CONFIG_TX_PER_PDEV_DESC_POOL := y
 CONFIG_DP_TRACE := y
 CONFIG_FEATURE_TSO := y
+CONFIG_FEATURE_FORCE_WAKE := y
 CONFIG_DP_LFR := y
 CONFIG_DUP_RX_DESC_WAR := y
 CONFIG_HTT_PADDR64 := y
diff --git a/core/hdd/inc/wlan_hdd_driver_ops.h b/core/hdd/inc/wlan_hdd_driver_ops.h
index 543d376..976f67c 100644
--- a/core/hdd/inc/wlan_hdd_driver_ops.h
+++ b/core/hdd/inc/wlan_hdd_driver_ops.h
@@ -137,4 +137,22 @@
  */
 void hdd_soc_idle_restart_unlock(void);
 
+#ifdef FORCE_WAKE
+/**
+ * hdd_set_hif_init_phase() - Enable/disable the
+ * init_phase flag
+ * @hif_ctx: hif opaque handle
+ * @hal_init_phase: init phase flag
+ *
+ * Return: None
+ */
+void hdd_set_hif_init_phase(struct hif_opaque_softc *hif_ctx,
+			    bool init_phase);
+#else
+static inline
+void hdd_set_hif_init_phase(struct hif_opaque_softc *hif_ctx,
+			    bool init_phase)
+{
+}
+#endif /* FORCE_WAKE */
 #endif /* __WLAN_HDD_DRIVER_OPS_H__ */
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index 92ef2bf..5d21a86 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -152,6 +152,14 @@
 	cbk->is_target_ready = hdd_is_target_ready;
 }
 
+#ifdef FORCE_WAKE
+void hdd_set_hif_init_phase(struct hif_opaque_softc *hif_ctx,
+			    bool hal_init_phase)
+{
+	hif_srng_init_phase(hif_ctx, hal_init_phase);
+}
+#endif /* FORCE_WAKE */
+
 /**
  * hdd_hif_set_attribute() - API to set CE attribute if memory is limited
  * @hif_ctx: hif context
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 6a6e794..6b207c3 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3334,6 +3334,8 @@
 
 		wlan_hdd_init_tx_rx_histogram(hdd_ctx);
 
+		hdd_set_hif_init_phase(hif_ctx, false);
+
 		break;
 
 	default: