summaryrefslogtreecommitdiffstats
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-09-27 20:12:12 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-11-20 11:43:19 +0100
commit80f8bf9a2a7f603662e08f7663643a58087a2cd4 (patch)
tree16c1ccbc5029038f9d123c98e00055833eb48dd7 /include/net/cfg802154.h
parentce93b9378c306e6bcc4e0bd817acf4195b4a0288 (diff)
downloadlinux-80f8bf9a2a7f603662e08f7663643a58087a2cd4.tar.gz
linux-80f8bf9a2a7f603662e08f7663643a58087a2cd4.tar.bz2
linux-80f8bf9a2a7f603662e08f7663643a58087a2cd4.zip
mac802154: Follow the number of associated devices
Track the count of associated devices. Limit the number of associations using the value provided by the user if any. If we reach the maximum number of associations, we tell the device we are at capacity. If the user do not want to accept any more associations, it may specify the value 0 to the maximum number of associations, which will lead to an access denied error status returned to the peers trying to associate. 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-10-miquel.raynal@bootlin.com
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 0d3e9af00198..a64bbcd71f10 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -507,6 +507,7 @@ struct wpan_dev {
struct ieee802154_pan_device *parent;
struct list_head children;
unsigned int max_associations;
+ unsigned int nchildren;
};
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)