aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-06 21:56:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:02:33 -0400
commit79c97e97aed7f760d2826c7daf2d42d8eefe9838 (patch)
treebf6d18d0de2c0168a292f05eb6f7296c15278b8b /net/wireless/core.h
parent667503ddcb96f3b10211f997fe55907fa7509841 (diff)
cfg80211: clean up naming once and for all
We've named the registered devices 'drv' sometimes, thinking of "driver", which is not what it is, it's the internal representation of a wiphy, i.e. a device. Let's clean up the naming once and and use 'rdev' aka 'registered device' everywhere. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 5ccd642e183b..e46cd6eb61d7 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -97,13 +97,13 @@ bool wiphy_idx_valid(int wiphy_idx)
97} 97}
98 98
99extern struct mutex cfg80211_mutex; 99extern struct mutex cfg80211_mutex;
100extern struct list_head cfg80211_drv_list; 100extern struct list_head cfg80211_rdev_list;
101 101
102#define assert_cfg80211_lock() WARN_ON(!mutex_is_locked(&cfg80211_mutex)) 102#define assert_cfg80211_lock() WARN_ON(!mutex_is_locked(&cfg80211_mutex))
103 103
104/* 104/*
105 * You can use this to mark a wiphy_idx as not having an associated wiphy. 105 * You can use this to mark a wiphy_idx as not having an associated wiphy.
106 * It guarantees cfg80211_drv_by_wiphy_idx(wiphy_idx) will return NULL 106 * It guarantees cfg80211_rdev_by_wiphy_idx(wiphy_idx) will return NULL
107 */ 107 */
108#define WIPHY_IDX_STALE -1 108#define WIPHY_IDX_STALE -1
109 109
@@ -136,11 +136,11 @@ static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
136} 136}
137 137
138 138
139struct cfg80211_registered_device *cfg80211_drv_by_wiphy_idx(int wiphy_idx); 139struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx);
140int get_wiphy_idx(struct wiphy *wiphy); 140int get_wiphy_idx(struct wiphy *wiphy);
141 141
142struct cfg80211_registered_device * 142struct cfg80211_registered_device *
143__cfg80211_drv_from_info(struct genl_info *info); 143__cfg80211_rdev_from_info(struct genl_info *info);
144 144
145/* 145/*
146 * This function returns a pointer to the driver 146 * This function returns a pointer to the driver
@@ -153,7 +153,7 @@ __cfg80211_drv_from_info(struct genl_info *info);
153 * 153 *
154 * This is necessary because we need to lock the global 154 * This is necessary because we need to lock the global
155 * mutex to get an item off the list safely, and then 155 * mutex to get an item off the list safely, and then
156 * we lock the drv mutex so it doesn't go away under us. 156 * we lock the rdev mutex so it doesn't go away under us.
157 * 157 *
158 * We don't want to keep cfg80211_mutex locked 158 * We don't want to keep cfg80211_mutex locked
159 * for all the time in order to allow requests on 159 * for all the time in order to allow requests on
@@ -165,22 +165,22 @@ __cfg80211_drv_from_info(struct genl_info *info);
165extern struct cfg80211_registered_device * 165extern struct cfg80211_registered_device *
166cfg80211_get_dev_from_info(struct genl_info *info); 166cfg80211_get_dev_from_info(struct genl_info *info);
167 167
168/* requires cfg80211_drv_mutex to be held! */ 168/* requires cfg80211_rdev_mutex to be held! */
169struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx); 169struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx);
170 170
171/* identical to cfg80211_get_dev_from_info but only operate on ifindex */ 171/* identical to cfg80211_get_dev_from_info but only operate on ifindex */
172extern struct cfg80211_registered_device * 172extern struct cfg80211_registered_device *
173cfg80211_get_dev_from_ifindex(int ifindex); 173cfg80211_get_dev_from_ifindex(int ifindex);
174 174
175static inline void cfg80211_lock_rdev(struct cfg80211_registered_device *drv) 175static inline void cfg80211_lock_rdev(struct cfg80211_registered_device *rdev)
176{ 176{
177 mutex_lock(&drv->mtx); 177 mutex_lock(&rdev->mtx);
178} 178}
179 179
180static inline void cfg80211_unlock_rdev(struct cfg80211_registered_device *drv) 180static inline void cfg80211_unlock_rdev(struct cfg80211_registered_device *rdev)
181{ 181{
182 BUG_ON(IS_ERR(drv) || !drv); 182 BUG_ON(IS_ERR(rdev) || !rdev);
183 mutex_unlock(&drv->mtx); 183 mutex_unlock(&rdev->mtx);
184} 184}
185 185
186static inline void wdev_lock(struct wireless_dev *wdev) 186static inline void wdev_lock(struct wireless_dev *wdev)
@@ -240,9 +240,9 @@ struct cfg80211_event {
240 240
241 241
242/* free object */ 242/* free object */
243extern void cfg80211_dev_free(struct cfg80211_registered_device *drv); 243extern void cfg80211_dev_free(struct cfg80211_registered_device *rdev);
244 244
245extern int cfg80211_dev_rename(struct cfg80211_registered_device *drv, 245extern int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
246 char *newname); 246 char *newname);
247 247
248void ieee80211_set_bitrate_flags(struct wiphy *wiphy); 248void ieee80211_set_bitrate_flags(struct wiphy *wiphy);