All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 3/5] gemalto: gprs: support automatic context activation
Date: Wed, 23 Dec 2020 19:48:53 -0600	[thread overview]
Message-ID: <63295129-3fac-ea80-6dfe-914816988728@gmail.com> (raw)
In-Reply-To: <X+Ore+aBV4PX7UN+@curiosity>

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

Hi Sergey,

>> Are you sure you don't want to wait until swwan_cb to return success to the
>> core?  AT^SWWAN can still fail...?
> 
> AT^SWWAN command is yet another way to activate a PDP context. AT commands
> spec for this modem is a bit vague about SWWAN details, but according to
> other materials from Gemalto as well as my experiments, this command
> activates internal DHCP server, so DHCP client can be started for modem
> USB ethernet interfaces. Based on my observations, SWWAN command does
> not return until DHCP flow is completed.

Ugh.  I'd 'window.throw(modem)'...

> 
> So the idea is to send SWWAN command to modem and make it possible to
> start DHCP flow right away. I assume that I need both things: mark
> interface for DHCP and signal success to the core. Callback swwan_cb is

So the problem with this is that you've now blocked the app/modem port until 
that DHCP negotiation happens.  Maybe it does, maybe it doesn't.  It is less 
than ideal to depend on some external component; there are frequently situations 
where people would be running without ConnMan for example.

> supposed to handle the case when SWWAN command fails: mark context as
> deactivated and let oFono proceed with further connection attempts.
> 

Another thing to consider is to just run dhcp yourself.  ell has had a DHCPv4 
client for a while now.  So you could just run l_dhcp_client to obtain the 
address and signal it to the core, leaving the app port in a known state...

Or better yet, don't use SWWAN if you can help it...

<snip>

> Sure, I can add a comment. What whould be better: to add a comment in
> driver or to write a more detailed commit message ?

Given how unusual this behavior is, I'd add a comment directly in the code.

Regards,
-Denis

  reply	other threads:[~2020-12-24  1:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 20:01 [PATCH 0/5] gemalto: gprs context driver updates Sergey Matyukevich
2020-12-21 20:01 ` [PATCH 1/5] plugin: gemalto: fix source of gprs notifications Sergey Matyukevich
2020-12-22 16:40   ` Denis Kenzior
2020-12-21 20:01 ` [PATCH 2/5] gemalto: gprs: cgev gprs context deactivation Sergey Matyukevich
2020-12-21 20:01 ` [PATCH 3/5] gemalto: gprs: support automatic context activation Sergey Matyukevich
2020-12-22 16:58   ` Denis Kenzior
2020-12-23 20:41     ` Sergey Matyukevich
2020-12-24  1:48       ` Denis Kenzior [this message]
2020-12-24 20:22         ` Sergey Matyukevich
2020-12-21 20:01 ` [PATCH 4/5] gemalto: gprs: support different gprs protocols Sergey Matyukevich
2020-12-21 20:01 ` [PATCH 5/5] gemalto: gprs: support authentication settings Sergey Matyukevich
2020-12-22 17:01   ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63295129-3fac-ea80-6dfe-914816988728@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.