Просмотр исходного кода

qcacld-3.0: Check the device status during hdd cleanup of present mode

On a change of the mode ( from the current one to the FTM mode ) ,
the clean up of the adapters are again done though they are already
cleaned ( signified by device_status = DRIVER_MODULES_CLOSED ). Hence
check for this device_status while to avoid a redundant clean up of the
adapters.

Change-Id: I2a851b235809db5cd47ec5d738067d1553f83129
CRs-Fixed: 1115243
Ashish Kumar Dhanotiya 8 лет назад
Родитель
Сommit
0024313a75
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      core/hdd/src/wlan_hdd_main.c

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

@@ -9685,12 +9685,18 @@ static enum tQDF_ADAPTER_MODE hdd_get_adpter_mode(
 static void hdd_cleanup_present_mode(hdd_context_t *hdd_ctx,
 				    enum tQDF_GLOBAL_CON_MODE curr_mode)
 {
+	int driver_status;
+
+	driver_status = hdd_ctx->driver_status;
+
 	switch (curr_mode) {
 	case QDF_GLOBAL_MISSION_MODE:
 	case QDF_GLOBAL_MONITOR_MODE:
 	case QDF_GLOBAL_FTM_MODE:
-		hdd_abort_mac_scan_all_adapters(hdd_ctx);
-		hdd_stop_all_adapters(hdd_ctx);
+		if (driver_status != DRIVER_MODULES_CLOSED) {
+			hdd_abort_mac_scan_all_adapters(hdd_ctx);
+			hdd_stop_all_adapters(hdd_ctx);
+		}
 		hdd_deinit_all_adapters(hdd_ctx, false);
 		hdd_close_all_adapters(hdd_ctx, false);
 		break;