aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:01:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:23 -0400
commit05c914fe330fa8e1cc67870dc0d3809dfd96c107 (patch)
treedf53bcab47335f3361c09478d6b1447b7d298536 /net/mac80211/util.c
parent96dd22ac06b0dbfb069fdf530c72046a941e9694 (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 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index d6aca91e612d..6eb222369bcb 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -43,7 +43,7 @@ const unsigned char bridge_tunnel_header[] __aligned(2) =
43 43
44 44
45u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len, 45u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
46 enum ieee80211_if_types type) 46 enum nl80211_iftype type)
47{ 47{
48 __le16 fc = hdr->frame_control; 48 __le16 fc = hdr->frame_control;
49 49
@@ -77,10 +77,10 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
77 77
78 if (ieee80211_is_back_req(fc)) { 78 if (ieee80211_is_back_req(fc)) {
79 switch (type) { 79 switch (type) {
80 case IEEE80211_IF_TYPE_STA: 80 case NL80211_IFTYPE_STATION:
81 return hdr->addr2; 81 return hdr->addr2;
82 case IEEE80211_IF_TYPE_AP: 82 case NL80211_IFTYPE_AP:
83 case IEEE80211_IF_TYPE_VLAN: 83 case NL80211_IFTYPE_AP_VLAN:
84 return hdr->addr1; 84 return hdr->addr1;
85 default: 85 default:
86 break; /* fall through to the return */ 86 break; /* fall through to the return */
@@ -376,15 +376,16 @@ void ieee80211_iterate_active_interfaces(
376 376
377 list_for_each_entry(sdata, &local->interfaces, list) { 377 list_for_each_entry(sdata, &local->interfaces, list) {
378 switch (sdata->vif.type) { 378 switch (sdata->vif.type) {
379 case IEEE80211_IF_TYPE_INVALID: 379 case __NL80211_IFTYPE_AFTER_LAST:
380 case IEEE80211_IF_TYPE_MNTR: 380 case NL80211_IFTYPE_UNSPECIFIED:
381 case IEEE80211_IF_TYPE_VLAN: 381 case NL80211_IFTYPE_MONITOR:
382 case NL80211_IFTYPE_AP_VLAN:
382 continue; 383 continue;
383 case IEEE80211_IF_TYPE_AP: 384 case NL80211_IFTYPE_AP:
384 case IEEE80211_IF_TYPE_STA: 385 case NL80211_IFTYPE_STATION:
385 case IEEE80211_IF_TYPE_IBSS: 386 case NL80211_IFTYPE_ADHOC:
386 case IEEE80211_IF_TYPE_WDS: 387 case NL80211_IFTYPE_WDS:
387 case IEEE80211_IF_TYPE_MESH_POINT: 388 case NL80211_IFTYPE_MESH_POINT:
388 break; 389 break;
389 } 390 }
390 if (netif_running(sdata->dev)) 391 if (netif_running(sdata->dev))
@@ -409,15 +410,16 @@ void ieee80211_iterate_active_interfaces_atomic(
409 410
410 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 411 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
411 switch (sdata->vif.type) { 412 switch (sdata->vif.type) {
412 case IEEE80211_IF_TYPE_INVALID: 413 case __NL80211_IFTYPE_AFTER_LAST:
413 case IEEE80211_IF_TYPE_MNTR: 414 case NL80211_IFTYPE_UNSPECIFIED:
414 case IEEE80211_IF_TYPE_VLAN: 415 case NL80211_IFTYPE_MONITOR:
416 case NL80211_IFTYPE_AP_VLAN:
415 continue; 417 continue;
416 case IEEE80211_IF_TYPE_AP: 418 case NL80211_IFTYPE_AP:
417 case IEEE80211_IF_TYPE_STA: 419 case NL80211_IFTYPE_STATION:
418 case IEEE80211_IF_TYPE_IBSS: 420 case NL80211_IFTYPE_ADHOC:
419 case IEEE80211_IF_TYPE_WDS: 421 case NL80211_IFTYPE_WDS:
420 case IEEE80211_IF_TYPE_MESH_POINT: 422 case NL80211_IFTYPE_MESH_POINT:
421 break; 423 break;
422 } 424 }
423 if (netif_running(sdata->dev)) 425 if (netif_running(sdata->dev))
@@ -622,7 +624,7 @@ int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
622 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); 624 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);
623 625
624 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { 626 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
625 if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && 627 if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
626 chan->flags & IEEE80211_CHAN_NO_IBSS) { 628 chan->flags & IEEE80211_CHAN_NO_IBSS) {
627 printk(KERN_DEBUG "%s: IBSS not allowed on frequency " 629 printk(KERN_DEBUG "%s: IBSS not allowed on frequency "
628 "%d MHz\n", sdata->dev->name, chan->center_freq); 630 "%d MHz\n", sdata->dev->name, chan->center_freq);