ofono.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 1/2] gemalto: add netmon driver
Date: Mon, 11 Jan 2021 13:28:58 -0600	[thread overview]
Message-ID: <2b75d01b-123c-65d4-cdbd-01131ed8de9e@gmail.com> (raw)
In-Reply-To: <20210110194405.1994055-2-geomatsi@gmail.com>

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

Hi Sergey,

On 1/10/21 1:44 PM, Sergey Matyukevich wrote:
> Implement network monitoring driver for gemalto modems that
> are able to provide serving cell information and basic
> measurements using AT+CQS and AT^SMONI commands.
> ---
>   Makefile.am                         |   3 +-
>   drivers/gemaltomodem/gemaltomodem.c |   2 +
>   drivers/gemaltomodem/gemaltomodem.h |   3 +
>   drivers/gemaltomodem/netmon.c       | 609 ++++++++++++++++++++++++++++
>   4 files changed, 616 insertions(+), 1 deletion(-)
>   create mode 100644 drivers/gemaltomodem/netmon.c
> 

<snip>

> +static int gemalto_netmon_probe(struct ofono_netmon *netmon,
> +					unsigned int vendor, void *user)
> +{
> +	GAtChat *chat = user;
> +	struct netmon_driver_data *nmd;
> +
> +	DBG("gemalto netmon probe");
> +
> +	nmd = g_try_new0(struct netmon_driver_data, 1);
> +	if (nmd == NULL)
> +		return -ENOMEM;

Feel free to use g_new0.  We have given up using g_try_new0 since these errors 
don't really occur on Linux.

> +
> +	nmd->chat = g_at_chat_clone(chat);
> +
> +	ofono_netmon_set_data(netmon, nmd);
> +
> +	g_idle_add(gemalto_delayed_register, netmon);
> +
> +	return 0;
> +}

Other than this, LGTM.

Regards,
-Denis

  reply	other threads:[~2021-01-11 19:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 19:44 [RFC PATCH 0/2] gemalto: netmon driver Sergey Matyukevich
2021-01-10 19:44 ` [RFC PATCH 1/2] gemalto: add " Sergey Matyukevich
2021-01-11 19:28   ` Denis Kenzior [this message]
2021-01-10 19:44 ` [RFC PATCH 2/2] plugin: gemalto: enable netmon Sergey Matyukevich
2021-01-11 19:56 ` [RFC PATCH 0/2] gemalto: netmon driver Denis Kenzior
2021-01-11 21:08   ` Sergey Matyukevich

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=2b75d01b-123c-65d4-cdbd-01131ed8de9e@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 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).