mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Fix wlan_start_comp reset earlier issue
Issue happens when loading driver fail, it will enter pld_deinit, as wlan_start_comp maybe reset before waiting in wlan_hdd_state_ctrl_param_write, so once driver is unloaded, the completion timeout happens 20s later, it will access invalid wlan_start_comp. Move init wlan_start_comp when creating wlan node, so it will not cause completion timeout. Change-Id: I9a8f43cdf9aa4c777272b7c28f1160e993c4dce4 CRs-Fixed: 2630479
This commit is contained in:
parent
12a95adb2d
commit
57c4bf2896
1 changed files with 2 additions and 3 deletions
|
|
@ -14208,7 +14208,6 @@ static ssize_t wlan_hdd_state_ctrl_param_write(struct file *filp,
|
|||
}
|
||||
|
||||
if (!cds_is_driver_loaded()) {
|
||||
init_completion(&wlan_start_comp);
|
||||
rc = wait_for_completion_timeout(&wlan_start_comp,
|
||||
msecs_to_jiffies(HDD_WLAN_START_WAIT_TIME));
|
||||
if (!rc) {
|
||||
|
|
@ -14216,8 +14215,6 @@ static ssize_t wlan_hdd_state_ctrl_param_write(struct file *filp,
|
|||
ret = -EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
hdd_start_complete(0);
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
@ -14237,6 +14234,8 @@ static int wlan_hdd_state_ctrl_param_create(void)
|
|||
int ret;
|
||||
struct device *dev;
|
||||
|
||||
init_completion(&wlan_start_comp);
|
||||
|
||||
device = MKDEV(wlan_hdd_state_major, 0);
|
||||
|
||||
ret = alloc_chrdev_region(&device, 0, dev_num, "qcwlanstate");
|
||||
|
|
|
|||
Loading…
Reference in a new issue