aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 982cc6be3484..cd8e6e3ef116 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -79,6 +79,12 @@ static inline void assert_cfg80211_lock(void)
79 BUG_ON(!mutex_is_locked(&cfg80211_mutex)); 79 BUG_ON(!mutex_is_locked(&cfg80211_mutex));
80} 80}
81 81
82/*
83 * You can use this to mark a wiphy_idx as not having an associated wiphy.
84 * It guarantees cfg80211_drv_by_wiphy_idx(wiphy_idx) will return NULL
85 */
86#define WIPHY_IDX_STALE -1
87
82struct cfg80211_internal_bss { 88struct cfg80211_internal_bss {
83 struct list_head list; 89 struct list_head list;
84 struct rb_node rbn; 90 struct rb_node rbn;
@@ -88,6 +94,9 @@ struct cfg80211_internal_bss {
88 struct cfg80211_bss pub; 94 struct cfg80211_bss pub;
89}; 95};
90 96
97struct cfg80211_registered_device *cfg80211_drv_by_wiphy_idx(int wiphy_idx);
98int get_wiphy_idx(struct wiphy *wiphy);
99
91/* 100/*
92 * This function returns a pointer to the driver 101 * This function returns a pointer to the driver
93 * that the genl_info item that is passed refers to. 102 * that the genl_info item that is passed refers to.
@@ -111,6 +120,9 @@ struct cfg80211_internal_bss {
111extern struct cfg80211_registered_device * 120extern struct cfg80211_registered_device *
112cfg80211_get_dev_from_info(struct genl_info *info); 121cfg80211_get_dev_from_info(struct genl_info *info);
113 122
123/* requires cfg80211_drv_mutex to be held! */
124struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx);
125
114/* identical to cfg80211_get_dev_from_info but only operate on ifindex */ 126/* identical to cfg80211_get_dev_from_info but only operate on ifindex */
115extern struct cfg80211_registered_device * 127extern struct cfg80211_registered_device *
116cfg80211_get_dev_from_ifindex(int ifindex); 128cfg80211_get_dev_from_ifindex(int ifindex);