Hi Anirudh,
On 09/11/2018 03:32 AM, Anirudh Gargi wrote:
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;
+
Perhaps:
if (status > 5 && tech == -1)
tech = ACCESS_TECHNOLOGY_EUTRAN; ?
status = 8 (emergency bearer) also applies to EUTRAN correct?
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;
+ }
Perhaps:
if (status > 5 && tech == -1)
tech = ACCESS_TECHNOLOGY_EUTRAN;
if (status != 1 && status != 5)
goto notify;
We need to only query technology for old modems that don't support LTE
anyway...
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;
+
And then this part might not be needed.
notify:
ofono_netreg_status_notify(netreg, status, lac, ci, tech);
}
Regards,
-Denis
_______________________________________________
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono