Browse Source

qcacld-3.0: do PLD power off for FTM mode

Remove cds_set_load_in_progress so that the
hdd_wlan_stop_modules can do PLD power off
for FTM mode.
Add con_mode_flag checking for HDD context access
protection.

Change-Id: Ie48443579fcb692fcc806cb9b6bf5782d7764c9f
CRs-Fixed: 2246876
Liangwei Dong 6 years ago
parent
commit
858feb14d2
1 changed files with 5 additions and 2 deletions
  1. 5 2
      core/hdd/src/wlan_hdd_main.c

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

@@ -878,6 +878,11 @@ int wlan_hdd_validate_context(struct hdd_context *hdd_ctx)
 		return -EAGAIN;
 	}
 
+	if (qdf_atomic_read(&hdd_ctx->con_mode_flag)) {
+		hdd_debug("con_mode_handler is in progress Ignore!!!");
+		return -EAGAIN;
+	}
+
 	return 0;
 }
 
@@ -12542,7 +12547,6 @@ static int __con_mode_handler(const char *kmessage,
 		return ret;
 
 	qdf_atomic_set(&hdd_ctx->con_mode_flag, 1);
-	cds_set_load_in_progress(true);
 
 	ret = kstrtoint(kmessage, 0, &new_con_mode);
 	if (ret) {
@@ -12626,7 +12630,6 @@ static int __con_mode_handler(const char *kmessage,
 
 reset_flags:
 	mutex_unlock(&hdd_init_deinit_lock);
-	cds_set_load_in_progress(false);
 	qdf_atomic_set(&hdd_ctx->con_mode_flag, 0);
 	return ret;
 }