summaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-22 15:05:53 -0800
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:19 -0500
commit9a95371aa26e3cb9fb1340362912000088ff3c3e (patch)
treeaaa8470b9304d344a2c15f30776b3dd1c044183a /include/net/mac80211.h
parentf976376de0d6a9697fb635369f12ae00251f4566 (diff)
downloadop-kernel-dev-9a95371aa26e3cb9fb1340362912000088ff3c3e.zip
op-kernel-dev-9a95371aa26e3cb9fb1340362912000088ff3c3e.tar.gz
mac80211: allow mac80211 drivers to get to struct ieee80211_hw from wiphy
If a driver is given a wiphy and it wants to get to its private mac80211 driver area it can use wiphy_to_ieee80211_hw() to get first to its ieee80211_hw and then access the private structure via hw->priv. The wiphy_priv() is already being used internally by mac80211 and drivers should not use this. This can be helpful in a drivers reg_notifier(). Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 35643c5..c1e8261 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -990,6 +990,19 @@ struct ieee80211_hw {
};
/**
+ * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy
+ *
+ * @wiphy: the &struct wiphy which we want to query
+ *
+ * mac80211 drivers can use this to get to their respective
+ * &struct ieee80211_hw. Drivers wishing to get to their own private
+ * structure can then access it via hw->priv. Note that mac802111 drivers should
+ * not use wiphy_priv() to try to get their private driver structure as this
+ * is already used internally by mac80211.
+ */
+struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy);
+
+/**
* SET_IEEE80211_DEV - set device for 802.11 hardware
*
* @hw: the &struct ieee80211_hw to set the device for
OpenPOWER on IntegriCloud