diff options
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index b44a2e5321a3..e7ebeb8bdf71 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1330,26 +1330,15 @@ struct wiphy { | |||
1330 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 1330 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); |
1331 | }; | 1331 | }; |
1332 | 1332 | ||
1333 | #ifdef CONFIG_NET_NS | ||
1334 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1335 | { | ||
1336 | return wiphy->_net; | ||
1337 | } | ||
1338 | |||
1339 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1340 | { | ||
1341 | wiphy->_net = net; | ||
1342 | } | ||
1343 | #else | ||
1344 | static inline struct net *wiphy_net(struct wiphy *wiphy) | 1333 | static inline struct net *wiphy_net(struct wiphy *wiphy) |
1345 | { | 1334 | { |
1346 | return &init_net; | 1335 | return read_pnet(&wiphy->_net); |
1347 | } | 1336 | } |
1348 | 1337 | ||
1349 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | 1338 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) |
1350 | { | 1339 | { |
1340 | write_pnet(&wiphy->_net, net); | ||
1351 | } | 1341 | } |
1352 | #endif | ||
1353 | 1342 | ||
1354 | /** | 1343 | /** |
1355 | * wiphy_priv - return priv from wiphy | 1344 | * wiphy_priv - return priv from wiphy |