[rdkb][common][app][Fix wifi reload failed when ap is down]

[Description]
Fix wifi reload failed when ap is down.
1. For wifi hal implementation some APIs need to used with running radio, so we should enable the radio before setting radio parameters.
2. Check is the radio enable before setting ap parameters.

[Release-log]
N/A

Change-Id: Ibf269373aabc3b042db6b7ccab912c96ab809d05
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 9ca097a..024733c 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
@@ -190,12 +190,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;
@@ -264,6 +269,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;
 
     // get current setting
     ret = wifi_getRadioVapInfoMap(ap_param.radio_index, &vap_map);