summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorEric Dumazet2010-06-01 08:51:19 +0200
committerDavid S. Miller2010-06-02 14:16:23 +0200
commitc2d9ba9bce8d7323ca96f239e1f505c14d6244fb (patch)
tree7a184eefa2e48e6aa15cdf3aefb6ccf2fb834320 /include/net/cfg80211.h
parentppp: eliminate shadowed variable name (diff)
downloadkernel-qcow2-linux-c2d9ba9bce8d7323ca96f239e1f505c14d6244fb.tar.gz
kernel-qcow2-linux-c2d9ba9bce8d7323ca96f239e1f505c14d6244fb.tar.xz
kernel-qcow2-linux-c2d9ba9bce8d7323ca96f239e1f505c14d6244fb.zip
net: CONFIG_NET_NS reduction
Use read_pnet() and write_pnet() to reduce number of ifdef CONFIG_NET_NS Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 b44a2e5321a3..e7ebeb8bdf71 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1330,26 +1330,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