From e9ef42ae0cd589a8179fd973475656db6b448af0 Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Wed, 4 Oct 2017 14:49:51 +0530 Subject: [PATCH] qcacld-3.0: Start inactivity timer for hdd_open There can be deadlock on iff_up on anyone of mutex's like init_deinit_lock, iface_change_lock. To catch what caused the deadlock start the inactivity timer to root-cause the issue CRs-Fixed: 2120569 Change-Id: I830cc4127a9c0691ee44a5e2c56c871471d638db --- core/hdd/inc/wlan_hdd_main.h | 4 +++- core/hdd/src/wlan_hdd_main.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index ee30e61dca..1dbe57fd07 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1851,12 +1851,14 @@ struct hdd_channel_info { * @eHDD_DRV_OP_REMOVE: Refers to .remove operation * @eHDD_DRV_OP_SHUTDOWN: Refers to .shutdown operation * @eHDD_DRV_OP_REINIT: Refers to .reinit operation + * @eHDD_DRV_OP_IFF_UP: Refers to IFF_UP operation */ enum { eHDD_DRV_OP_PROBE = 0, eHDD_DRV_OP_REMOVE, eHDD_DRV_OP_SHUTDOWN, - eHDD_DRV_OP_REINIT + eHDD_DRV_OP_REINIT, + eHDD_DRV_OP_IFF_UP }; /* diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a210cabff5..c2c6d56c11 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2625,7 +2625,9 @@ static int hdd_open(struct net_device *dev) int ret; cds_ssr_protect(__func__); + hdd_start_driver_ops_timer(eHDD_DRV_OP_IFF_UP); ret = __hdd_open(dev); + hdd_stop_driver_ops_timer(); cds_ssr_unprotect(__func__); return ret; @@ -12783,6 +12785,9 @@ void hdd_start_driver_ops_timer(int drv_op) case eHDD_DRV_OP_REINIT: memcpy(drv_ops_string, "reinit", sizeof("reinit")); break; + case eHDD_DRV_OP_IFF_UP: + memcpy(drv_ops_string, "iff_up", sizeof("iff_up")); + break; } qdf_timer_start(&hdd_drv_ops_inactivity_timer,