Browse Source

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
Arunk Khandavalli 7 years ago
parent
commit
e9ef42ae0c
2 changed files with 8 additions and 1 deletions
  1. 3 1
      core/hdd/inc/wlan_hdd_main.h
  2. 5 0
      core/hdd/src/wlan_hdd_main.c

+ 3 - 1
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
 };
 
 /*

+ 5 - 0
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,