summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-19 00:21:13 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 21:01:42 +0200
commitf1f74825fe01ac77204ca34e3240dec50a8207c2 (patch)
treef6283e6022c137abcd38b1fa9972fdae195d6905
parentmac80211_hwsim: clean up the skb before passing it back (diff)
downloadlinux-f1f74825fe01ac77204ca34e3240dec50a8207c2.tar.xz
linux-f1f74825fe01ac77204ca34e3240dec50a8207c2.zip
cfg80211: add wrapper function to get wiphy from priv pointer
Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/net/cfg80211.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 90f9bfa3bfc2..dba7874d1963 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1059,6 +1059,17 @@ static inline void *wiphy_priv(struct wiphy *wiphy)
}
/**
+ * priv_to_wiphy - return the wiphy containing the priv
+ *
+ * @priv: a pointer previously returned by wiphy_priv
+ */
+static inline struct wiphy *priv_to_wiphy(void *priv)
+{
+ BUG_ON(!priv);
+ return container_of(priv, struct wiphy, priv);
+}
+
+/**
* set_wiphy_dev - set device pointer for wiphy
*
* @wiphy: The wiphy whose device to bind