From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan@vger.kernel.org
Cc: "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>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH wpan-next v2 00/11] ieee802154: Associations between devices
Date: Fri, 1 Sep 2023 19:04:50 +0200 [thread overview]
Message-ID: <20230901170501.1066321-1-miquel.raynal@bootlin.com> (raw)
Hello,
[I know we are in the middle of the merge window, I don't think it
matters on the wpan side, so as the wpan subsystem did not evolve
much since the previous merge window I figured I would not delay the
sending of this series given the fact that I should have send it at the
beginning of the summer...]
Now that we can discover our peer coordinators or make ourselves
dynamically discoverable, we may use the information about surrounding
devices to create PANs dynamically. This involves of course:
* Requesting an association to a coordinator, waiting for the response
* Sending a disassociation notification to a coordinator
* Receiving an association request when we are coordinator, answering
the request (for now all devices are accepted up to a limit, to be
refined)
* Sending a disassociation notification to a child
* Users may request the list of associated devices (the parent and the
children).
Here are a few example of userspace calls that can be made:
iwpan dev <dev> associate pan_id 2 coord $COORD
iwpan dev <dev> list_associations
iwpan dev <dev> disassociate ext_addr $COORD
I used a small using hwsim to scan for a coordinator, associate with
it, look at the associations on both sides, disassociate from it and
check the associations again:
./assoc-demo
*** Scan ***
PAN 0x0002 (on wpan1)
coordinator 0x060f3b35169a498f
page 0
channel 13
preamble code 0
mean prf 0
superframe spec. 0xcf11
LQI ff
*** End of scan ***
Associating wpan1 with coord0 0x060f3b35169a498f...
Dumping coord0 assoc:
child : 0x0b6f / 0xba7633ae47ccfb21
Dumping wpan1 assoc:
parent: 0xffff / 0x060f3b35169a498f
Disassociating from wpan1
Dumping coord0 assoc:
Dumping wpan1 assoc:
I could also successfully interact with a smaller device running Zephir,
using its command line interface to associate and then disassociate from
the Linux coordinator.
Thanks!
Miquèl
Changes in v2:
* Drop the misleading IEEE802154_ADDR_LONG_BROADCAST definition and its
only use which was useless anyway.
* Clarified how devices are defined when the user requests to associate
with a coordinator: for now only the extended address of the
coordinator is relevant so this is the only address we care about.
* Drop a useless NULL check before a kfree() call.
* Add a check when allocating a child short address: it must be
different than ours.
* Rebased on top of v6.5.
Miquel Raynal (11):
ieee802154: Let PAN IDs be reset
ieee802154: Internal PAN management
ieee802154: Add support for user association requests
mac802154: Handle associating
ieee802154: Add support for user disassociation requests
mac802154: Handle disassociations
mac802154: Handle association requests from peers
ieee802154: Add support for limiting the number of associated devices
mac802154: Follow the number of associated devices
mac802154: Handle disassociation notifications from peers
ieee802154: Give the user the association list
include/net/cfg802154.h | 70 ++++++
include/net/ieee802154_netdev.h | 60 +++++
include/net/nl802154.h | 22 +-
net/ieee802154/Makefile | 2 +-
net/ieee802154/core.c | 25 ++
net/ieee802154/nl802154.c | 229 +++++++++++++++++-
net/ieee802154/pan.c | 106 +++++++++
net/ieee802154/rdev-ops.h | 30 +++
net/ieee802154/trace.h | 38 +++
net/mac802154/cfg.c | 173 ++++++++++++++
net/mac802154/ieee802154_i.h | 27 +++
net/mac802154/main.c | 2 +
net/mac802154/rx.c | 25 ++
net/mac802154/scan.c | 400 ++++++++++++++++++++++++++++++++
14 files changed, 1196 insertions(+), 13 deletions(-)
create mode 100644 net/ieee802154/pan.c
--
2.34.1
next reply other threads:[~2023-09-01 17:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 17:04 Miquel Raynal [this message]
2023-09-01 17:04 ` [PATCH wpan-next v2 01/11] ieee802154: Let PAN IDs be reset Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 02/11] ieee802154: Internal PAN management Miquel Raynal
2023-09-16 15:36 ` Stefan Schmidt
2023-09-17 11:50 ` Alexander Aring
2023-09-18 9:01 ` Miquel Raynal
2023-09-18 11:11 ` Alexander Aring
2023-09-18 14:15 ` Miquel Raynal
2023-09-18 23:01 ` Alexander Aring
2023-09-19 7:14 ` Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 03/11] ieee802154: Add support for user association requests Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 04/11] mac802154: Handle associating Miquel Raynal
2023-09-16 15:36 ` Stefan Schmidt
2023-09-01 17:04 ` [PATCH wpan-next v2 05/11] ieee802154: Add support for user disassociation requests Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 06/11] mac802154: Handle disassociations Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 07/11] mac802154: Handle association requests from peers Miquel Raynal
2023-09-16 15:36 ` Stefan Schmidt
2023-09-18 7:36 ` Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 08/11] ieee802154: Add support for limiting the number of associated devices Miquel Raynal
2023-09-01 17:04 ` [PATCH wpan-next v2 09/11] mac802154: Follow " Miquel Raynal
2023-09-01 17:05 ` [PATCH wpan-next v2 10/11] mac802154: Handle disassociation notifications from peers Miquel Raynal
2023-09-01 17:05 ` [PATCH wpan-next v2 11/11] ieee802154: Give the user the association list Miquel Raynal
2023-09-16 15:36 ` Stefan Schmidt
2023-09-18 7:08 ` Miquel Raynal
2023-09-18 15:41 ` Stefan Schmidt
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=20230901170501.1066321-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.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=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).