From: Sergey Matyukevich <geomatsi@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 3/3] gemalto: netmon measurements scaling
Date: Fri, 15 Jan 2021 22:11:37 +0300 [thread overview]
Message-ID: <YAHo6esXmIRoaTC9@curiosity> (raw)
In-Reply-To: <9407799e-a301-9058-f787-ebd6dcf37d36@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
Hello Denis,
> > Gemalto modem reports raw measurements in dBm. Reported values may
> > include negative numbers. Meanwhile oFono follows ETSI TS 27.007,
> > so negative numbers do not really exist at the API level.
> >
> > Modify gemalto netmon driver to report measurements according to
> > 27.007. For this purpose re-scale from what Gemalto firmware
> > reports into something that 27.007 recommends.
> > ---
> > drivers/gemaltomodem/netmon.c | 52 ++++++++++++++++++++++++++++++++---
> > 1 file changed, 48 insertions(+), 4 deletions(-)
> >
>
> I went ahead and applied all three patches after making minor tweaks in this one:
Thanks!
> > +static int gemalto_rscp_scale(int value)
> > +{
> > + if (value < -120)
> > + return 0;
> > +
> > + if (value > -24)
> > + return 96;
> > +
> > + return (value + 120);
>
> The ()s weren't needed here..
Well, I did check coding style document for arithmetic expressions,
but I did not find anything other than spaces around operators.
So I made a wrong guess...
Regards,
Sergey
prev parent reply other threads:[~2021-01-15 19:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 16:25 [PATCH v2 0/3] gemalto: netmon driver Sergey Matyukevich
2021-01-15 16:25 ` [PATCH v2 1/3] gemalto: add " Sergey Matyukevich
2021-01-15 16:25 ` [PATCH v2 2/3] plugin: gemalto: enable netmon Sergey Matyukevich
2021-01-15 16:25 ` [PATCH v2 3/3] gemalto: netmon measurements scaling Sergey Matyukevich
2021-01-15 17:46 ` Denis Kenzior
2021-01-15 19:11 ` Sergey Matyukevich [this message]
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=YAHo6esXmIRoaTC9@curiosity \
--to=geomatsi@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.