From 53f9ee61b46d81a43d8c6694d136896e8f49a7b8 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Wed, 5 Nov 2014 20:51:12 +0100 Subject: 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 Signed-off-by: Marcel Holtmann --- net/ieee802154/core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/ieee802154/core.h') 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 @@ struct cfg802154_registered_device { const struct cfg802154_ops *ops; + /* wpan_phy index, internal only */ + int wpan_phy_idx; + /* must be last because of the way we do wpan_phy_priv(), * and it should at least be aligned to NETDEV_ALIGN */ -- cgit v1.2.3-59-g8ed1b