فهرست منبع

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
Asutosh Mohapatra 2 سال پیش
والد
کامیت
5c6ded482a
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      core/hdd/src/wlan_hdd_main.c

+ 5 - 0
core/hdd/src/wlan_hdd_main.c

@@ -18480,6 +18480,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;