Re: [PATCH 1/1] gprs: fix error check of gprs_cid_alloc function

2017-02-15 Thread Denis Kenzior
Hi Christophe, On 02/15/2017 10:54 AM, Christophe Ronco wrote: When there is no context id available, idmap_alloc and gprs_cid_alloc return max + 1. --- src/gprs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. Regards, -Denis

Re: [PATCH] atmodem: use ATD99 to enter data state when needed

2017-02-15 Thread Denis Kenzior
Hi Christophe, On 02/15/2017 10:38 AM, Christophe Ronco wrote: Some modems do not support AT+CGDATA="PPP",X to enter data state. Use AT+CGDATA=? to detect these modems and for them use ATD*99***X# to enter data state. --- drivers/atmodem/gprs-context.c | 44

[PATCH 0/1] gprs: fix error check of gprs_cid_alloc function

2017-02-15 Thread Christophe Ronco
On huawei E3372, context id can be 0: AT+CGDCONT=? +CGDCONT: (0-31),"IP",,,(0-2),(0-3),(0,1),(0,1),(0-2),(0,1) +CGDCONT: (0-31),"IPV6",,,(0-2),(0-3),(0,1),(0,1),(0-2),(0,1) +CGDCONT: (0-31),"IPV4V6",,,(0-2),(0-3),(0,1),(0,1),(0-2),(0,1) +CGDCONT: (0-31),"PPP",,,(0-2),(0-3),(0,1),(0,1),(0-2),(0,1)

[PATCH 1/1] gprs: fix error check of gprs_cid_alloc function

2017-02-15 Thread Christophe Ronco
When there is no context id available, idmap_alloc and gprs_cid_alloc return max + 1. --- src/gprs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gprs.c b/src/gprs.c index 5015a2fc..6ed1c89d 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -313,7 +313,7 @@ static gboolean

[PATCH 0/1] Use ATD*99 to enter data state when needed

2017-02-15 Thread Christophe Ronco
Here is my patch proposal. I have a warning using checkpatch.pl: WARNING: static const char * array should probably be static const char * const #21: FILE: drivers/atmodem/gprs-context.c:50: +static const char *cgdata_prefix[] = { "+CGDATA:", NULL }; I have copied what is in src/gprs.c. Let me

[PATCH] atmodem: use ATD99 to enter data state when needed

2017-02-15 Thread Christophe Ronco
Some modems do not support AT+CGDATA="PPP",X to enter data state. Use AT+CGDATA=? to detect these modems and for them use ATD*99***X# to enter data state. --- drivers/atmodem/gprs-context.c | 44 +- 1 file changed, 43 insertions(+), 1 deletion(-) diff