diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-06 21:56:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:02:33 -0400 |
commit | 79c97e97aed7f760d2826c7daf2d42d8eefe9838 (patch) | |
tree | bf6d18d0de2c0168a292f05eb6f7296c15278b8b /net/wireless/core.h | |
parent | 667503ddcb96f3b10211f997fe55907fa7509841 (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.h | 26 |
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 | ||
99 | extern struct mutex cfg80211_mutex; | 99 | extern struct mutex cfg80211_mutex; |
100 | extern struct list_head cfg80211_drv_list; | 100 | extern 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 | ||
139 | struct cfg80211_registered_device *cfg80211_drv_by_wiphy_idx(int wiphy_idx); | 139 | struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx); |
140 | int get_wiphy_idx(struct wiphy *wiphy); | 140 | int get_wiphy_idx(struct wiphy *wiphy); |
141 | 141 | ||
142 | struct cfg80211_registered_device * | 142 | struct 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); | |||
165 | extern struct cfg80211_registered_device * | 165 | extern struct cfg80211_registered_device * |
166 | cfg80211_get_dev_from_info(struct genl_info *info); | 166 | cfg80211_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! */ |
169 | struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx); | 169 | struct 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 */ |
172 | extern struct cfg80211_registered_device * | 172 | extern struct cfg80211_registered_device * |
173 | cfg80211_get_dev_from_ifindex(int ifindex); | 173 | cfg80211_get_dev_from_ifindex(int ifindex); |
174 | 174 | ||
175 | static inline void cfg80211_lock_rdev(struct cfg80211_registered_device *drv) | 175 | static 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 | ||
180 | static inline void cfg80211_unlock_rdev(struct cfg80211_registered_device *drv) | 180 | static 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 | ||
186 | static inline void wdev_lock(struct wireless_dev *wdev) | 186 | static 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 */ |
243 | extern void cfg80211_dev_free(struct cfg80211_registered_device *drv); | 243 | extern void cfg80211_dev_free(struct cfg80211_registered_device *rdev); |
244 | 244 | ||
245 | extern int cfg80211_dev_rename(struct cfg80211_registered_device *drv, | 245 | extern int cfg80211_dev_rename(struct cfg80211_registered_device *rdev, |
246 | char *newname); | 246 | char *newname); |
247 | 247 | ||
248 | void ieee80211_set_bitrate_flags(struct wiphy *wiphy); | 248 | void ieee80211_set_bitrate_flags(struct wiphy *wiphy); |