From 17f17db02ef981be377af2f54d65cdf2ba8b2a4d Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Thu, 13 Jul 2017 17:31:07 +0530 Subject: qcacld-3.0: Shutdown IPA WDI pipes on PDR event Shutdown the IPA WDI pipes on PDR event from ICNSS driver to prevent the possibility of IPA diver invalid access of CE ring registers. Change-Id: I19da0c015ba229512f71d7016236b106d9d8ee43 CRs-Fixed: 2072920 --- core/hdd/inc/wlan_hdd_main.h | 7 +++++++ core/hdd/src/wlan_hdd_driver_ops.c | 1 + core/hdd/src/wlan_hdd_main.c | 9 +++++++++ 3 files changed, 17 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 467855a812d2..d0b5bb0eedb3 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -2728,4 +2728,11 @@ static inline void hdd_update_hlp_info(struct net_device *dev, tCsrRoamInfo *roam_info) {} #endif + +/** + * hdd_pld_ipa_uc_shutdown_pipes() - Disconnect IPA WDI pipes during PDR + * + * Return: None + */ +void hdd_pld_ipa_uc_shutdown_pipes(void); #endif /* end #if !defined(WLAN_HDD_MAIN_H) */ diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index bf3e0c330cfa..b1f5435889ae 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1252,6 +1252,7 @@ static void wlan_hdd_pld_uevent(struct device *dev, switch (uevent->uevent) { case PLD_RECOVERY: cds_set_recovery_in_progress(true); + hdd_pld_ipa_uc_shutdown_pipes(); break; case PLD_FW_DOWN: cds_set_fw_state(CDS_FW_STATE_DOWN); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 88ed006012e4..3f7e42124e37 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12059,6 +12059,15 @@ int hdd_set_limit_off_chan_for_tos(hdd_adapter_t *adapter, enum tos tos, return ret; } +void hdd_pld_ipa_uc_shutdown_pipes(void) +{ + hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) + return; + + hdd_ipa_uc_force_pipe_shutdown(hdd_ctx); +} + /* Register the module init/exit functions */ module_init(hdd_module_init); module_exit(hdd_module_exit); -- cgit v1.2.3