From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <aahringo@redhat.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan - ML <linux-wpan@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Network Development <netdev@vger.kernel.org>,
David Girault <david.girault@qorvo.com>,
Romuald Despres <romuald.despres@qorvo.com>,
Frederic Blain <frederic.blain@qorvo.com>,
Nicolas Schodet <nico@ni.fr.eu.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH wpan-next v2 1/6] net: ieee802154: Create a device type
Date: Mon, 20 Jun 2022 11:26:44 +0200 [thread overview]
Message-ID: <20220620112527.48c7ba54@xps-13> (raw)
In-Reply-To: <CAK-6q+g7pd14Bhng9r210kROttwtqQkF1JgAF283B9MPc22g3g@mail.gmail.com>
Hi Alex,
aahringo@redhat.com wrote on Sun, 19 Jun 2022 20:18:43 -0400:
> Hi,
>
> On Fri, Jun 17, 2022 at 3:35 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > A device can be either a fully functioning device or a kind of reduced
> > functioning device. Let's create a device type member. Drivers will be
> > in charge of setting this value if they handle non-FFD devices.
> >
> > FFD are considered the default.
> >
> > Provide this information in the interface get netlink command.
> >
> > Create a helper just to check if a rdev is a FFD or not, which will
> > then be useful when bringing scan support.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > include/net/nl802154.h | 9 +++++++++
> > net/ieee802154/core.h | 8 ++++++++
> > net/ieee802154/nl802154.c | 6 +++++-
> > 3 files changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/net/nl802154.h b/include/net/nl802154.h
> > index 145acb8f2509..5258785879e8 100644
> > --- a/include/net/nl802154.h
> > +++ b/include/net/nl802154.h
> > @@ -133,6 +133,8 @@ enum nl802154_attrs {
> > NL802154_ATTR_PID,
> > NL802154_ATTR_NETNS_FD,
> >
> > + NL802154_ATTR_DEV_TYPE,
> > +
> > /* add attributes here, update the policy in nl802154.c */
> >
> > #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
> > @@ -163,6 +165,13 @@ enum nl802154_iftype {
> > NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1
> > };
> >
> > +enum nl802154_dev_type {
> > + NL802154_DEV_TYPE_FFD = 0,
> > + NL802154_DEV_TYPE_RFD,
> > + NL802154_DEV_TYPE_RFD_RX,
> > + NL802154_DEV_TYPE_RFD_TX,
> > +};
>
> As I said in another mail, I think this is a "transceiver capability"
Maybe I can rename it to PHY_TYPE if you prefer.
> why it is required that a user sets a transceiver capability. It means
> that you can actually buy hardware which is either one of those
> capabilities, one reason why D in those acronyms stands for "Device".
The user is not supposed to set this field, but it can get this field.
This is what this enumeration is intended for.
> In SoftMac you probably find only FFD but out there you would probably
> find hardware which cannot run as e.g. coordinator and is a RFD.
My main concern was initially to be sure that we would not try to
perform any unsupported MLME commands on these devices. But as you said
in another mail, it is highly unlikely that we will ever have to support
true RFD devices in Linux, so I can just drop this parameter.
Thanks,
Miquèl
next prev parent reply other threads:[~2022-06-20 9:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 19:32 [PATCH wpan-next v2 0/6] net: ieee802154: PAN management Miquel Raynal
2022-06-17 19:32 ` [PATCH wpan-next v2 1/6] net: ieee802154: Create a device type Miquel Raynal
2022-06-20 0:18 ` Alexander Aring
2022-06-20 9:26 ` Miquel Raynal [this message]
2022-06-21 2:00 ` Alexander Aring
2022-06-17 19:32 ` [PATCH wpan-next v2 2/6] net: ieee802154: Ensure only FFDs can become PAN coordinators Miquel Raynal
2022-06-20 0:24 ` Alexander Aring
2022-06-20 0:25 ` Alexander Aring
2022-06-20 9:28 ` Miquel Raynal
2022-06-21 2:03 ` Alexander Aring
2022-06-21 6:31 ` Miquel Raynal
2022-06-17 19:32 ` [PATCH wpan-next v2 3/6] net: mac802154: Allow the creation of PAN coordinator interfaces Miquel Raynal
2022-06-17 19:32 ` [PATCH wpan-next v2 4/6] net: ieee802154: Add support for inter PAN management Miquel Raynal
2022-06-17 19:32 ` [PATCH wpan-next v2 5/6] net: ieee802154: Give the user to the PAN information Miquel Raynal
2022-06-17 19:32 ` [PATCH wpan-next v2 6/6] net: ieee802154: Trace the registration of new PANs Miquel Raynal
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=20220620112527.48c7ba54@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=aahringo@redhat.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=david.girault@qorvo.com \
--cc=edumazet@google.com \
--cc=frederic.blain@qorvo.com \
--cc=kuba@kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nico@ni.fr.eu.org \
--cc=pabeni@redhat.com \
--cc=romuald.despres@qorvo.com \
--cc=stefan@datenfreihafen.org \
--cc=thomas.petazzoni@bootlin.com \
/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