All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] sim: Fix the quirk handling of CPIN for Wavecom Q2XXX
  2012-10-31 23:30 [PATCH] sim: Fix the quirk handling of CPIN for Wavecom Q2XXX Holger Hans Peter Freyther
@ 2012-10-31 21:16 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2012-10-31 21:16 UTC (permalink / raw)
  To: ofono

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

Hi Holger,

On 10/31/2012 06:30 PM, Holger Hans Peter Freyther wrote:
> From: Holger Hans Peter Freyther<hfreyther@sysmocom.de>
>
> Commit 1ccecfe01eb7f9f4d1d931814deb66ef37840b73 added the quirk
> handling for the Q2XXX module but it missed the first part of
> the Wavecom quirk handling.
>
> If decode_at_error is not fed with OK the error variable will be
> set to an error and the sim_pin_query_cb will exit before doing
> any notifications. This started to happen after git commit
> 72ce19bf3e87b5e73c053f7ea1095a5006f1aea9).
> ---
>   drivers/atmodem/sim.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
> index cf3345c..89445bb 100644
> --- a/drivers/atmodem/sim.c
> +++ b/drivers/atmodem/sim.c
> @@ -980,7 +980,8 @@ static void at_cpin_cb(gboolean ok, GAtResult *result, gpointer user_data)
>   	int len = sizeof(at_sim_name) / sizeof(*at_sim_name);
>   	const char *final = g_at_result_final_response(result);
>
> -	if (sd->vendor == OFONO_VENDOR_WAVECOM&&  ok&&  strlen(final)>  7)
> +	if ((sd->vendor == OFONO_VENDOR_WAVECOM ||
> +			sd->vendor == OFONO_VENDOR_WAVECOM_Q2XXX)&&  ok&&  strlen(final)>  7)

Patch looks good to me, but can you please make sure this line doesn't 
go above 80 characters per our coding guidelines?  See doc/coding-style.txt

>   		decode_at_error(&error, "OK");
>   	else
>   		decode_at_error(&error, final);

Regards,
-Denis

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

* [PATCH] sim: Fix the quirk handling of CPIN for Wavecom Q2XXX
@ 2012-10-31 23:30 Holger Hans Peter Freyther
  2012-10-31 21:16 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Hans Peter Freyther @ 2012-10-31 23:30 UTC (permalink / raw)
  To: ofono

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

From: Holger Hans Peter Freyther <hfreyther@sysmocom.de>

Commit 1ccecfe01eb7f9f4d1d931814deb66ef37840b73 added the quirk
handling for the Q2XXX module but it missed the first part of
the Wavecom quirk handling.

If decode_at_error is not fed with OK the error variable will be
set to an error and the sim_pin_query_cb will exit before doing
any notifications. This started to happen after git commit
72ce19bf3e87b5e73c053f7ea1095a5006f1aea9).
---
 drivers/atmodem/sim.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index cf3345c..89445bb 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -980,7 +980,8 @@ static void at_cpin_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	int len = sizeof(at_sim_name) / sizeof(*at_sim_name);
 	const char *final = g_at_result_final_response(result);
 
-	if (sd->vendor == OFONO_VENDOR_WAVECOM && ok && strlen(final) > 7)
+	if ((sd->vendor == OFONO_VENDOR_WAVECOM ||
+			sd->vendor == OFONO_VENDOR_WAVECOM_Q2XXX) && ok && strlen(final) > 7)
 		decode_at_error(&error, "OK");
 	else
 		decode_at_error(&error, final);
-- 
1.7.10.4


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

end of thread, other threads:[~2012-10-31 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 23:30 [PATCH] sim: Fix the quirk handling of CPIN for Wavecom Q2XXX Holger Hans Peter Freyther
2012-10-31 21:16 ` 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.