diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-10 18:01:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-15 16:48:23 -0400 |
commit | 05c914fe330fa8e1cc67870dc0d3809dfd96c107 (patch) | |
tree | df53bcab47335f3361c09478d6b1447b7d298536 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 96dd22ac06b0dbfb069fdf530c72046a941e9694 (diff) |
mac80211: use nl80211 interface types
There's really no reason for mac80211 to be using its
own interface type defines. Use the nl80211 types and
simplify the configuration code a bit: there's no need
to translate them any more now.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 56829fad3471..485c40de5cc0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -211,7 +211,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
211 | return -ENODEV; | 211 | return -ENODEV; |
212 | 212 | ||
213 | switch (conf->type) { | 213 | switch (conf->type) { |
214 | case IEEE80211_IF_TYPE_AP: | 214 | case NL80211_IFTYPE_AP: |
215 | /* | 215 | /* |
216 | * We don't support mixed combinations of | 216 | * We don't support mixed combinations of |
217 | * sta and ap interfaces. | 217 | * sta and ap interfaces. |
@@ -227,8 +227,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
227 | return -ENOBUFS; | 227 | return -ENOBUFS; |
228 | 228 | ||
229 | break; | 229 | break; |
230 | case IEEE80211_IF_TYPE_STA: | 230 | case NL80211_IFTYPE_STATION: |
231 | case IEEE80211_IF_TYPE_IBSS: | 231 | case NL80211_IFTYPE_ADHOC: |
232 | /* | 232 | /* |
233 | * We don't support mixed combinations of | 233 | * We don't support mixed combinations of |
234 | * sta and ap interfaces. | 234 | * sta and ap interfaces. |
@@ -268,7 +268,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
268 | * increase interface count and start initialization. | 268 | * increase interface count and start initialization. |
269 | */ | 269 | */ |
270 | 270 | ||
271 | if (conf->type == IEEE80211_IF_TYPE_AP) | 271 | if (conf->type == NL80211_IFTYPE_AP) |
272 | rt2x00dev->intf_ap_count++; | 272 | rt2x00dev->intf_ap_count++; |
273 | else | 273 | else |
274 | rt2x00dev->intf_sta_count++; | 274 | rt2x00dev->intf_sta_count++; |
@@ -277,7 +277,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
277 | spin_lock_init(&intf->seqlock); | 277 | spin_lock_init(&intf->seqlock); |
278 | intf->beacon = entry; | 278 | intf->beacon = entry; |
279 | 279 | ||
280 | if (conf->type == IEEE80211_IF_TYPE_AP) | 280 | if (conf->type == NL80211_IFTYPE_AP) |
281 | memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN); | 281 | memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN); |
282 | memcpy(&intf->mac, conf->mac_addr, ETH_ALEN); | 282 | memcpy(&intf->mac, conf->mac_addr, ETH_ALEN); |
283 | 283 | ||
@@ -311,11 +311,11 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw, | |||
311 | * no interface is present. | 311 | * no interface is present. |
312 | */ | 312 | */ |
313 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || | 313 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || |
314 | (conf->type == IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_ap_count) || | 314 | (conf->type == NL80211_IFTYPE_AP && !rt2x00dev->intf_ap_count) || |
315 | (conf->type != IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_sta_count)) | 315 | (conf->type != NL80211_IFTYPE_AP && !rt2x00dev->intf_sta_count)) |
316 | return; | 316 | return; |
317 | 317 | ||
318 | if (conf->type == IEEE80211_IF_TYPE_AP) | 318 | if (conf->type == NL80211_IFTYPE_AP) |
319 | rt2x00dev->intf_ap_count--; | 319 | rt2x00dev->intf_ap_count--; |
320 | else | 320 | else |
321 | rt2x00dev->intf_sta_count--; | 321 | rt2x00dev->intf_sta_count--; |
@@ -331,7 +331,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw, | |||
331 | * are cleared to prevent false ACKing of frames. | 331 | * are cleared to prevent false ACKing of frames. |
332 | */ | 332 | */ |
333 | rt2x00lib_config_intf(rt2x00dev, intf, | 333 | rt2x00lib_config_intf(rt2x00dev, intf, |
334 | IEEE80211_IF_TYPE_INVALID, NULL, NULL); | 334 | NL80211_IFTYPE_UNSPECIFIED, NULL, NULL); |
335 | } | 335 | } |
336 | EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface); | 336 | EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface); |
337 | 337 | ||