Merge "[Feature][S300][task-view-1900][arms] Docking with ARMS platform"
diff --git a/lynq/S300/BJMTN/ap/app/zte_mifi/zte_mifi.c b/lynq/S300/BJMTN/ap/app/zte_mifi/zte_mifi.c
index 29d30f2..0edd94d 100755
--- a/lynq/S300/BJMTN/ap/app/zte_mifi/zte_mifi.c
+++ b/lynq/S300/BJMTN/ap/app/zte_mifi/zte_mifi.c
@@ -121,6 +121,43 @@
 	return;
 }
 
+static void select_sleep(int seconds)
+{
+    struct timeval timeout;
+    int ret;
+
+    timeout.tv_sec = seconds;
+    timeout.tv_usec = 0;
+
+    while (1)
+    {
+        ret = select(0, NULL, NULL, NULL, &timeout);
+        if (ret == 0)
+        {
+            break;
+        } 
+        else if (ret == -1)
+        {
+            if (errno == EINTR)
+            {
+                continue;
+            }
+            else 
+            {
+                perror("select");
+                break;
+            }
+        }
+    }
+}
+
+void zte_arms_entry(char *arg)
+{
+	select_sleep(30);
+	system("/sbin/apparms -l 3 &");
+	return;
+}
+
 void fluxstat_entry(char *arg)
 {
 	fluxstat_main(0,NULL);
@@ -281,6 +318,9 @@
 		/* zte_watchdog */
 		pthread_t zte_watchdog_thread_tid;
 		pthread_create(&zte_watchdog_thread_tid, NULL, (void *)zte_watchdog_entry, NULL);
+		pthread_t zte_arms_thread_tid;
+		pthread_create(&zte_arms_thread_tid, NULL, (void *)zte_arms_entry, NULL);
+		pthread_detach(zte_arms_thread_tid);
 	}
 	else
 	{
diff --git a/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc b/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc
index 9e8d824..6d8abb0 100755
--- a/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc
+++ b/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc
@@ -315,4 +315,4 @@
 sh /sbin/rtl8192_calibrate.sh 1 &
 
 # /sbin/wefota &
-/sbin/apparms -l 3 &
+# /sbin/apparms -l 3 &
diff --git a/lynq/wifi/S300/rtl8192cd_92fs/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc b/lynq/wifi/S300/rtl8192cd_92fs/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc
index 04960fd..5e6cd7c 100755
--- a/lynq/wifi/S300/rtl8192cd_92fs/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc
+++ b/lynq/wifi/S300/rtl8192cd_92fs/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc/rc
@@ -315,4 +315,4 @@
 # sh /sbin/rtl8192_calibrate.sh 1 &
 
 # /sbin/wefota &
-/sbin/apparms -l 3 &
+# /sbin/apparms -l 3 &