[rdk-b][mt7986][wifi-hal][Add factoryResetAP]

[Description]
Add factoryResetAP.
If users need this function for multi-ap, they should modify hostapd initialization script.

[Release-log]
N/A

Change-Id: I5e38ee16773be01a85455d24e72148a625d1cf9b
diff --git a/src/wifi/wifi_hal.c b/src/wifi/wifi_hal.c
index 8543f94..3081b77 100644
--- a/src/wifi/wifi_hal.c
+++ b/src/wifi/wifi_hal.c
@@ -2308,9 +2308,18 @@
 
 INT wifi_factoryResetAP(int apIndex)
 {
+    char ap_config_file[64] = {0};
+    char cmd[128] = {0};
+
     WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
-    //factory reset is not done for now on Turris
+
+    wifi_setApEnable(apIndex, FALSE);
+    sprintf(ap_config_file, "%s%d.conf", CONFIG_PREFIX, apIndex);
+    sprintf(cmd, "rm %s && sh /lib/rdk/hostapd-init.sh", ap_config_file);
+    wifi_setApEnable(apIndex, TRUE);
+
     WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n",__func__, __LINE__);
+
     return RETURN_OK;
 }