From: Alexander Aring <aahringo@redhat.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
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>,
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>,
Guilhem Imberton <guilhem.imberton@qorvo.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH wpan-next 1/6] ieee802154: Add support for user scanning requests
Date: Tue, 14 Feb 2023 08:53:57 -0500 [thread overview]
Message-ID: <CAK-6q+jU7-ETKeoM=MLmfyMUqywteBC8sUAndRF1vx0PgA+WAA@mail.gmail.com> (raw)
In-Reply-To: <CAK-6q+hkJpqNG9nO_ugngjGQ_q9VdLu+xDjmD09MT+5=tvd0QA@mail.gmail.com>
Hi,
On Tue, Feb 14, 2023 at 8:34 AM Alexander Aring <aahringo@redhat.com> wrote:
>
> Hi,
>
> On Mon, Feb 13, 2023 at 12:35 PM Miquel Raynal
> <miquel.raynal@bootlin.com> wrote:
> >
> > Hi Alexander,
> >
> > > > > > > +static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
> > > > > > > +{
> > > > > > > + struct cfg802154_registered_device *rdev = info->user_ptr[0];
> > > > > > > + struct net_device *dev = info->user_ptr[1];
> > > > > > > + struct wpan_dev *wpan_dev = dev->ieee802154_ptr;
> > > > > > > + struct wpan_phy *wpan_phy = &rdev->wpan_phy;
> > > > > > > + struct cfg802154_scan_request *request;
> > > > > > > + u8 type;
> > > > > > > + int err;
> > > > > > > +
> > > > > > > + /* Monitors are not allowed to perform scans */
> > > > > > > + if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
> > > > > > > + return -EPERM;
> > > > > >
> > > > > > btw: why are monitors not allowed?
> > > > >
> > > > > I guess I had the "active scan" use case in mind which of course does
> > > > > not work with monitors. Maybe I can relax this a little bit indeed,
> > > > > right now I don't remember why I strongly refused scans on monitors.
> > > >
> > > > Isn't it that scans really work close to phy level? Means in this case
> > > > we disable mostly everything of MAC filtering on the transceiver side.
> > > > Then I don't see any reasons why even monitors can't do anything, they
> > > > also can send something. But they really don't have any specific
> > > > source address set, so long addresses are none for source addresses, I
> > > > don't see any problem here. They also don't have AACK handling, but
> > > > it's not required for scan anyway...
> > > >
> > > > If this gets too complicated right now, then I am also fine with
> > > > returning an error here, we can enable it later but would it be better
> > > > to use ENOTSUPP or something like that in this case? EPERM sounds like
> > > > you can do that, but you don't have the permissions.
> > > >
> > >
> > > For me a scan should also be possible from iwpan phy $PHY scan (or
> > > whatever the scan command is, or just enable beacon)... to go over the
> > > dev is just a shortcut for "I mean whatever the phy is under this dev"
> > > ?
> >
> > Actually only coordinators (in a specific state) should be able to send
> > beacons, so I am kind of against allowing that shortcut, because there
> > are usually two dev interfaces on top of the phy's, a regular "NODE"
> > and a "COORD", so I don't think we should go that way.
> >
> > For scans however it makes sense, I've added the necessary changes in
> > wpan-tools. The TOP_LEVEL(scan) macro however does not support using
> > the same command name twice because it creates a macro, so this one
> > only supports a device name (the interface command has kind of the same
> > situation and uses a HIDDEN() macro which cannot be used here).
> >
>
> Yes, I was thinking about scanning only.
>
> > So in summary here is what is supported:
> > - dev <dev> beacon
> > - dev <dev> scan trigger|abort
> > - phy <phy> scan trigger|abort
> > - dev <dev> scan (the blocking one, which triggers, listens and returns)
> >
> > Do you agree?
> >
>
> Okay, yes. I trust you.
btw: at the point when a scan requires a source address... it cannot
be done because then a scan is related to a MAC instance -> an wpan
interface and we need to bind to it. But I think it doesn't?
- Alex
next prev parent reply other threads:[~2023-02-14 13:56 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 16:00 [PATCH wpan-next 0/6] IEEE 802.15.4 passive scan support Miquel Raynal
2022-11-29 16:00 ` [PATCH wpan-next 1/6] ieee802154: Add support for user scanning requests Miquel Raynal
2022-12-04 22:44 ` Alexander Aring
2022-12-05 9:57 ` Miquel Raynal
2022-12-07 13:27 ` Alexander Aring
2022-12-07 13:44 ` Miquel Raynal
2022-12-08 2:22 ` Alexander Aring
2023-02-04 4:19 ` Jakub Kicinski
2023-02-10 10:18 ` Miquel Raynal
2023-02-10 10:26 ` Stefan Schmidt
2023-02-10 10:35 ` Miquel Raynal
2023-02-10 18:59 ` Jakub Kicinski
2023-02-10 22:47 ` Miquel Raynal
2023-02-06 1:39 ` Alexander Aring
2023-02-06 9:12 ` Miquel Raynal
2023-02-07 0:33 ` Alexander Aring
2023-02-07 12:55 ` Alexander Aring
2023-02-07 12:57 ` Alexander Aring
2023-02-13 17:35 ` Miquel Raynal
2023-02-14 13:34 ` Alexander Aring
2023-02-14 13:53 ` Alexander Aring [this message]
2023-02-14 14:06 ` Miquel Raynal
2023-02-14 14:46 ` Miquel Raynal
2023-02-17 4:37 ` Alexander Aring
2023-02-17 8:49 ` Miquel Raynal
2023-02-17 4:34 ` Alexander Aring
2023-02-17 9:02 ` Miquel Raynal
2023-02-21 2:43 ` Alexander Aring
2023-02-10 17:21 ` Miquel Raynal
2023-02-12 20:15 ` Alexander Aring
2023-02-13 10:15 ` Miquel Raynal
2023-02-14 13:51 ` Alexander Aring
2023-02-14 14:28 ` Miquel Raynal
2023-02-17 4:46 ` Alexander Aring
2023-02-17 8:52 ` Miquel Raynal
2023-02-21 2:54 ` Alexander Aring
2023-02-21 3:05 ` Alexander Aring
2023-02-24 13:57 ` Miquel Raynal
2022-11-29 16:00 ` [PATCH wpan-next 2/6] ieee802154: Define a beacon frame header Miquel Raynal
2022-11-29 16:00 ` [PATCH wpan-next 3/6] ieee802154: Introduce a helper to validate a channel Miquel Raynal
2022-11-29 16:00 ` [PATCH wpan-next 4/6] mac802154: Prepare forcing specific symbol duration Miquel Raynal
2022-11-29 16:00 ` [PATCH wpan-next 5/6] mac802154: Add MLME Tx locked helpers Miquel Raynal
2022-11-29 16:00 ` [PATCH wpan-next 6/6] mac802154: Handle passive scanning 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='CAK-6q+jU7-ETKeoM=MLmfyMUqywteBC8sUAndRF1vx0PgA+WAA@mail.gmail.com' \
--to=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=guilhem.imberton@qorvo.com \
--cc=kuba@kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--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;
as well as URLs for NNTP newsgroup(s).