mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Restrict mode change to FTM mode scenarios
Currently if driver load/unload is in progress or driver is
loaded and mode change to FTM mode is issued from the sys
path, memory leakage occurs during driver unload.
To address this issue, don't change mode if driver is already
loaded or load/unload is in progress.
Change-Id: I09cacaf11d516c62de1a9699547eb01476afdc1f
CRs-Fixed: 3349217
This commit is contained in:
parent
9c9d6f8257
commit
5307d19a75
1 changed files with 5 additions and 0 deletions
|
|
@ -18090,6 +18090,11 @@ static int con_mode_handler_ftm(const char *kmessage,
|
|||
|
||||
ret = param_set_int(kmessage, kp);
|
||||
|
||||
if (cds_is_driver_loaded() || cds_is_load_or_unload_in_progress()) {
|
||||
pr_err("Driver already loaded or load/unload in progress");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
if (con_mode_ftm != QDF_GLOBAL_FTM_MODE) {
|
||||
pr_err("Only FTM mode supported!");
|
||||
return -ENOTSUPP;
|
||||
|
|
|
|||
Loading…
Reference in a new issue