[Bugfix][T106][bug-view-331]add wake_lock in thread_wait_cb_status

Only Configure: Yes
Affected branch: master
Affected module: data
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: yes
Doc Update: No

Change-Id: I3b27e2481a5d7c8166f8d6d3026552880bed7e57
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 23a7831..179e549 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -1270,6 +1270,30 @@
     return RESULT_OK;
 }
 
+static void acquire_wake_lock()
+{
+    int ret = 0;
+
+    ret = system("echo data_call_wakelock 5000000000 > /sys/power/wake_lock");//timeout 5s
+    if(ret != 0)
+    {
+        LYERRLOG("acquire_wake_lock error !!!");
+    }
+    return;
+}
+
+static void release_wake_lock()
+{
+    int ret = 0;
+    
+    ret = system("echo data_call_wakelock > /sys/power/wake_unlock");
+    if(ret != 0)
+    {
+        LYERRLOG("release_wake_lock error !!!");
+    }
+    return;
+}
+
 void *thread_wait_cb_status(void)
 {
     int handle = -1;
@@ -1289,6 +1313,7 @@
         {
             continue;
         }
+        acquire_wake_lock();
         LYINFLOG("[thread_wait_cb_status]: handle = %d", handle);
         memset(&data_urc_info, 0, sizeof(data_urc_info));
         memset(&data_cb_state, 0, sizeof(data_cb_state));
@@ -1350,12 +1375,15 @@
         }
         else
         {
+            release_wake_lock();
             LYERRLOG("unknow ip_family");
             continue;
         }
         if (s_data_call_cb != NULL)
         {
-         s_data_call_cb(&data_cb_state);
+            s_data_call_cb(&data_cb_state);
+            release_wake_lock();
+            LYINFLOG("[%s] call back s_data_call_cb end", __FUNCTION__);
         }
     }
     return NULL;