added CREG 'status' 6 and 7 for sms only registered state on E-UTRAN
for  CREG cmd reply callback and URC notfiy.
---
 drivers/atmodem/network-registration.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/atmodem/network-registration.c 
b/drivers/atmodem/network-registration.c
index 0854cd1..c0ec8c7 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -228,6 +228,10 @@ static void at_creg_cb(gboolean ok, GAtResult *result, 
gpointer user_data)
        if ((status == 1 || status == 5) && (tech == -1))
                tech = nd->tech;
 
+       /* Handle EUTRAN cases */
+       if ((status == 6 || status == 7) && (tech == -1))
+               tech = ACCESS_TECHNOLOGY_EUTRAN;
+
        cb(&error, status, lac, ci, tech, cbd->data);
 }
 
@@ -1522,8 +1526,11 @@ static void creg_notify(GAtResult *result, gpointer 
user_data)
                                &lac, &ci, &tech, nd->vendor) == FALSE)
                return;
 
-       if (status != 1 && status != 5)
-               goto notify;
+       /* Not camped case */
+       if (status != 1 && status != 5) {
+               if (status != 6 && status != 7)
+                       goto notify;
+       }
 
        tq = g_try_new0(struct tech_query, 1);
        if (tq == NULL)
@@ -1569,6 +1576,9 @@ static void creg_notify(GAtResult *result, gpointer 
user_data)
        if ((status == 1 || status == 5) && tech == -1)
                tech = nd->tech;
 
+       if ((status == 6 || status == 7) && tech == -1)
+               tech = ACCESS_TECHNOLOGY_EUTRAN;
+
 notify:
        ofono_netreg_status_notify(netreg, status, lac, ci, tech);
 }
-- 
2.7.4

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to