aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/core.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-05 14:51:12 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-05 15:53:03 -0500
commit53f9ee61b46d81a43d8c6694d136896e8f49a7b8 (patch)
treed6d98d0ad30cb084516cbbc741425f95c0dee46c /net/ieee802154/core.h
parent0d8a52f933f817d0b62955a5a362fb7f2508f06c (diff)
ieee802154: rework wpan_phy index assignment
This patch reworks the wpan_phy index incrementation. It's now similar like wireless wiphy index incrementation. We move the wpan_phy index attribute inside of cfg802154_registered_device and use atomic operations instead locking mechanism via wpan_phy_mutex. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/core.h')
-rw-r--r--net/ieee802154/core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ieee802154/core.h b/net/ieee802154/core.h
index 1bc172587157..fea60b3a8846 100644
--- a/net/ieee802154/core.h
+++ b/net/ieee802154/core.h
@@ -6,6 +6,9 @@
6struct cfg802154_registered_device { 6struct cfg802154_registered_device {
7 const struct cfg802154_ops *ops; 7 const struct cfg802154_ops *ops;
8 8
9 /* wpan_phy index, internal only */
10 int wpan_phy_idx;
11
9 /* must be last because of the way we do wpan_phy_priv(), 12 /* must be last because of the way we do wpan_phy_priv(),
10 * and it should at least be aligned to NETDEV_ALIGN 13 * and it should at least be aligned to NETDEV_ALIGN
11 */ 14 */