qcacld-3.0: Don't double start inactivity timer
There is a possibility of double start of inactivity timer if iff_up (hdd_open) happens while probe/remove/reinit is still going on. To mitigate this issue, on iff_up, start inactivity after acquiring hdd_init_deinit_lock, which make sure probe/remove/reinit are completed, and thereby inactivity timer is stopped. Change-Id: I2417215380e318a8410a2d25eabf82f353a26c4f CRs-Fixed: 2125494
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
e9ef42ae0c
commit
006f383e64
@@ -2557,6 +2557,8 @@ static int __hdd_open(struct net_device *dev)
|
|||||||
|
|
||||||
mutex_lock(&hdd_init_deinit_lock);
|
mutex_lock(&hdd_init_deinit_lock);
|
||||||
|
|
||||||
|
hdd_start_driver_ops_timer(eHDD_DRV_OP_IFF_UP);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This scenario can be hit in cases where in the wlan driver after
|
* This scenario can be hit in cases where in the wlan driver after
|
||||||
* registering the netdevices and there is a failure in driver
|
* registering the netdevices and there is a failure in driver
|
||||||
@@ -2607,6 +2609,7 @@ static int __hdd_open(struct net_device *dev)
|
|||||||
hdd_populate_wifi_pos_cfg(hdd_ctx);
|
hdd_populate_wifi_pos_cfg(hdd_ctx);
|
||||||
|
|
||||||
err_hdd_hdd_init_deinit_lock:
|
err_hdd_hdd_init_deinit_lock:
|
||||||
|
hdd_stop_driver_ops_timer();
|
||||||
mutex_unlock(&hdd_init_deinit_lock);
|
mutex_unlock(&hdd_init_deinit_lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -2625,9 +2628,7 @@ static int hdd_open(struct net_device *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
cds_ssr_protect(__func__);
|
cds_ssr_protect(__func__);
|
||||||
hdd_start_driver_ops_timer(eHDD_DRV_OP_IFF_UP);
|
|
||||||
ret = __hdd_open(dev);
|
ret = __hdd_open(dev);
|
||||||
hdd_stop_driver_ops_timer();
|
|
||||||
cds_ssr_unprotect(__func__);
|
cds_ssr_unprotect(__func__);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user