Merge "[rdkb][common][app][Fix wifi reload failed when ap is down]"
diff --git a/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c b/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c
index 6151ba6..0682965 100644
--- a/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c
+++ b/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c
@@ -255,12 +255,17 @@
         wifi_setRadioEnable(radio_parameter.radio_index, FALSE);
         return;
     }
-    operationParam.enable = TRUE;
 
     fprintf(stderr, "Start setting radio\n");
+
+    wifi_setRadioEnable(radio_parameter.radio_index, TRUE);
+    sleep(1);
+
+    // Get current radio setting
     ret = wifi_getRadioOperatingParameters(radio_parameter.radio_index, &operationParam);
     if (ret != RETURN_OK)
         fprintf(stderr, "[Get OperatingParameters failed!!!]\n");
+    operationParam.enable = TRUE;
 
     // Channel
     operationParam.autoChannelEnabled = radio_parameter.auto_channel;
@@ -338,6 +343,11 @@
     int vap_index_in_map = 0;
     wifi_vap_info_t vap_info = {0};
     wifi_vap_info_map_t vap_map = {0};
+    BOOL radio_enable = FALSE;
+
+    wifi_getRadioEnable(ap_param.radio_index, &radio_enable);
+    if (radio_enable == FALSE)
+        return;
 
     if(ap_param.radio_index == -1)
         return;