]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/wireless/core.h
cfg80211: make regulatory_request use wiphy_idx instead of wiphy
[linux-2.6-omap-h63xx.git] / net / wireless / core.h
index 982cc6be34846213bae00c5d2d6a95aacf4fbab3..cd8e6e3ef1167348fecb75d6f2f7268f2b4031f3 100644 (file)
@@ -79,6 +79,12 @@ static inline void assert_cfg80211_lock(void)
        BUG_ON(!mutex_is_locked(&cfg80211_mutex));
 }
 
+/*
+ * You can use this to mark a wiphy_idx as not having an associated wiphy.
+ * It guarantees cfg80211_drv_by_wiphy_idx(wiphy_idx) will return NULL
+ */
+#define WIPHY_IDX_STALE -1
+
 struct cfg80211_internal_bss {
        struct list_head list;
        struct rb_node rbn;
@@ -88,6 +94,9 @@ struct cfg80211_internal_bss {
        struct cfg80211_bss pub;
 };
 
+struct cfg80211_registered_device *cfg80211_drv_by_wiphy_idx(int wiphy_idx);
+int get_wiphy_idx(struct wiphy *wiphy);
+
 /*
  * This function returns a pointer to the driver
  * that the genl_info item that is passed refers to.
@@ -111,6 +120,9 @@ struct cfg80211_internal_bss {
 extern struct cfg80211_registered_device *
 cfg80211_get_dev_from_info(struct genl_info *info);
 
+/* requires cfg80211_drv_mutex to be held! */
+struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx);
+
 /* identical to cfg80211_get_dev_from_info but only operate on ifindex */
 extern struct cfg80211_registered_device *
 cfg80211_get_dev_from_ifindex(int ifindex);