aboutsummaryrefslogtreecommitdiff
path: root/net/ieee802154
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/pan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ieee802154/pan.c b/net/ieee802154/pan.c
index fb5b0af2ef68..249df7364b3e 100644
--- a/net/ieee802154/pan.c
+++ b/net/ieee802154/pan.c
@@ -94,10 +94,16 @@ __le16 cfg802154_get_free_short_addr(struct wpan_dev *wpan_dev)
}
EXPORT_SYMBOL_GPL(cfg802154_get_free_short_addr);
-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)
{
+ unsigned int old_max;
+
lockdep_assert_held(&wpan_dev->association_lock);
+ old_max = wpan_dev->max_associations;
wpan_dev->max_associations = max;
+
+ return old_max;
}
EXPORT_SYMBOL_GPL(cfg802154_set_max_associations);