summaryrefslogtreecommitdiff
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-11-28 14:16:55 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-12-15 13:14:57 +0300
commit2373699560a754079579b7722b50d1d38de1960e (patch)
tree96f7a25ef1181e69e15f135587aa71440f0945f2 /include/net/cfg802154.h
parentb720383ab1cfd584c8c0d9fc7b8cc541ed76dba5 (diff)
downloadlinux-2373699560a754079579b7722b50d1d38de1960e.tar.xz
mac802154: Avoid new associations while disassociating
While disassociating from a PAN ourselves, let's set the maximum number of associations temporarily to zero to be sure no new device tries to associate 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/20231128111655.507479-6-miquel.raynal@bootlin.com
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index a64bbcd71f10..cd95711b12b8 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -589,8 +589,10 @@ cfg802154_device_is_child(struct wpan_dev *wpan_dev,
* cfg802154_set_max_associations - Limit the number of future associations
* @wpan_dev: the wpan device
* @max: the maximum number of devices we accept to associate
+ * @return: the old maximum value
*/
-void cfg802154_set_max_associations(struct wpan_dev *wpan_dev, unsigned int max);
+unsigned int cfg802154_set_max_associations(struct wpan_dev *wpan_dev,
+ unsigned int max);
/**
* cfg802154_get_free_short_addr - Get a free address among the known devices