ofono.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@norrbonn.se>
To: ofono@ofono.org
Subject: Re: [PATCH v5 4/4] Detect SARA R4 QMI device
Date: Wed, 12 May 2021 11:27:55 +0200	[thread overview]
Message-ID: <3c640684-a7c7-6ece-1543-02d1dad1b9d2@norrbonn.se> (raw)
In-Reply-To: <20210512074053.6718-5-jupiter.hce@gmail.com>

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

Hi Denis,

This patch is fine, with one little fix below.

Patch message:

All QMI devices are currently piggy-backing on the 'gobi' driver to set 
up the QMI atoms.  For the SARA R4, this works with the addition of a quirk.

This patch adds the handling of a SARA R4 quirk to the 'gobi' driver.

On 12/05/2021 09:40, Bing Jupiter wrote:
> ---
>   plugins/gobi.c | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/plugins/gobi.c b/plugins/gobi.c
> index 9b5d7cff..5472dd83 100644
> --- a/plugins/gobi.c
> +++ b/plugins/gobi.c
> @@ -47,6 +47,7 @@
>   #include <ofono/location-reporting.h>
>   #include <ofono/log.h>
>   #include <ofono/message-waiting.h>
> +#include <drivers/atmodem/vendor.h>
>   
>   #include <drivers/qmimodem/qmi.h>
>   #include <drivers/qmimodem/dms.h>
> @@ -496,9 +497,17 @@ static void gobi_post_online(struct ofono_modem *modem)
>   	struct gobi_data *data = ofono_modem_get_data(modem);
>   	struct ofono_gprs *gprs;
>   	struct ofono_gprs_context *gc;
> +    const char* quirk;
> +    unsigned int vendor = 0;
>   
>   	DBG("%p", modem);
>   
> +    quirk = ofono_modem_get_string(modem, "Quirk");
> +    if (quirk) {

Probably should have done:

if (quirk && !strcmp(quirk, "SARAR4")) {

/Jonas


> +	    DBG("Debug: vendor = OFONO_VENDOR_UBLOX_SARA_R4");
> +        vendor = OFONO_VENDOR_UBLOX_SARA_R4;
> +    }
> +
>   	if (data->features & GOBI_NAS) {
>   		ofono_netreg_create(modem, 0, "qmimodem", data->device);
>   		ofono_netmon_create(modem, 0, "qmimodem", data->device);
> @@ -508,7 +517,7 @@ static void gobi_post_online(struct ofono_modem *modem)
>   		ofono_ussd_create(modem, 0, "qmimodem", data->device);
>   
>   	if (data->features & GOBI_WDS) {
> -		gprs = ofono_gprs_create(modem, 0, "qmimodem", data->device);
> +		gprs = ofono_gprs_create(modem, vendor, "qmimodem", data->device);
>   		gc = ofono_gprs_context_create(modem, 0, "qmimodem",
>   							data->device);
>   
> 

  reply	other threads:[~2021-05-12  9:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12  7:40 [PATCH v5 0/4] Bing Jupiter
2021-05-12  7:40 ` [PATCH v5 1/4] Detect SARA R4 QMI device Bing Jupiter
2021-05-12  7:55   ` Christophe Ronco
2021-05-12  9:17   ` Jonas Bonn
2021-05-12  7:40 ` [PATCH v5 2/4] " Bing Jupiter
2021-05-12  9:18   ` Jonas Bonn
2021-05-12  7:40 ` [PATCH v5 3/4] " Bing Jupiter
2021-05-12  9:23   ` Jonas Bonn
2021-05-12  7:40 ` [PATCH v5 4/4] " Bing Jupiter
2021-05-12  9:27   ` Jonas Bonn [this message]
2021-08-19  5:56     ` Jupiter
2021-05-12  9:17 ` [PATCH v5 0/4] Jonas Bonn
2021-05-14 17:00   ` 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=3c640684-a7c7-6ece-1543-02d1dad1b9d2@norrbonn.se \
    --to=jonas@norrbonn.se \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).