From d5bcd89b04f09577590e11e57e329ff9b0f8d52e Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Wed, 25 Sep 2019 15:54:29 -0700 Subject: [PATCH] qcacld-3.0: Disable dsc panic if fw is down If fw is down, there is no point to dsc panic. Thus, disable dsc panic if fw is down. Change-Id: I1128ea3f32b879305e19fdf45a6e3588a570bd4c CRs-Fixed: 2535312 --- components/dsc/src/__wlan_dsc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/dsc/src/__wlan_dsc.c b/components/dsc/src/__wlan_dsc.c index 10e16d82b2..0bb404ca93 100644 --- a/components/dsc/src/__wlan_dsc.c +++ b/components/dsc/src/__wlan_dsc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -23,6 +23,7 @@ #include "qdf_threads.h" #include "qdf_timer.h" #include "__wlan_dsc.h" +#include "cds_api.h" #ifdef WLAN_DSC_DEBUG static void __dsc_dbg_op_timeout(void *opaque_op) @@ -179,8 +180,12 @@ static void __dsc_dbg_trans_timeout(void *opaque_trans) struct dsc_trans *trans = opaque_trans; qdf_print_thread_trace(trans->thread); - QDF_DEBUG_PANIC("Transition '%s' exceeded %ums", - trans->active_desc, DSC_TRANS_TIMEOUT_MS); + + if (cds_is_fw_down()) + dsc_err("fw is down avoid panic"); + else + QDF_DEBUG_PANIC("Transition '%s' exceeded %ums", + trans->active_desc, DSC_TRANS_TIMEOUT_MS); } /**