All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix modem doesn't auto register to network issue
@ 2013-09-11 17:33 caiwen.zhang
  2013-09-11 17:43 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: caiwen.zhang @ 2013-09-11 17:33 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

From: Caiwen Zhang <caiwen.zhang@intel.com>

Some modem may return registration status whitch is out of the range
(0-5). it will cause the modem don't auto register to network when
network atom initializes.
---
 src/network.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/network.c b/src/network.c
index d1bfca6..a1e317d 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1481,9 +1481,9 @@ static void init_registration_status(const struct ofono_error *error,
 	}
 
 	if (netreg->mode != NETWORK_REGISTRATION_MODE_MANUAL &&
-		(status == NETWORK_REGISTRATION_STATUS_NOT_REGISTERED ||
-			status == NETWORK_REGISTRATION_STATUS_DENIED ||
-			status == NETWORK_REGISTRATION_STATUS_UNKNOWN)) {
+		(status != NETWORK_REGISTRATION_STATUS_REGISTERED &&
+			status != NETWORK_REGISTRATION_STATUS_SEARCHING &&
+			status != NETWORK_REGISTRATION_STATUS_ROAMING)) {
 		if (netreg->driver->register_auto != NULL)
 			netreg->driver->register_auto(netreg, init_register,
 							netreg);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-12 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 17:33 [PATCH] Fix modem doesn't auto register to network issue caiwen.zhang
2013-09-11 17:43 ` Denis Kenzior
2013-09-12  2:48   ` Zhang, Caiwen
2013-09-12 13:43     ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.