From c83790beb46b76d20328cde1a67000de16a8f754 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 9 Mar 2016 01:09:51 -0500 Subject: qcacld-2.0: Avoid panic during FW dump Currently, during FW assert and core dump, wma_resume_fw will fail. And VOS_BUG(0) will cause system panic, which causes the FW core dump incomplete. Now, skip VOS_BUG(0) if FW core dump is in progress. Change-Id: I0955adbad62dab94b39b5388923cf28e1e36a1ee CRs-Fixed: 986804 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 9958a7571817..6312b5125b21 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -22418,7 +22418,11 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) result = wma_resume_fw(); if (result) { hddLog(LOGE, FL("Failed to resume FW err:%d"), result); - VOS_BUG(0); + /* Do not panic (VOS_BUG(0)) if FW dump is in progress. + * Otherwise, the FW dump will be incomplete. + */ + if (!vos_is_logp_in_progress(VOS_MODULE_ID_HDD, NULL)) + VOS_BUG(0); return -EBUSY; } } -- cgit v1.2.3