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 f68ae54cdae6..4d1f19d70798 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1358,26 +1358,15 @@ struct wiphy { | |||
1358 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 1358 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); |
1359 | }; | 1359 | }; |
1360 | 1360 | ||
1361 | #ifdef CONFIG_NET_NS | ||
1362 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1363 | { | ||
1364 | return wiphy->_net; | ||
1365 | } | ||
1366 | |||
1367 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1368 | { | ||
1369 | wiphy->_net = net; | ||
1370 | } | ||
1371 | #else | ||
1372 | static inline struct net *wiphy_net(struct wiphy *wiphy) | 1361 | static inline struct net *wiphy_net(struct wiphy *wiphy) |
1373 | { | 1362 | { |
1374 | return &init_net; | 1363 | return read_pnet(&wiphy->_net); |
1375 | } | 1364 | } |
1376 | 1365 | ||
1377 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | 1366 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) |
1378 | { | 1367 | { |
1368 | write_pnet(&wiphy->_net, net); | ||
1379 | } | 1369 | } |
1380 | #endif | ||
1381 | 1370 | ||
1382 | /** | 1371 | /** |
1383 | * wiphy_priv - return priv from wiphy | 1372 | * wiphy_priv - return priv from wiphy |