aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9b8b3f486ec8..168fe530b214 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1358,26 +1358,15 @@ struct wiphy {
char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
};
-#ifdef CONFIG_NET_NS
-static inline struct net *wiphy_net(struct wiphy *wiphy)
-{
- return wiphy->_net;
-}
-
-static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
-{
- wiphy->_net = net;
-}
-#else
static inline struct net *wiphy_net(struct wiphy *wiphy)
{
- return &init_net;
+ return read_pnet(&wiphy->_net);
}
static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
{
+ write_pnet(&wiphy->_net, net);
}
-#endif
/**
* wiphy_priv - return priv from wiphy