All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v3 2/2] udevng: add Telit LE910 V1 support
Date: Fri, 24 Mar 2017 10:16:22 -0500	[thread overview]
Message-ID: <34b3eb93-0d5a-86dd-b319-b72317588e39@gmail.com> (raw)
In-Reply-To: <1490367106-8401-3-git-send-email-lnowak.tyco@gmail.com>

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

Hi Lukasz,

On 03/24/2017 09:51 AM, Lukasz Nowak wrote:
> From: Lukasz Nowak <lnowak@tycoint.com>
>
> Tested with LE910-SVG and Verizon.
> ---
>  plugins/udevng.c | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/plugins/udevng.c b/plugins/udevng.c
> index 2279bbe..3b15064 100644
> --- a/plugins/udevng.c
> +++ b/plugins/udevng.c
> @@ -182,14 +182,15 @@ static gboolean setup_gobi(struct modem_info *modem)
>  	const char *qmi = NULL, *mdm = NULL, *net = NULL;
>  	const char *gps = NULL, *diag = NULL;
>  	GSList *list;
> +	gboolean telit = FALSE;
>
>  	DBG("%s", modem->syspath);
>
>  	for (list = modem->devices; list; list = list->next) {
>  		struct device_info *info = list->data;
>
> -		DBG("%s %s %s %s", info->devnode, info->interface,
> -						info->number, info->label);
> +		DBG("%s %s %s %s %s", info->devnode, info->interface,
> +					info->number, info->label, info->subsystem);
>
>  		if (g_strcmp0(info->interface, "255/255/255") == 0) {
>  			if (info->number == NULL)
> @@ -199,10 +200,18 @@ static gboolean setup_gobi(struct modem_info *modem)
>  			else if (g_strcmp0(info->number, "01") == 0)
>  				diag = info->devnode;
>  			else if (g_strcmp0(info->number, "02") == 0)
> -				mdm = info->devnode;
> +				if (g_strcmp0(info->subsystem, "net") == 0)
> +					net = info->devnode;
> +				else if (g_strcmp0(info->subsystem, "usbmisc") == 0) {

just a small nit:  this line is over 80 characters

> +					telit = TRUE;

Would it be safer to set this value based on usb major/minor number instead?

> +					qmi = info->devnode;
> +				} else
> +					mdm = info->devnode;
>  			else if (g_strcmp0(info->number, "03") == 0)
>  				gps = info->devnode;
> -		}
> +		} else if (g_strcmp0(info->interface, "255/0/0") == 0)
> +			if (g_strcmp0(info->number, "04") == 0)
> +				mdm = info->devnode;
>  	}
>
>  	if (qmi == NULL || mdm == NULL || net == NULL)
> @@ -215,6 +224,12 @@ static gboolean setup_gobi(struct modem_info *modem)
>  	ofono_modem_set_string(modem->modem, "Diag", diag);
>  	ofono_modem_set_string(modem->modem, "NetworkInterface", net);
>
> +	if (telit) {
> +		/* Telit LE910 V1 modems */
> +		ofono_modem_set_boolean(modem->modem, "ForceSimLegacy", TRUE);
> +		ofono_modem_set_boolean(modem->modem, "AlwaysOnline", TRUE);
> +	}
> +
>  	return TRUE;
>  }
>
> @@ -1168,6 +1183,7 @@ static struct {
>  	{ "mbm",	"cdc_ether",	"0930"		},
>  	{ "mbm",	"cdc_ncm",	"0930"		},
>  	{ "hso",	"hso"				},
> +	{ "gobi",	"option",	"1bc7", "1201"	},
>  	{ "gobi",	"qmi_wwan"			},
>  	{ "gobi",	"qcserial"			},
>  	{ "sierra",	"qmi_wwan",	"1199"		},
>

Regards,
-Denis

  reply	other threads:[~2017-03-24 15:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 14:51 [PATCH v3 0/2] Telit LE910 V1 QMI support Lukasz Nowak
2017-03-24 14:51 ` [PATCH v3 1/2] gobi: Do not use low-power modes for some modems Lukasz Nowak
2017-03-24 15:08   ` Denis Kenzior
2017-03-24 14:51 ` [PATCH v3 2/2] udevng: add Telit LE910 V1 support Lukasz Nowak
2017-03-24 15:16   ` Denis Kenzior [this message]
2017-03-24 15:56   ` Jonas Bonn
2017-03-24 23:07     ` Lukasz Nowak
2017-03-25 11:15       ` Lukasz Nowak
2017-03-25 20:59     ` Denis Kenzior
2017-03-24 15:11 ` [PATCH v3 0/2] Telit LE910 V1 QMI support 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=34b3eb93-0d5a-86dd-b319-b72317588e39@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.