diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-06-18 04:45:34 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-07-08 06:20:57 -0400 |
commit | 66e5c2672cd11b9310008099faf6a4ffb9dfb6d0 (patch) | |
tree | 44fa2118c4570d457a5f4cafd33ec9fdd4bc28f3 /include/net/cfg802154.h | |
parent | aece0c3fe1f06962a591268b8c236df0ae5d9e4e (diff) |
ieee802154: add netns support
This patch adds netns support for 802.15.4 subsystem. Most parts are
copy&pasted from wireless subsystem, it has the identically userspace
API.
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <aar@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r-- | include/net/cfg802154.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index 171cd76558fb..795ca4008f72 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h | |||
@@ -219,9 +219,22 @@ struct wpan_phy { | |||
219 | 219 | ||
220 | struct device dev; | 220 | struct device dev; |
221 | 221 | ||
222 | /* the network namespace this phy lives in currently */ | ||
223 | possible_net_t _net; | ||
224 | |||
222 | char priv[0] __aligned(NETDEV_ALIGN); | 225 | char priv[0] __aligned(NETDEV_ALIGN); |
223 | }; | 226 | }; |
224 | 227 | ||
228 | static inline struct net *wpan_phy_net(struct wpan_phy *wpan_phy) | ||
229 | { | ||
230 | return read_pnet(&wpan_phy->_net); | ||
231 | } | ||
232 | |||
233 | static inline void wpan_phy_net_set(struct wpan_phy *wpan_phy, struct net *net) | ||
234 | { | ||
235 | write_pnet(&wpan_phy->_net, net); | ||
236 | } | ||
237 | |||
225 | struct ieee802154_addr { | 238 | struct ieee802154_addr { |
226 | u8 mode; | 239 | u8 mode; |
227 | __le16 pan_id; | 240 | __le16 pan_id; |