wlan: Crash device if vos_stop or vos_start fails
If vos_start()/vos_stop() fails, crash the device by invoking
BUG_ON(). So that driver status will be known to debug why these
functions failed to initialize/uninitialize during driver
load/unload.
Change-Id: I37d941a8e4ebdff2a5f8c1f8df617d608cf50398
CRs-Fixed: 901579
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 4bc1efa..cec04e2 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -373,6 +373,7 @@
hddLog(VOS_TRACE_LEVEL_ERROR, "%s: vos_stop return failed %d",
__func__, vosStatus);
VOS_ASSERT(0);
+ VOS_BUG(0);
}
pHddCtx->hdd_ps_state = eHDD_SUSPEND_DEEP_SLEEP;
@@ -412,6 +413,7 @@
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Failed in vos_start",__func__);
+ VOS_BUG(0);
goto err_deep_sleep;
}
@@ -2186,6 +2188,7 @@
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: vos_start failed",__func__);
+ VOS_BUG(0);
goto err_vosclose;
}
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 5316d41..5e79eb8 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -8794,6 +8794,7 @@
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s: Failed to stop VOSS",__func__);
VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
+ VOS_BUG(0);
}
//This requires pMac access, Call this before vos_close().
@@ -9942,6 +9943,7 @@
if ( !VOS_IS_STATUS_SUCCESS( status ) )
{
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: vos_start failed",__func__);
+ VOS_BUG(0);
goto err_vosclose;
}