[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230103175832.0b2ae9c6@xps-13>
Date: Tue, 3 Jan 2023 17:58:32 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Stefan Schmidt <stefan@...enfreihafen.org>
Cc: Alexander Aring <alex.aring@...il.com>, linux-wpan@...r.kernel.org,
David Girault <david.girault@...vo.com>,
Romuald Despres <romuald.despres@...vo.com>,
Frederic Blain <frederic.blain@...vo.com>,
Nicolas Schodet <nico@...fr.eu.org>,
Guilhem Imberton <guilhem.imberton@...vo.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org
Subject: Re: [PATCH wpan-next v2 3/6] ieee802154: Introduce a helper to
validate a channel
Hi Stefan,
miquel.raynal@...tlin.com wrote on Tue, 3 Jan 2023 15:59:50 +0100:
> Hi Stefan,
>
> stefan@...enfreihafen.org wrote on Tue, 3 Jan 2023 15:14:46 +0100:
>
> > Hello Miquel.
> >
> > On 17.12.22 01:02, Miquel Raynal wrote:
> > > This helper for now only checks if the page member and channel member
> > > are valid (in the specification range) and supported (by checking the
> > > device capabilities). Soon two new parameters will be introduced and
> > > having this helper will let us only modify its content rather than
> > > modifying the logic everywhere else in the subsystem.
> > >
> > > There is not functional change.
> > >
> > > Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> > > ---
> > > include/net/cfg802154.h | 11 +++++++++++
> > > net/ieee802154/nl802154.c | 3 +--
> > > 2 files changed, 12 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
> > > index 76d4f95e9974..11bedfa96371 100644
> > > --- a/include/net/cfg802154.h
> > > +++ b/include/net/cfg802154.h
> > > @@ -246,6 +246,17 @@ static inline void wpan_phy_net_set(struct wpan_phy *wpan_phy, struct net *net)
> > > write_pnet(&wpan_phy->_net, net);
> > > }
> > > > +static inline bool ieee802154_chan_is_valid(struct wpan_phy *phy,
> > > + u8 page, u8 channel)
> > > +{
> > > + if (page > IEEE802154_MAX_PAGE ||
> > > + channel > IEEE802154_MAX_CHANNEL ||
> > > + !(phy->supported.channels[page] & BIT(channel)))
> > > + return false;
> > > +
> > > + return true;
> > > +}
> > > +
> >
> > This patch has some indent problems.
>
> I will check all the patches of this series and fix what checkpatch.pl
> reports.
I left the warnings in the trace.h headers to keep the visual
consistent. The other warnings should be gone.
Thanks,
Miquèl
Powered by blists - more mailing lists