[ITC][wifi][NON-ACR][DPTTIZEN-2407, fixed module for separate activate/deactivate...
authorgaurav.m2 <gaurav.m2@samsung.com>
Thu, 8 Sep 2016 13:08:17 +0000 (18:38 +0530)
committergaurav.m2 <gaurav.m2@samsung.com>
Thu, 8 Sep 2016 13:08:17 +0000 (18:38 +0530)
Change-Id: I4e670836787bcb8638a3a63544dd23397eb86462
Signed-off-by: gaurav.m2 <gaurav.m2@samsung.com>
13 files changed:
src/itc/wifi/ITs-wifi-ap.c
src/itc/wifi/ITs-wifi-common.c
src/itc/wifi/ITs-wifi-common.h
src/itc/wifi/ITs-wifi-config.c
src/itc/wifi/ITs-wifi-eap.c
src/itc/wifi/ITs-wifi-manager.c
src/itc/wifi/ITs-wifi-monitor.c
src/itc/wifi/ITs-wifi-network-information.c
src/itc/wifi/ITs-wifi-security-information.c
src/itc/wifi/tct-wifi-native_common_iot.h
src/itc/wifi/tct-wifi-native_mobile.h
src/itc/wifi/tct-wifi-native_tv.h
src/itc/wifi/tct-wifi-native_wearable.h

index 6920272..4ced29a 100755 (executable)
@@ -62,42 +62,10 @@ void ITs_wifi_ap_startup(void)
 
        if ( nRet == WIFI_ERROR_NONE )
        {
-#if DEBUG
+ #if DEBUG
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+ #endif
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -118,83 +86,6 @@ void ITs_wifi_ap_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               if ( g_pWpsPublicWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWpsPublicWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
        
        if(g_bWifiInitialization)
        {
@@ -210,6 +101,7 @@ void ITs_wifi_ap_cleanup(void)
                        FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
                }
        }
+       
 }
 
 
@@ -287,11 +179,17 @@ bool WifiPreConnectConditionForWPSPublic()
        and ignore the return type */
 
        int nWifiTimeoutId = -1;
+       
+       wifi_forget_ap(g_pWifiAPHandle);
        wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
 
        g_bCheckCb = false;
        int nRet = wifi_scan(WifiScanRequestCallback, NULL);
        RUN_POLLING_LOOP;
+       
+       //Done to avoid disconnect after complete execution     
+       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+               
        if ( nRet != WIFI_ERROR_NONE )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
@@ -329,12 +227,6 @@ bool WifiPreConnectConditionForWPSPublic()
        return true;
 }
 
-
-
-
-
-
-
 //& purpose: To check initialization/de-initialization of wifi
 //& type : auto
 /**
index 39c7d80..4e8f1cd 100755 (executable)
@@ -495,20 +495,57 @@ bool WifiPreConnectCondition()
        and ignore the return type */
 
        int nWifiTimeoutId = -1;
+       
+       wifi_forget_ap(g_pWifiAPHandle);
        wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       
        g_bCheckCb = false;
-       int nRet = wifi_scan(WifiScanRequestCallback, NULL);
+       bool bIsActive = false;
+       
+       int nRet = wifi_is_activated(&bIsActive);
+       if ( bIsActive != true )
+       {
+               g_bCheckCb = false;
+               nRet = wifi_activate(WifiActivatedCallback, NULL);
+               if ( nRet != WIFI_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+                       //Done to avoid disconnect after complete execution     
+                       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+                       return false;
+               }
+               RUN_POLLING_LOOP;
+               if ( !g_bCheckCb )
+               {
+                       FPRINTF("[Line : %d][%s] WifiActivatedCallback =  callback function not invoked\\n", __LINE__, API_NAMESPACE);
+                       //Done to avoid disconnect after complete execution     
+                       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+                       
+                       return false;
+               }
+       }       
+       
+       nWifiTimeoutId = -1;
+       
+       nRet = wifi_scan(WifiScanRequestCallback, NULL);
        RUN_POLLING_LOOP;
        if ( nRet != WIFI_ERROR_NONE )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+               
+               //Done to avoid disconnect after complete execution     
+               wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
                return false;
        }
+       //Done to avoid disconnect after complete execution     
+       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
        if ( !g_bCheckCb )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed inside WifiPreConnectCondition, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
                return false;
        }
+       
+       nWifiTimeoutId = -1;
        g_bForEachCb = false;
        nRet = wifi_foreach_found_aps(WifiFoundAPCallback, NULL);
        RUN_POLLING_LOOP;
@@ -547,15 +584,42 @@ bool WifiPreConnectCondition()
        and ignore the return type */
 
        int nWifiTimeoutId = -1;
+       
+       wifi_forget_ap(g_pWifiAPHandle);
        wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       
        g_bCheckCb = false;
-       int nRet = wifi_scan(WifiScanRequestCallback, NULL);
+       bool bIsActive = false;
+       
+       int nRet = wifi_is_activated(&bIsActive);
+       if ( bIsActive != true )
+       {
+               g_bCheckCb = false;
+               nRet = wifi_activate(WifiActivatedCallback, NULL);
+               if ( nRet != WIFI_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+                       //Done to avoid disconnect after complete execution     
+                       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+                       
+                       return false;
+               }
+       }       
+       
+       nRet = wifi_scan(WifiScanRequestCallback, NULL);
        RUN_POLLING_LOOP;
        if ( nRet != WIFI_ERROR_NONE )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+               //Done to avoid disconnect after complete execution     
+               wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+               
                return false;
        }
+               
+       //Done to avoid disconnect after complete execution     
+       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       
        if ( !g_bCheckCb )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed inside WifiPreConnectCondition, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
@@ -759,15 +823,41 @@ bool WifiPreConnectConditionForEAP()
        and ignore the return type */
 
        int nWifiTimeoutId = -1;
+       
+       wifi_forget_ap(g_pWifiAPHandle);                        
        wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       
        g_bCheckCb = false;
-       int nRet = wifi_scan(WifiScanRequestCallback, NULL);
+       bool bIsActive = false;
+       
+       int nRet = wifi_is_activated(&bIsActive);
+       if ( bIsActive != true )
+       {
+               g_bCheckCb = false;
+               nRet = wifi_activate(WifiActivatedCallback, NULL);
+               if ( nRet != WIFI_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+                       //Done to avoid disconnect after complete execution     
+                       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+                       
+                       return false;
+               }
+       }       
+       
+       nRet = wifi_scan(WifiScanRequestCallback, NULL);
        RUN_POLLING_LOOP;
        if ( nRet != WIFI_ERROR_NONE )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+               //Done to avoid disconnect after complete execution     
+               wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+               
                return false;
        }
+       //Done to avoid disconnect after complete execution     
+       wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       
        if ( !g_bCheckCb )
        {
                FPRINTF("[Line : %d][%s] wifi_scan failed inside WifiPreConnectConditionForEAP, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
index 6319d95..0a790ef 100755 (executable)
@@ -57,12 +57,15 @@ bool g_bCheckCb;
        FPRINTF("[Line : %d] [wifi_ITC] wifi feature not supported, Leaving test\\n", __LINE__);\
        return 0;\
 }\
-       if ( !g_bWifiInit )\
+}
+
+/*
+if ( !g_bWifiInit )\
 {\
        FPRINTF("[Line : %d] [wifi_ITC] Precondition of wifi failed\\n", __LINE__);\
        return 1;\
 }\
-}
+*/
 
 #define CHECK_ACCESS_POINT(Handle) {\
        if ( Handle == NULL )\
index fcbfc74..16bbb3b 100755 (executable)
@@ -67,38 +67,7 @@ void ITs_wifi_config_startup(void)
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
 #endif
 
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -119,74 +88,7 @@ void ITs_wifi_config_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
-       
+               
        if(g_bWifiInitialization)
        {
                nRet = wifi_deinitialize();
index 1452166..a06f28b 100755 (executable)
@@ -65,38 +65,7 @@ void ITs_wifi_eap_startup(void)
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
 #endif
 
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -117,84 +86,7 @@ void ITs_wifi_eap_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               if ( g_pWpsPublicWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWpsPublicWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
-       
+               
        if(g_bWifiInitialization)
        {
                nRet = wifi_deinitialize();
index 4ea4dac..62c269d 100755 (executable)
@@ -61,38 +61,7 @@ void ITs_wifi_manager_startup(void)
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
 #endif
 
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -113,83 +82,6 @@ void ITs_wifi_manager_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               if ( g_pWpsPublicWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWpsPublicWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
        
        if(g_bWifiInitialization)
        {
@@ -208,13 +100,6 @@ void ITs_wifi_manager_cleanup(void)
 }
 
 
-
-
-
-
-
-
-
 //& purpose: To check activation/deactivation of wifi
 //& type : auto
 /**
@@ -243,51 +128,28 @@ int ITc_wifi_activate_deactivate_p(void)
 
        // As we have already activated in startup and here target is activated, so deactivating first
        int nRet = wifi_is_activated(&bIsActive);
-       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_is_activated", WifiGetError(nRet));
-       if ( bIsActive == true )
+       if ( bIsActive != true )
        {
                g_bCheckCb = false;
-               nRet = wifi_deactivate(WifiDeActivatedCallback, NULL);
-               RUN_POLLING_LOOP;
-               PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_deactivate", WifiGetError(nRet));
-               if ( g_bCheckCb )
+               nRet = wifi_activate(WifiActivatedCallback, NULL);
+               if ( nRet != WIFI_ERROR_NONE )
                {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deactivate passed\\n", __LINE__, API_NAMESPACE);
-#endif
+                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
+                       return 1;
                }
-               else
+               RUN_POLLING_LOOP;
+               if ( !g_bCheckCb )
                {
-                       FPRINTF("[Line : %d][%s] wifi_deactivate failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
+                       FPRINTF("[Line : %d][%s] WifiActivatedCallback =  callback function not invoked\\n", __LINE__, API_NAMESPACE);
                        return 1;
                }
        }
-       else 
-       {
-               FPRINTF("[Line : %d][%s] wifi is already deactivated\\n", __LINE__, API_NAMESPACE);
-       }
-
-       nRet = wifi_activate(WifiActivatedCallback, NULL);
-       RUN_POLLING_LOOP;
-       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_activate", WifiGetError(nRet));
-       if ( !g_bCheckCb )
-       {
-               FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
-               wifi_deactivate(WifiDeActivatedCallback, NULL);
-               return 1;
-       }
 
        g_bCheckCb = false;
        nRet = wifi_deactivate(WifiDeActivatedCallback, NULL);
        RUN_POLLING_LOOP;
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_deactivate", WifiGetError(nRet));
-       if ( !g_bCheckCb )
-       {
-               FPRINTF("[Line : %d][%s] wifi_deactivate failed, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
-               wifi_deactivate(WifiDeActivatedCallback, NULL);
-               return 1;
-       }
-
+       
        /* As deactivation takes place in cleanup, which is common for all test cases activate wifi again
        but will not consider its result to determine pass or failure */
        nRet = wifi_is_activated(&bIsActive);
@@ -303,6 +165,14 @@ int ITc_wifi_activate_deactivate_p(void)
                        FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
                }
        }
+       
+       //temp
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d][%s] wifi_deactivate failed, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
+               wifi_deactivate(WifiDeActivatedCallback, NULL);
+               return 1;
+       }
        return 0;
 }
 
@@ -535,7 +405,7 @@ int ITc_wifi_scan_p(void)
 //& purpose: Gets the handle of the connected access point
 //& type : auto
 /**
-* @testcase                    ITc_wifi_get_connected_ap_p
+* @testcase                    ITc_wifi_get_connected_forget_ap_p
 * @type                                auto
 * @author                              SRID(saurabh.s9)
 * @reviewer                            SRID(gupta.sanjay)
@@ -551,7 +421,7 @@ int ITc_wifi_scan_p(void)
 * @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
 * @postcondition               none
 */
-int ITc_wifi_get_connected_ap_p(void)
+int ITc_wifi_get_connected_forget_ap_p(void)
 {
        START_TEST;
 
@@ -593,25 +463,24 @@ int ITc_wifi_get_connected_ap_p(void)
        if ( !g_bCheckCb )
        {
                FPRINTF("[Line : %d][%s] wifi_connect failed, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
-               wifi_forget_ap(g_pWifiAPHandle); 
                return 1;
        }
 
        nRet = wifi_get_connected_ap(&pApHandle);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_get_connected_ap", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_get_connected_ap", WifiGetError(nRet));
        if ( NULL == pApHandle )
        {
-               FPRINTF("[Line : %d][%s] wifi_get_connected_ap failed, for handle creation\\n", __LINE__, API_NAMESPACE);
-               wifi_forget_ap(g_pWifiAPHandle); 
+               FPRINTF("[Line : %d][%s] wifi_get_connected_ap failed, for handle creation\\n", __LINE__, API_NAMESPACE);               
                return 1;
        }
        
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet),wifi_ap_destroy(g_pWifiAPHandle));
+       //Target API
+       nRet = wifi_forget_ap(pApHandle);
+       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet),wifi_ap_destroy(pApHandle));
                
-       nRet = wifi_ap_destroy(g_pWifiAPHandle);
+       nRet = wifi_ap_destroy(pApHandle);
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_destroy", WifiGetError(nRet));
-       g_pWifiAPHandle = NULL;
+       pApHandle = NULL;
        return 0;
 }
 
@@ -730,25 +599,36 @@ int ITc_wifi_connect_disconnect_p(void)
        }
 
        nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet), wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL); FREE_MEMORY(pstrPassphrase));
+       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet), FREE_MEMORY(pstrPassphrase));
                
        g_bCheckCb = false;
        nRet = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
        RUN_POLLING_LOOP;
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_disconnect", WifiGetError(nRet), FREE_MEMORY(pstrPassphrase));
+       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_disconnect", WifiGetError(nRet),wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL); FREE_MEMORY(pstrPassphrase));
        if ( !g_bCheckCb )
        {
                FPRINTF("[Line : %d][%s] wifi_disconnect failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
+               wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
                FREE_MEMORY(pstrPassphrase);
                return 1;
        }
-               
+       
+//Done to avoid disconnect after complete execution    
+       g_bCheckCb = false;
+       nRet = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_connect", WifiGetError(nRet), FREE_MEMORY(pstrPassphrase));
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d][%s] wifi_connect returned no error but connected callback not invoked\\n", __LINE__, API_NAMESPACE);               
+       }
+       
        FREE_MEMORY(pstrPassphrase);
        return 0;
 }
 
 
-
+#if 0
 
 //& purpose: Deletes the information of stored access point and disconnects it when it connected
 //& type : auto
@@ -827,11 +707,6 @@ int ITc_wifi_forget_ap_p(void)
        return 0;
 }
 
-
-
-
-
-#if 0
 // WPS TCs moved to manual testing
 //& purpose: connect the access point with WPS PBS asynchronously
 //& type : auto
index 796074f..dd9a23b 100755 (executable)
@@ -68,38 +68,7 @@ void ITs_wifi_monitor_startup(void)
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
 #endif
 
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -120,83 +89,6 @@ void ITs_wifi_monitor_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               if ( g_pWpsPublicWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWpsPublicWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
        
        if(g_bWifiInitialization)
        {
@@ -420,19 +312,22 @@ int ITc_wifi_set_unset_device_state_changed_cb_p(void)
        int nRet = wifi_set_device_state_changed_cb(WifiDeviceStateChangeCallback, NULL);
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_set_device_state_changed_cb", WifiGetError(nRet));
 
-       g_bCheckCb = false;
-       nRet = wifi_deactivate(WifiDeActivatedCallback, NULL);
-       RUN_POLLING_LOOP;
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_deactivate", WifiGetError(nRet), wifi_unset_device_state_changed_cb());
-       if ( !g_bCheckCb )
-       {
-               FPRINTF("[Line : %d][%s] wifi_deactivate failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-               wifi_unset_device_state_changed_cb();
-               return 1;
-       }
+       // g_bCheckCb = false;
+       // nRet = wifi_deactivate(WifiDeActivatedCallback, NULL);
+       // RUN_POLLING_LOOP;
+       // PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_deactivate", WifiGetError(nRet), wifi_unset_device_state_changed_cb());
+       // if ( !g_bCheckCb )
+       // {
+               // FPRINTF("[Line : %d][%s] wifi_deactivate failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
+               // wifi_unset_device_state_changed_cb();
+               // return 1;
+       // }
 
        nRet = wifi_unset_device_state_changed_cb();
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_unset_device_state_changed_cb", WifiGetError(nRet));
+       
+       // wifi_activate(WifiActivatedCallback, NULL);
+       
        return 0;
 }
 //& purpose: To check register and unregister the callback called for background scan
@@ -477,6 +372,7 @@ int ITc_wifi_set_unset_background_scan_cb_p(void)
 
        nRet = wifi_unset_background_scan_cb();
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_unset_background_scan_cb", WifiGetError(nRet));
+       
        return 0;
 }
 
@@ -521,7 +417,25 @@ int ITc_wifi_set_unset_connection_state_changed_cb_p(void)
        }
 
        nRet = wifi_unset_connection_state_changed_cb();
+       
+       
+       bool bIsActive = false;
+       int result = wifi_is_activated(&bIsActive);
+       if ( bIsActive != true )
+       {
+               g_bCheckCb = false;
+               result = wifi_activate(WifiActivatedCallback, NULL);
+               if ( result != WIFI_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(result));                 
+               }
+       }       
+       
+       /*
+       * wifi_unset_device_state_changed_cb checked later to activate wifi if not activated.
+       */
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_unset_connection_state_changed_cb", WifiGetError(nRet));
+       
        return 0;
 }
 
@@ -584,11 +498,11 @@ int ITc_wifi_set_unset_rssi_level_changed_cb_p(void)
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_connect", WifiGetError(nRet));
        
        RUN_POLLING_LOOP;       
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_set_rssi_level_changed_cb", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle););
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_set_rssi_level_changed_cb", WifiGetError(nRet));
        if ( !g_bCheckCb )
        {
                FPRINTF("[Line : %d][%s] wifi_set_rssi_level_changed_cb failed, error returned = callback function not invoked\\n", __LINE__, API_NAMESPACE);
-               wifi_forget_ap(g_pWifiAPHandle);
+       //      wifi_forget_ap(g_pWifiAPHandle);
                wifi_unset_rssi_level_changed_cb();
                return 1;
        }
@@ -596,8 +510,8 @@ int ITc_wifi_set_unset_rssi_level_changed_cb_p(void)
        nRet = wifi_unset_rssi_level_changed_cb();
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_unset_rssi_level_changed_cb", WifiGetError(nRet));
        
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
index e081634..934b945 100755 (executable)
@@ -65,38 +65,7 @@ void ITs_wifi_network_startup(void)
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
 #endif
 
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -117,83 +86,6 @@ void ITs_wifi_network_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               if ( g_pWpsPublicWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWpsPublicWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
        
        if(g_bWifiInitialization)
        {
@@ -283,17 +175,17 @@ int ITc_wifi_ap_get_bssid_p(void)
        }
 
        nRet = wifi_ap_get_bssid(g_pWifiAPHandle, &pszBssid);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_get_bssid", WifiGetError(nRet),wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_get_bssid", WifiGetError(nRet));
        if ( pszBssid == NULL )
        {
                FPRINTF("[Line : %d][%s] wifi_ap_get_bssid failed, error returned = BSSID returned is NULL\\n", __LINE__, API_NAMESPACE);
-               wifi_forget_ap(g_pWifiAPHandle);
+               //wifi_forget_ap(g_pWifiAPHandle);
                return 1;
        }
        FREE_MEMORY(pszBssid);
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
@@ -363,10 +255,10 @@ int ITc_wifi_ap_get_rssi_p(void)
        }
 
        nRet = wifi_ap_get_rssi(g_pWifiAPHandle,&nRssi);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_get_rssi", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_get_rssi", WifiGetError(nRet));
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
@@ -435,17 +327,17 @@ int ITc_wifi_ap_get_essid_p(void)
        }
 
        nRet = wifi_ap_get_essid(g_pWifiAPHandle, &pszEssid);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_get_essid", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_get_essid", WifiGetError(nRet));
        if ( pszEssid == NULL )
        {
                FPRINTF("[Line : %d][%s] wifi_ap_get_essid failed, error returned = ESSID returned is NULL\\n", __LINE__, API_NAMESPACE);
-               wifi_forget_ap(g_pWifiAPHandle);
+               //wifi_forget_ap(g_pWifiAPHandle);
                return 1;
        }
        FREE_MEMORY(pszEssid);
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
@@ -516,10 +408,10 @@ int ITc_wifi_ap_get_frequency_p(void)
        }
 
        nRet = wifi_ap_get_frequency(g_pWifiAPHandle,&nFrequency);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_get_frequency", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_get_frequency", WifiGetError(nRet));
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
                
        return 0;
 }
@@ -588,10 +480,10 @@ int ITc_wifi_ap_get_max_speed_p(void)
        }
 
        nRet = wifi_ap_get_max_speed(g_pWifiAPHandle,&nMaxSpeed);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_get_max_speed", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_get_max_speed", WifiGetError(nRet));
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
@@ -697,14 +589,14 @@ int ITc_wifi_ap_is_passpoint_p(void)
        }
 
        nRet = wifi_ap_is_passpoint(g_pWifiAPHandle, &bIsPasspoint);
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_is_passpoint", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_is_passpoint", WifiGetError(nRet));
 
 #if DEBUG
        FPRINTF("[Line : %d][%s] wifi_ap_is_passpoint returned = %s\\n", __LINE__, API_NAMESPACE, bIsPasspoint == true ? "true" : "false");
 #endif
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
@@ -762,8 +654,8 @@ int ITc_wifi_ap_get_connection_state_p(void)
        int nRet = wifi_ap_set_passphrase(g_pWifiAPHandle, pstrPassphrase);
        PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_set_passphrase", WifiGetError(nRet), FREE_MEMORY(pstrPassphrase));
 
-       FREE_MEMORY(pstrPassphrase);
 
+       FREE_MEMORY(pstrPassphrase);
        nRet = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
        RUN_POLLING_LOOP;
        PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_connect", WifiGetError(nRet));
@@ -774,10 +666,10 @@ int ITc_wifi_ap_get_connection_state_p(void)
        }
 
        nRet = wifi_ap_get_connection_state(g_pWifiAPHandle, &state);//target api
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_get_connection_state", WifiGetError(nRet), wifi_forget_ap(g_pWifiAPHandle));
+       PRINT_RESULT(WIFI_ERROR_NONE, nRet, "wifi_ap_get_connection_state", WifiGetError(nRet));
 
-       nRet = wifi_forget_ap(g_pWifiAPHandle);
-       PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
+       //nRet = wifi_forget_ap(g_pWifiAPHandle);
+       //PRINT_RESULT_NORETURN(WIFI_ERROR_NONE, nRet, "wifi_forget_ap", WifiGetError(nRet));
        
        return 0;
 }
index 9561e1d..44cfe93 100755 (executable)
@@ -64,38 +64,7 @@ void ITs_wifi_security_startup(void)
                FPRINTF("[Line : %d][%s] wifi_initialize passed\\n", __LINE__, API_NAMESPACE);
 #endif
 
-               g_bWifiInitialization = true;
-               nRet = wifi_is_activated(&bIsActive);
-               if ( bIsActive == true )
-               {
-                       FPRINTF("[Line : %d][%s] wifi already activated, no need to activate again\\n", __LINE__, API_NAMESPACE);
-                       g_bWifiInit = true;
-                       return;
-               }
-
-               g_bCheckCb = false;
-               nRet = wifi_activate(WifiActivatedCallback, NULL);
-               if ( nRet != WIFI_ERROR_NONE )
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       g_bWifiInit = false;
-                       return;
-               }
-               RUN_POLLING_LOOP;
-
-               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
-               if ( g_bCheckCb )
-               {// NO checking for return value as activate can return busy state
-                       g_bWifiInit = true;
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_activate passed on startup\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line : %d][%s] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       wifi_deinitialize();
-               }
+               g_bWifiInitialization = true;           
        }
        else 
        {
@@ -116,83 +85,6 @@ void ITs_wifi_security_cleanup(void)
 #endif
 
        int nRet = 0;
-       if ( g_bWifiInit )
-       {
-               int nWifiTimeoutId = -1;
-               if ( g_pWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWifiAPHandle = NULL;
-               }
-
-               if ( g_pEapWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pEapWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pEapWifiAPHandle = NULL;
-               }
-
-               if ( g_pWpsPublicWifiAPHandle != NULL )
-               {
-                       nRet = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
-                       if ( nRet != WIFI_ERROR_NONE )
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_ap_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-                       g_pWpsPublicWifiAPHandle = NULL;
-               }
-
-               bool bIsActivate = false;
-               nRet = wifi_is_activated(&bIsActivate);
-               if (bIsActivate == true)
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_is_activated passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                       g_bCheckCb = false;
-                       nRet = wifi_deactivate(WifiDeActivatedCallback,NULL);
-                       RUN_POLLING_LOOP;
-
-                       if ( nRet == WIFI_ERROR_NONE )
-                       {
-                               if ( g_bCheckCb )
-                               {
-#if DEBUG
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate passed on cleanup\\n", __LINE__, API_NAMESPACE);
-#endif
-                               }
-                               else 
-                               {
-                                       FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-                               }
-                       }
-                       else 
-                       {
-                               FPRINTF("[Line : %d][%s] wifi_deactivate failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-                       }
-               }
-
-               nRet = wifi_deinitialize();
-               if ( nRet == WIFI_ERROR_NONE )
-               {
-#if DEBUG
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize passed\\n", __LINE__, API_NAMESPACE);
-#endif
-               }
-               else 
-               {
-                       FPRINTF("[Line : %d][%s] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, WifiGetError(nRet));
-               }
-               FREE_MEMORY(g_pszESSID);
-               return;
-       }
        
        if(g_bWifiInitialization)
        {
@@ -211,9 +103,6 @@ void ITs_wifi_security_cleanup(void)
 }
 
 
-
-
-
 /** @addtogroup itc-wifi-testcases
 *  @brief              Integration testcases for module wifi
 *  @ingroup    itc-wifi
@@ -459,17 +348,7 @@ int ITc_wifi_ap_set_passphrase_p(void)
        CHECK_ACCESS_POINT_CLEANUP(g_pWifiAPHandle, FREE_MEMORY(pszPassphrase));
        wifi_ap_set_security_type(g_pWifiAPHandle, WIFI_SECURITY_TYPE_WPA2_PSK);
 
-       bool b_isPassphraseRequired = false;
-       int nRet = wifi_ap_is_passphrase_required(g_pWifiAPHandle, &b_isPassphraseRequired);
-       PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_is_passphrase_required", WifiGetError(nRet), FREE_MEMORY(pszPassphrase));
-       if ( !b_isPassphraseRequired )
-       {
-               FPRINTF("[Line : %d][%s] wifi_ap_is_passphrase_required returned false\\n", __LINE__, API_NAMESPACE);
-               FREE_MEMORY(pszPassphrase);
-               return 1;
-       }
-
-       nRet = wifi_ap_set_passphrase(g_pWifiAPHandle, pszPassphrase);//target api
+       int nRet = wifi_ap_set_passphrase(g_pWifiAPHandle, pszPassphrase);//target api
        PRINT_RESULT_CLEANUP(WIFI_ERROR_NONE, nRet, "wifi_ap_set_passphrase", WifiGetError(nRet), FREE_MEMORY(pszPassphrase));
        FREE_MEMORY(pszPassphrase);
        return 0;
index c124958..f88faee 100755 (executable)
@@ -67,10 +67,9 @@ extern int ITc_wifi_is_activated_p(void);
 extern int ITc_wifi_get_mac_address_p(void);
 extern int ITc_wifi_get_network_interface_name_p(void);
 extern int ITc_wifi_scan_p(void);
-extern int ITc_wifi_get_connected_ap_p(void);
+extern int ITc_wifi_get_connected_forget_ap_p(void);
 extern int ITc_wifi_foreach_found_aps_p(void);
 extern int ITc_wifi_connect_disconnect_p(void);
-extern int ITc_wifi_forget_ap_p(void);
 extern int ITc_wifi_get_connection_state_p(void);
 extern int ITc_wifi_set_unset_device_state_changed_cb_p(void);
 extern int ITc_wifi_set_unset_background_scan_cb_p(void);
@@ -130,10 +129,9 @@ testcase tc_array[] = {
     {"ITc_wifi_get_mac_address_p", ITc_wifi_get_mac_address_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_network_interface_name_p", ITc_wifi_get_network_interface_name_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_scan_p", ITc_wifi_scan_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_get_connected_ap_p", ITc_wifi_get_connected_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
+    {"ITc_wifi_get_connected_forget_ap_p", ITc_wifi_get_connected_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_foreach_found_aps_p", ITc_wifi_foreach_found_aps_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_connect_disconnect_p", ITc_wifi_connect_disconnect_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_forget_ap_p", ITc_wifi_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_connection_state_p", ITc_wifi_get_connection_state_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_device_state_changed_cb_p", ITc_wifi_set_unset_device_state_changed_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_background_scan_cb_p", ITc_wifi_set_unset_background_scan_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
index c124958..f88faee 100755 (executable)
@@ -67,10 +67,9 @@ extern int ITc_wifi_is_activated_p(void);
 extern int ITc_wifi_get_mac_address_p(void);
 extern int ITc_wifi_get_network_interface_name_p(void);
 extern int ITc_wifi_scan_p(void);
-extern int ITc_wifi_get_connected_ap_p(void);
+extern int ITc_wifi_get_connected_forget_ap_p(void);
 extern int ITc_wifi_foreach_found_aps_p(void);
 extern int ITc_wifi_connect_disconnect_p(void);
-extern int ITc_wifi_forget_ap_p(void);
 extern int ITc_wifi_get_connection_state_p(void);
 extern int ITc_wifi_set_unset_device_state_changed_cb_p(void);
 extern int ITc_wifi_set_unset_background_scan_cb_p(void);
@@ -130,10 +129,9 @@ testcase tc_array[] = {
     {"ITc_wifi_get_mac_address_p", ITc_wifi_get_mac_address_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_network_interface_name_p", ITc_wifi_get_network_interface_name_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_scan_p", ITc_wifi_scan_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_get_connected_ap_p", ITc_wifi_get_connected_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
+    {"ITc_wifi_get_connected_forget_ap_p", ITc_wifi_get_connected_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_foreach_found_aps_p", ITc_wifi_foreach_found_aps_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_connect_disconnect_p", ITc_wifi_connect_disconnect_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_forget_ap_p", ITc_wifi_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_connection_state_p", ITc_wifi_get_connection_state_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_device_state_changed_cb_p", ITc_wifi_set_unset_device_state_changed_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_background_scan_cb_p", ITc_wifi_set_unset_background_scan_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
index 4a1520e..d4dcc82 100755 (executable)
@@ -48,10 +48,9 @@ extern int ITc_wifi_is_activated_p(void);
 extern int ITc_wifi_get_mac_address_p(void);
 extern int ITc_wifi_get_network_interface_name_p(void);
 extern int ITc_wifi_scan_p(void);
-extern int ITc_wifi_get_connected_ap_p(void);
+extern int ITc_wifi_get_connected_forget_ap_p(void);
 extern int ITc_wifi_foreach_found_aps_p(void);
 extern int ITc_wifi_connect_disconnect_p(void);
-extern int ITc_wifi_forget_ap_p(void);
 extern int ITc_wifi_get_connection_state_p(void);
 extern int ITc_wifi_set_unset_device_state_changed_cb_p(void);
 extern int ITc_wifi_set_unset_background_scan_cb_p(void);
@@ -95,10 +94,9 @@ testcase tc_array[] = {
     {"ITc_wifi_get_mac_address_p", ITc_wifi_get_mac_address_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_network_interface_name_p", ITc_wifi_get_network_interface_name_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_scan_p", ITc_wifi_scan_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_get_connected_ap_p", ITc_wifi_get_connected_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
+    {"ITc_wifi_get_connected_forget_ap_p", ITc_wifi_get_connected_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_foreach_found_aps_p", ITc_wifi_foreach_found_aps_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_connect_disconnect_p", ITc_wifi_connect_disconnect_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_forget_ap_p", ITc_wifi_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_connection_state_p", ITc_wifi_get_connection_state_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_device_state_changed_cb_p", ITc_wifi_set_unset_device_state_changed_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_background_scan_cb_p", ITc_wifi_set_unset_background_scan_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
index 03c1f51..e6c2e80 100755 (executable)
@@ -67,10 +67,9 @@ extern int ITc_wifi_is_activated_p(void);
 extern int ITc_wifi_get_mac_address_p(void);
 extern int ITc_wifi_get_network_interface_name_p(void);
 extern int ITc_wifi_scan_p(void);
-extern int ITc_wifi_get_connected_ap_p(void);
+extern int ITc_wifi_get_connected_forget_ap_p(void);
 extern int ITc_wifi_foreach_found_aps_p(void);
 extern int ITc_wifi_connect_disconnect_p(void);
-extern int ITc_wifi_forget_ap_p(void);
 extern int ITc_wifi_get_connection_state_p(void);
 extern int ITc_wifi_set_unset_device_state_changed_cb_p(void);
 extern int ITc_wifi_set_unset_background_scan_cb_p(void);
@@ -130,10 +129,9 @@ testcase tc_array[] = {
     {"ITc_wifi_get_mac_address_p", ITc_wifi_get_mac_address_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_network_interface_name_p", ITc_wifi_get_network_interface_name_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_scan_p", ITc_wifi_scan_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_get_connected_ap_p", ITc_wifi_get_connected_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
+    {"ITc_wifi_get_connected_forget_ap_p", ITc_wifi_get_connected_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_foreach_found_aps_p", ITc_wifi_foreach_found_aps_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_connect_disconnect_p", ITc_wifi_connect_disconnect_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
-    {"ITc_wifi_forget_ap_p", ITc_wifi_forget_ap_p, ITs_wifi_manager_startup, ITs_wifi_manager_cleanup},
     {"ITc_wifi_get_connection_state_p", ITc_wifi_get_connection_state_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_device_state_changed_cb_p", ITc_wifi_set_unset_device_state_changed_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},
     {"ITc_wifi_set_unset_background_scan_cb_p", ITc_wifi_set_unset_background_scan_cb_p, ITs_wifi_monitor_startup, ITs_wifi_monitor_cleanup},