[rdkb][common][hal][Fix 7915 wps and igmp enable failed]

[Description]
Fix 7915 wps and igmp enable failed due to hostapd_cli or interface is not ready after calling wifi_setApEnable.

[Release-log]
N/A

Change-Id: I1e16af20114aec6817738fc0a22d312431e8dc5c
diff --git a/src/wifi/wifi_hal.c b/src/wifi/wifi_hal.c
index f8f40f0..c23bc08 100644
--- a/src/wifi/wifi_hal.c
+++ b/src/wifi/wifi_hal.c
@@ -5135,7 +5135,7 @@
     WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
 
     // bridge
-    snprintf(cmd, sizeof(cmd),  "echo %d > /sys/devices/virtual/net/%s/bridge/multicast_snooping", enable, BRIDGE_NAME);
+    snprintf(cmd, sizeof(cmd),  "sleep 1 && echo %d > /sys/devices/virtual/net/%s/bridge/multicast_snooping", enable, BRIDGE_NAME);
     _syscmd(cmd, buf, sizeof(buf));
 
     wifi_getMaxRadioNumber(&max_num_radios);
@@ -5144,7 +5144,7 @@
         apIndex = radioIndex + i*max_num_radios;
         if (wifi_GetInterfaceName(apIndex, interface_name) != RETURN_OK)
             continue;
-        snprintf(cmd, sizeof(cmd),  "echo %d > /sys/devices/virtual/net/%s/brif/%s/multicast_to_unicast", enable, BRIDGE_NAME, interface_name);
+        snprintf(cmd, sizeof(cmd),  "sleep 1 && echo %d > /sys/devices/virtual/net/%s/brif/%s/multicast_to_unicast", enable, BRIDGE_NAME, interface_name);
         _syscmd(cmd, buf, sizeof(buf));
     }
     WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n",__func__, __LINE__);
@@ -7322,7 +7322,7 @@
     if (wifi_GetInterfaceName(apIndex, interface_name) != RETURN_OK)
         return RETURN_ERR;
 
-    snprintf(cmd, sizeof(cmd), "hostapd_cli -i%s wps_cancel; hostapd_cli -i%s wps_pbc", interface_name, interface_name);
+    snprintf(cmd, sizeof(cmd), "sleep 1 && hostapd_cli -i%s wps_cancel && hostapd_cli -i%s wps_pbc", interface_name, interface_name);
     _syscmd(cmd, buf, sizeof(buf));
 
     if((strstr(buf, "OK"))!=NULL)
@@ -12983,7 +12983,7 @@
         multiple_set = FALSE;
 
         // If config use hostapd_cli to set, we calling these type of functions after enable the ap.
-        if (vap_info->u.bss_info.wps.methods && WIFI_ONBOARDINGMETHODS_PUSHBUTTON) {
+        if (vap_info->u.bss_info.wps.enable && vap_info->u.bss_info.wps.methods && WIFI_ONBOARDINGMETHODS_PUSHBUTTON) {
             // The set wps methods function should check whether wps is configured.
             ret = wifi_setApWpsButtonPush(vap_info->vap_index);
             if (ret != RETURN_OK) {