diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-09-27 21:12:11 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-11-20 13:43:11 +0300 |
commit | ce93b9378c306e6bcc4e0bd817acf4195b4a0288 (patch) | |
tree | 4c7f07c23df129cb6de67409cdb49a9ba4f346b9 /net/ieee802154/pan.c | |
parent | 601f160b61b2152ef84a663f856350d5dd9e752a (diff) | |
download | linux-ce93b9378c306e6bcc4e0bd817acf4195b4a0288.tar.xz |
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/pan.c')
-rw-r--r-- | net/ieee802154/pan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ieee802154/pan.c b/net/ieee802154/pan.c index 545461069197..fb5b0af2ef68 100644 --- a/net/ieee802154/pan.c +++ b/net/ieee802154/pan.c @@ -93,3 +93,11 @@ __le16 cfg802154_get_free_short_addr(struct wpan_dev *wpan_dev) return addr; } EXPORT_SYMBOL_GPL(cfg802154_get_free_short_addr); + +void cfg802154_set_max_associations(struct wpan_dev *wpan_dev, unsigned int max) +{ + lockdep_assert_held(&wpan_dev->association_lock); + + wpan_dev->max_associations = max; +} +EXPORT_SYMBOL_GPL(cfg802154_set_max_associations); |