[Bugfix][T108-GSW][bug-view-1583] gsw_get_cellinfo: miss info

    Only Configure: No
    Affected branch: unknown
    Affected module: network
    Is it affected on both ZXIC and ASR: only ASR
    Self-test: yes
    Doc Update: no

Change-Id: Ib60b0654ec42ad5ab7dbafe72a20cb5ff1cdc904
diff --git a/mbtk/mbtk_rild/src/main.c b/mbtk/mbtk_rild/src/main.c
index a527ed1..a0f0afb 100755
--- a/mbtk/mbtk_rild/src/main.c
+++ b/mbtk/mbtk_rild/src/main.c
@@ -947,11 +947,10 @@
                 goto EEMLTESVC_EXIT;

             }

             cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;    //dl arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0)

+            if (at_tok_nextint(&line, &tmp_int) < 0)                       //ul arfcn

             {

                 goto EEMLTESVC_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int;    //ul arfcn

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

                 goto EEMLTESVC_EXIT;

@@ -965,14 +964,21 @@
             {

                 goto EEMLTESVC_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value8 = (uint32)tmp_int;    //cid

+            cell_info.cell[cell_info.cell_num].value8 = (uint32)tmp_int;    //rsrp

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

                 goto EEMLTESVC_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value9 = (uint32)tmp_int;    //rsrp

+            cell_info.cell[cell_info.cell_num].value9 = (uint32)tmp_int;    //rsrq

 

-            for(i =0; i < 10; i++)

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+			

+            cell_info.cell[cell_info.cell_num].value11 = (uint32)tmp_int;    //sinr

+

+            for(i =0; i < 9; i++)

             {

                 if (at_tok_nextint(&line, &tmp_int) < 0)

                 {

@@ -991,6 +997,16 @@
 

             cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int; //dlBler

 

+            for(i =0; i < 14; i++)

+            {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMLTESVC_EXIT;

+                }

+            }

+

+            cell_info.cell[cell_info.cell_num].value12 = (uint32)tmp_int; //fdd or tdd   //63

+

             cell_info.cell_num++;

 

             LOG("LTESVC cell_num : %d", cell_info.cell_num);

@@ -1004,7 +1020,53 @@
     // index,phyCellId,euArfcn,rsrp,rsrq

     +EEMLTEINTER: 0, 65535, 38950, 0, 0

     */

-    else if(strStartsWith(s, "+EEMLTEINTER:") || strStartsWith(s, "+EEMLTEINTRA:")) // LTE ÒìÆµ/Í¬ÆµÐ¡Çø

+    else if(strStartsWith(s, "+EEMLTEINTRA:")) // LTE Í¬ÆµÐ¡Çø

+    {

+        // phyCellId,euArfcn,rsrp,rsrq

+        if(cell_info.running) {

+            int tmp_int;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMLTEINTRA_EXIT;

+            }

+            if (at_tok_nextint(&line, &tmp_int) < 0)  //index

+            {

+                goto EEMLTEINTRA_EXIT;

+            }

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int > 503)

+            {

+                goto EEMLTEINTRA_EXIT;

+            }

+            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;  //phycellid

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTRA_EXIT;

+            }

+            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int; //arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTRA_EXIT;

+            }

+            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int; //rsrp

+            LOG("cell line : %s", line);

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTRA_EXIT;

+            }

+            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int; //rsrq

+			

+			cell_info.cell[cell_info.cell_num].value7 =0x7FFFFFFF;//mnc

+            

+            cell_info.cell_num++;

+EEMLTEINTRA_EXIT:

+            free(free_ptr);

+        }

+    }

+    // Do nothing

+    else if(strStartsWith(s, "+EEMLTEINTER:")) // LTE ÒìÆµ/Ð¡Çø

     {

         // phyCellId,euArfcn,rsrp,rsrq

         if(cell_info.running) {

@@ -1016,7 +1078,7 @@
             {

                 goto EEMLTEINTER_EXIT;

             }

-            if (at_tok_nextint(&line, &tmp_int) < 0)

+            if (at_tok_nextint(&line, &tmp_int) < 0)  //index

             {

                 goto EEMLTEINTER_EXIT;

             }

@@ -1024,29 +1086,29 @@
             {

                 goto EEMLTEINTER_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

+            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int; //phy cell id

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

                 goto EEMLTEINTER_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

+            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int; //arfcn

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

                 goto EEMLTEINTER_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

+            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;  //rsrp

             LOG("cell line : %s", line);

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

                 goto EEMLTEINTER_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int;

+            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int; //rsrq

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

                 LOG("cell tmp_int : %d", tmp_int);

                 goto EEMLTEINTER_EXIT;

             }

-            cell_info.cell[cell_info.cell_num].value5 = (uint32)tmp_int;

+            cell_info.cell[cell_info.cell_num].value5 = (uint32)tmp_int;  //cellid

             LOG("cell value5 : %d", cell_info.cell[cell_info.cell_num].value5);

 

             LOG("after cellid cell line : %s", line);

@@ -1056,11 +1118,11 @@
             }

             cell_info.cell[cell_info.cell_num].value6 = (uint32)tmp_int; //mcc

 

-            if (at_tok_nextint(&line, &tmp_int) < 0)

+            if (at_tok_nextint(&line, &tmp_int) < 0)   //length of mnc

             {

                 LOG("exit");

                 goto EEMLTEINTER_EXIT;

-            }

+            }     

 

             if (at_tok_nextint(&line, &tmp_int) < 0)

             {

@@ -1070,23 +1132,19 @@
 

             cell_info.cell[cell_info.cell_num].value7 = (uint32)tmp_int; //mnc

 

-            if (at_tok_nextint(&line, &tmp_int) < 0)

+            if (at_tok_nextint(&line, &tmp_int) < 0)  

             {

                 LOG("exit");

                 goto EEMLTEINTER_EXIT;

-            }

+            }     

+			cell_info.cell[cell_info.cell_num].value8 = (uint32)tmp_int; //tac

+            LOG("cell value8 : %u", (uint32)cell_info.cell[cell_info.cell_num].value8);

 

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                LOG("exit");

-                goto EEMLTEINTER_EXIT;

-            }

 

-            cell_info.cell[cell_info.cell_num].value8 = (uint32)tmp_int; //cellId

-            LOG("cell value8 : %u", (uint32)cell_info.cell[cell_info.cell_num].value9);

-            for(int i =0; i < 5; i++)

+            for(int i =0; i < 8; i++)

             {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

+                if (at_tok_nextint(&line, &tmp_int) < 0)  //1 cell id  2 rslevel 

+				                           // 3 thresh low  4 thresh_high 5 cell_priority  6 refSignalPower 7 bandwidth 8 band

                 {

                     LOG("exit i = %d",i);

                     goto EEMLTEINTER_EXIT;