From 06f1f1225b879e8c01f0f2d089f283ec7004a32a Mon Sep 17 00:00:00 2001 From: Venkata Sharath Chandra Manchala Date: Tue, 29 Oct 2019 13:22:15 -0700 Subject: [PATCH] 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 --- Kbuild | 2 +- configs/default_defconfig | 1 + core/hdd/inc/wlan_hdd_driver_ops.h | 18 ++++++++++++++++++ core/hdd/src/wlan_hdd_driver_ops.c | 8 ++++++++ core/hdd/src/wlan_hdd_main.c | 2 ++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Kbuild b/Kbuild index 79afe8bd8e8b..eebf94a51b75 100644 --- a/Kbuild +++ b/Kbuild @@ -2638,7 +2638,7 @@ cppflags-$(CONFIG_ENABLE_DEBUG_ADDRESS_MARKING) += -DENABLE_DEBUG_ADDRESS_MARKIN 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 4c939e3ad37e..8a103fe3705f 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -413,6 +413,7 @@ CONFIG_DP_INTR_POLL_BASED := y 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 543d37642886..976f67c55d4a 100644 --- a/core/hdd/inc/wlan_hdd_driver_ops.h +++ b/core/hdd/inc/wlan_hdd_driver_ops.h @@ -137,4 +137,22 @@ int hdd_soc_idle_restart_lock(struct device *dev); */ 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 92ef2bfd3010..5d21a8638caa 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -152,6 +152,14 @@ static void hdd_hif_init_driver_state_callbacks(void *data, 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 6a6e79492f2c..6b207c326888 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3334,6 +3334,8 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) wlan_hdd_init_tx_rx_histogram(hdd_ctx); + hdd_set_hif_init_phase(hif_ctx, false); + break; default: