All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sms: fix send sms in case of lte registration
@ 2018-09-11  3:52 Anirudh Gargi
  2018-09-20 15:05 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Anirudh Gargi @ 2018-09-11  3:52 UTC (permalink / raw)
  To: ofono

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

CREG status 6 and 7 added in network registration status, sms atom
to consider new states also.
---
 src/common.h | 14 ++++++++------
 src/sms.c    |  2 ++
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/common.h b/src/common.h
index 1b6b01d..b826228 100644
--- a/src/common.h
+++ b/src/common.h
@@ -37,12 +37,14 @@ enum access_technology {
 
 /* 27.007 Section 7.2 <stat> */
 enum network_registration_status {
-	NETWORK_REGISTRATION_STATUS_NOT_REGISTERED =	0,
-	NETWORK_REGISTRATION_STATUS_REGISTERED =	1,
-	NETWORK_REGISTRATION_STATUS_SEARCHING =		2,
-	NETWORK_REGISTRATION_STATUS_DENIED =		3,
-	NETWORK_REGISTRATION_STATUS_UNKNOWN =		4,
-	NETWORK_REGISTRATION_STATUS_ROAMING =		5,
+	NETWORK_REGISTRATION_STATUS_NOT_REGISTERED =		0,
+	NETWORK_REGISTRATION_STATUS_REGISTERED =		1,
+	NETWORK_REGISTRATION_STATUS_SEARCHING =			2,
+	NETWORK_REGISTRATION_STATUS_DENIED =			3,
+	NETWORK_REGISTRATION_STATUS_UNKNOWN =			4,
+	NETWORK_REGISTRATION_STATUS_ROAMING =			5,
+	NETWORK_REGISTRATION_STATUS_REGISTERED_SMS_EUTRAN =	6,
+	NETWORK_REGISTRATION_STATUS_ROAMING_SMS_EUTRAN = 	7,
 };
 
 /* 27.007 Section 7.3 <stat> */
diff --git a/src/sms.c b/src/sms.c
index b86158e..c604e05 100644
--- a/src/sms.c
+++ b/src/sms.c
@@ -782,6 +782,8 @@ static void netreg_status_watch(int status, int lac, int ci, int tech,
 	switch (status) {
 	case NETWORK_REGISTRATION_STATUS_REGISTERED:
 	case NETWORK_REGISTRATION_STATUS_ROAMING:
+	case NETWORK_REGISTRATION_STATUS_REGISTERED_SMS_EUTRAN:
+	case NETWORK_REGISTRATION_STATUS_ROAMING_SMS_EUTRAN:
 		sms->registered = TRUE;
 		break;
 	default:
-- 
2.7.4


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

* Re: [PATCH] sms: fix send sms in case of lte registration
  2018-09-11  3:52 [PATCH] sms: fix send sms in case of lte registration Anirudh Gargi
@ 2018-09-20 15:05 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2018-09-20 15:05 UTC (permalink / raw)
  To: ofono

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

Hi Anirudh,

On 09/10/2018 10:52 PM, Anirudh Gargi wrote:
> CREG status 6 and 7 added in network registration status, sms atom
> to consider new states also.
> ---
>   src/common.h | 14 ++++++++------
>   src/sms.c    |  2 ++
>   2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/src/common.h b/src/common.h
> index 1b6b01d..b826228 100644
> --- a/src/common.h
> +++ b/src/common.h
> @@ -37,12 +37,14 @@ enum access_technology {
>   
>   /* 27.007 Section 7.2 <stat> */
>   enum network_registration_status {
> -	NETWORK_REGISTRATION_STATUS_NOT_REGISTERED =	0,
> -	NETWORK_REGISTRATION_STATUS_REGISTERED =	1,
> -	NETWORK_REGISTRATION_STATUS_SEARCHING =		2,
> -	NETWORK_REGISTRATION_STATUS_DENIED =		3,
> -	NETWORK_REGISTRATION_STATUS_UNKNOWN =		4,
> -	NETWORK_REGISTRATION_STATUS_ROAMING =		5,
> +	NETWORK_REGISTRATION_STATUS_NOT_REGISTERED =		0,
> +	NETWORK_REGISTRATION_STATUS_REGISTERED =		1,
> +	NETWORK_REGISTRATION_STATUS_SEARCHING =			2,
> +	NETWORK_REGISTRATION_STATUS_DENIED =			3,
> +	NETWORK_REGISTRATION_STATUS_UNKNOWN =			4,
> +	NETWORK_REGISTRATION_STATUS_ROAMING =			5,
> +	NETWORK_REGISTRATION_STATUS_REGISTERED_SMS_EUTRAN =	6,
> +	NETWORK_REGISTRATION_STATUS_ROAMING_SMS_EUTRAN = 	7,
>   };
>   
>   /* 27.007 Section 7.3 <stat> */
> diff --git a/src/sms.c b/src/sms.c
> index b86158e..c604e05 100644
> --- a/src/sms.c
> +++ b/src/sms.c
> @@ -782,6 +782,8 @@ static void netreg_status_watch(int status, int lac, int ci, int tech,
>   	switch (status) {
>   	case NETWORK_REGISTRATION_STATUS_REGISTERED:
>   	case NETWORK_REGISTRATION_STATUS_ROAMING:
> +	case NETWORK_REGISTRATION_STATUS_REGISTERED_SMS_EUTRAN:
> +	case NETWORK_REGISTRATION_STATUS_ROAMING_SMS_EUTRAN:
>   		sms->registered = TRUE;
>   		break;
>   	default:
> 

So while this patch is fine, don't we have a bunch of places that use 
network registration status that need to be updated as well?  I mean 
even registration_status_to_string should be updated...

So I'd like some patches that address these issues before I can take 
this one.

Regards,
-Denis

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

end of thread, other threads:[~2018-09-20 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11  3:52 [PATCH] sms: fix send sms in case of lte registration Anirudh Gargi
2018-09-20 15:05 ` 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.