diff options
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 12 |
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 | |||
82 | struct cfg80211_internal_bss { | 88 | struct 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 | ||
97 | struct cfg80211_registered_device *cfg80211_drv_by_wiphy_idx(int wiphy_idx); | ||
98 | int 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 { | |||
111 | extern struct cfg80211_registered_device * | 120 | extern struct cfg80211_registered_device * |
112 | cfg80211_get_dev_from_info(struct genl_info *info); | 121 | cfg80211_get_dev_from_info(struct genl_info *info); |
113 | 122 | ||
123 | /* requires cfg80211_drv_mutex to be held! */ | ||
124 | struct 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 */ |
115 | extern struct cfg80211_registered_device * | 127 | extern struct cfg80211_registered_device * |
116 | cfg80211_get_dev_from_ifindex(int ifindex); | 128 | cfg80211_get_dev_from_ifindex(int ifindex); |