diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-09-27 20:12:05 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-11-20 11:41:06 +0100 |
commit | 2e7ed75e92fc493ff5484f61aed6489262c78f3e (patch) | |
tree | 0b38fd6db5e22f1c4564550e18cc6b51c0a58e6f /net/ieee802154/core.c | |
parent | 5260adf86b6732c75136fc1b159bb370062ddfa8 (diff) | |
download | linux-2e7ed75e92fc493ff5484f61aed6489262c78f3e.tar.gz linux-2e7ed75e92fc493ff5484f61aed6489262c78f3e.tar.bz2 linux-2e7ed75e92fc493ff5484f61aed6489262c78f3e.zip |
ieee802154: Internal PAN management
Introduce structures to describe peer devices in a PAN as well as a few
related helpers. We basically care about:
- Our unique parent after associating with a coordinator.
- Peer devices, children, which successfully associated with us.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-3-miquel.raynal@bootlin.com
Diffstat (limited to 'net/ieee802154/core.c')
-rw-r--r-- | net/ieee802154/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c index 57546e07e06a..cd69bdbfd59f 100644 --- a/net/ieee802154/core.c +++ b/net/ieee802154/core.c @@ -276,6 +276,8 @@ static int cfg802154_netdev_notifier_call(struct notifier_block *nb, wpan_dev->identifier = ++rdev->wpan_dev_id; list_add_rcu(&wpan_dev->list, &rdev->wpan_dev_list); rdev->devlist_generation++; + mutex_init(&wpan_dev->association_lock); + INIT_LIST_HEAD(&wpan_dev->children); wpan_dev->netdev = dev; break; |