This fix is for Meego bug #389. Dell 5530 modem reports 'ERROR' when
'AT+CGATT=0'. In the error case, we need to wait until the context
deactivation returns and then check netreg status. If status is zero,
we update driver_attached to FALSE.
---
 src/gprs.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gprs.c b/src/gprs.c
index dfb6d16..8e065d2 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1325,6 +1325,14 @@ void ofono_gprs_status_notify(struct ofono_gprs *gprs, 
int status)
        if (gprs->driver_attached == FALSE)
                return;
 
+       /* Dell 5530 reports 'ERROR' when we try to detach by 'AT+CGATT=0'
+        * immediately after deactivating the context. So we wait until
+        * the context deactivation returns and then set driver_attached to
+        * FALSE when the netreg status is not registered & not searching
+        */
+       if (status == NETWORK_REGISTRATION_STATUS_NOT_REGISTERED)
+               gprs->driver_attached = FALSE;
+
        gprs->status = status;
        gprs_attached_update(gprs);
 }
-- 
1.6.3.3

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

Reply via email to