Anirudh Gargi
2018-09-27 11:19:56 UTC
Add handling for CREG's status to get the technology type. CREG
notify URC does not need additional handling as 'AcT' is mapped
one-on-one to tech.
---
drivers/atmodem/network-registration.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 0854cd1..789397e 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;
+ /* 6-10 is EUTRAN, with 8 being emergency bearer case */
+ if((status > 5) && (tech == -1))
+ tech = ACCESS_TECHNOLOGY_EUTRAN;
+
cb(&error, status, lac, ci, tech, cbd->data);
}
notify URC does not need additional handling as 'AcT' is mapped
one-on-one to tech.
---
drivers/atmodem/network-registration.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 0854cd1..789397e 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;
+ /* 6-10 is EUTRAN, with 8 being emergency bearer case */
+ if((status > 5) && (tech == -1))
+ tech = ACCESS_TECHNOLOGY_EUTRAN;
+
cb(&error, status, lac, ci, tech, cbd->data);
}
--
2.7.4
2.7.4