[Bugfix][API-1158] rm IFX WAR about ap cannot connect & ping bug

Only Configure:NO

Affected branch:MR3.0-xx && GSW3.0

Affected module:wifi

Is it addected on both ZXIC and MTK: only MTK

Self-test: Yes

Doc Update: NO

Change-Id: I94e425e8038b41c55cc57ebf594c74ab40dcf4db
diff --git a/src/lynq/lib/liblynq-wifi6/libwifi6.c b/src/lynq/lib/liblynq-wifi6/libwifi6.c
index 2772668..f6f1dc5 100755
--- a/src/lynq/lib/liblynq-wifi6/libwifi6.c
+++ b/src/lynq/lib/liblynq-wifi6/libwifi6.c
@@ -46,11 +46,6 @@
 volatile int g_ap_watcher_stop_flag = 0;
 volatile int g_ap_watcher_started_flag = 0;
 
-pthread_t g_ap_tmp_watcher_pid = 0;
-volatile int g_ap_tmp_watcher_stop_flag = 0;
-
-
-
 pthread_t g_sta_watcher_pid = 0;
 volatile int g_sta_watcher_stop_flag = 0;
 volatile int g_sta_scan_finish_flag = 1;
@@ -495,34 +490,6 @@
     }
 }
 
-
-static void APTmpWatcherThreadProc() {
-
-    int i = 0;
-    g_ap_tmp_watcher_stop_flag = 0;
-    int delytimes = 1800;
-
-    RLOGD("APTmpWatcherThreadProc ----> ThreadProc start");
-    while(1)
-    {
-        sleep(1);
-        i++;
-        if( i == delytimes )
-        {
-            i = 0;
-            system("wl reinit");
-            RLOGD("APTmpWatcherThreadProc ----- > do cmd reinit");
-        }
-        if( g_ap_tmp_watcher_stop_flag == 1 )
-        {
-           RLOGD("APTmpWatcherThreadProc ----- > ap closed or wifi disabled");
-           return;
-        }
-    }
-
-}
-
-
 static void inner_check_connect_error(const char * event_msg, lynq_wifi_sta_status_s state, error_number_s error_num)
 {
     char * p;
@@ -1158,15 +1125,12 @@
     g_ap_watcher_stop_flag = 1;
     g_sta_watcher_stop_flag = 1;
     g_sta_auto_watcher_stop_flag = 1;
-    g_ap_tmp_watcher_stop_flag = 1;
     if (g_ap_watcher_pid != 0)
         pthread_join(g_ap_watcher_pid, NULL);
     if (g_sta_watcher_pid != 0)
         pthread_join(g_sta_watcher_pid, NULL);
     if (g_sta_auto_watcher_pid != 0)
         pthread_join(g_sta_auto_watcher_pid, NULL);
-    if (g_ap_tmp_watcher_pid != 0)
-        pthread_join(g_ap_tmp_watcher_pid, NULL);
     if (g_lynq_wpa_ctrl[0] != NULL)
         wpa_ctrl_close(g_lynq_wpa_ctrl[0]);
     if (g_lynq_wpa_ctrl[1] != NULL)
@@ -1174,7 +1138,6 @@
     g_ap_watcher_pid = 0;
     g_sta_watcher_pid = 0;
     g_sta_auto_watcher_pid = 0;
-    g_ap_tmp_watcher_pid = 0;
     g_lynq_wpa_ctrl[0] = NULL;
     g_lynq_wpa_ctrl[1] = NULL;
     system("systemctl stop wg870_drv_insmod.service");
@@ -2317,17 +2280,6 @@
 
     check_tether_and_notify();
 
-    if (g_ap_tmp_watcher_pid == 0)
-    {
-        if(pthread_create(&g_ap_tmp_watcher_pid,NULL,APTmpWatcherThreadProc,NULL) < 0)
-        {
-            g_ap_tmp_watcher_pid = 0;
-            RLOGE("[wifi error]create APTmpWatcherThreadProc fail");
-            return -1;
-        }
-        RLOGD("[lynq_wifi_ap_start] creat APTmpWatcherThreadProc ok");
-    }
-
     return 0;
 }
 
@@ -2356,10 +2308,7 @@
         RLOGE("lynq_wifi_ap_start excute script fail");
         return -1;
     }
-    g_ap_tmp_watcher_stop_flag = 1;
-    if (g_ap_tmp_watcher_pid != 0)
-        pthread_join(g_ap_tmp_watcher_pid, NULL);
-    g_ap_tmp_watcher_pid = 0;
+
     return 0;
 }