summaryrefslogtreecommitdiff
path: root/net/ieee802154/core.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-09-27 20:12:11 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-11-20 11:43:11 +0100
commitce93b9378c306e6bcc4e0bd817acf4195b4a0288 (patch)
tree4c7f07c23df129cb6de67409cdb49a9ba4f346b9 /net/ieee802154/core.c
parent601f160b61b2152ef84a663f856350d5dd9e752a (diff)
ieee802154: Add support for limiting the number of associated devices
Coordinators may refuse associations. We need a user input for that. Let's add a new netlink command which can provide a maximum number of devices we accept to associate with as a first step. Later, we could also forward the request to userspace and check whether the association should be accepted or not. 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-9-miquel.raynal@bootlin.com
Diffstat (limited to 'net/ieee802154/core.c')
-rw-r--r--net/ieee802154/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index 1670a71327a7..2d6fe45efa05 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -295,6 +295,7 @@ static int cfg802154_netdev_notifier_call(struct notifier_block *nb,
rdev->devlist_generation++;
mutex_init(&wpan_dev->association_lock);
INIT_LIST_HEAD(&wpan_dev->children);
+ wpan_dev->max_associations = SZ_16K;
wpan_dev->netdev = dev;
break;