[Bugfix][T108][bug-view-2001] when data call have been build, call gsw_set_opmode set opmode to 0, net iface still exist

    Only Configure: No
    Affected branch: unknown
    Affected module: data
    Is it affected : only ASR
    Self-test: yes
    Doc Update: no

Change-Id: I8d59fe77e3e9c83d306df7ac7977061895392844
diff --git a/mbtk/mbtk_rild/src/main.c b/mbtk/mbtk_rild/src/main.c
index f109c54..f66830d 100755
--- a/mbtk/mbtk_rild/src/main.c
+++ b/mbtk/mbtk_rild/src/main.c
@@ -171,7 +171,7 @@
 mbtk_sim_card_info sim_info_reg={0};

 static void onUnsolicited(const char *s, const char *sms_pdu)

 {

-    LOGV("URC : %s", s);

+    LOGI("URC : %s", s);  //LYNQ_ASR_BUG2001_Q.HUANG_20250731_change_level_from_v_2_info

     // MBTK_AT_READY

     if (strStartsWith(s, "MBTK_AT_READY")) // AT ready.

     {

@@ -245,7 +245,15 @@
             mbtk_pdp_cb_info_s pdp_cb_info;

             memset(&pdp_cb_info, 0x00, sizeof(mbtk_pdp_cb_info_s));

             pdp_cb_info.auto_urc = false;

-            if(cgact_wait.act)

+            

+            if(strStartsWith(s, "+CGEV: NW PDN DEACT ")) // +CGEV: NW PDN DEACT 1

+            {

+                pdp_cb_info.cid = atoi(s + 20);

+                pdp_cb_info.auto_urc=true;

+                pdp_cb_info.connect_state = false;

+                urc_msg_distribute(true, INFO_URC_MSG_CGEV, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));

+            }

+            else if(cgact_wait.act)

             {

                 if(strStartsWith(s, "+CGEV: ME PDN ACT ")) // +CGEV: ME PDN ACT 15,4

                 {

@@ -325,20 +333,25 @@
                     pdp_cb_info.connect_state = true;

                     //urc_msg_distribute(true, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));

                 }

+                else

+                {

+                    LOGI("No process : %s in cgact ture process", s);

+                }

             } 

+            else if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) // +CGEV: ME PDN DEACT 1

+            {

+                if(cgact_wait.cid == atoi(s + 20))

+                {

+                    cgact_wait.waitting = false;

+                }

+                

+                pdp_cb_info.cid = atoi(s + 20);

+                pdp_cb_info.connect_state = false;

+                urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));

+            }

             else

             {

-                if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) // +CGEV: ME PDN DEACT 1

-                {

-                    if(cgact_wait.cid == atoi(s + 20))

-                    {

-                        cgact_wait.waitting = false;

-                    }

-                    

-                    pdp_cb_info.cid = atoi(s + 20);

-                    pdp_cb_info.connect_state = false;

-                    urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));

-                }

+                LOGI("No process : %s in AT process", s);

             }

         } 

         else

diff --git a/mbtk/mbtk_rild/src/mbtk_info_server.c b/mbtk/mbtk_rild/src/mbtk_info_server.c
index 181d9e1..785e909 100755
--- a/mbtk/mbtk_rild/src/mbtk_info_server.c
+++ b/mbtk/mbtk_rild/src/mbtk_info_server.c
@@ -4561,6 +4561,7 @@
                         LOG("Set modem error.");
                         break;
                     }
+                    at_cfun_command = true;  //LYNQ_ASR_BUG2001_Q.HUANG_20250731_ADD
                     if(req_modem_set(modem, &cme_err) || cme_err != MBTK_INFO_ERR_CME_NON)
                     {
                         LOG("Set modem fail.");
@@ -5262,7 +5263,6 @@
                             LOG("Set radio state fail.");
                         }
                     }
-                    at_cfun_command = false;
                 }
                 break;
             }
@@ -7179,6 +7179,7 @@
                     }
                 }
                 at_process = false;
+                at_cfun_command = false; //LYNQ_ASR_BUG2001_Q.HUANG_20250731_ADD
                 mbtk_info_pack_free(&pack);
                 free(item);
             } else { // REQ from myself.