aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/main.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 /drivers/net/wireless/b43legacy/main.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 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r--drivers/net/wireless/b43legacy/main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 68f63f5093af..6e425410c99d 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -888,13 +888,13 @@ generate_new:
888 888
889static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev) 889static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev)
890{ 890{
891 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) { 891 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP)) {
892 /* TODO: PS TBTT */ 892 /* TODO: PS TBTT */
893 } else { 893 } else {
894 if (1/*FIXME: the last PSpoll frame was sent successfully */) 894 if (1/*FIXME: the last PSpoll frame was sent successfully */)
895 b43legacy_power_saving_ctl_bits(dev, -1, -1); 895 b43legacy_power_saving_ctl_bits(dev, -1, -1);
896 } 896 }
897 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) 897 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
898 dev->dfq_valid = 1; 898 dev->dfq_valid = 1;
899} 899}
900 900
@@ -1201,7 +1201,7 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev)
1201 struct b43legacy_wl *wl = dev->wl; 1201 struct b43legacy_wl *wl = dev->wl;
1202 u32 cmd; 1202 u32 cmd;
1203 1203
1204 if (!b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) 1204 if (!b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
1205 return; 1205 return;
1206 1206
1207 /* This is the bottom half of the asynchronous beacon update. */ 1207 /* This is the bottom half of the asynchronous beacon update. */
@@ -1936,9 +1936,9 @@ static void b43legacy_adjust_opmode(struct b43legacy_wldev *dev)
1936 ctl &= ~B43legacy_MACCTL_BEACPROMISC; 1936 ctl &= ~B43legacy_MACCTL_BEACPROMISC;
1937 ctl |= B43legacy_MACCTL_INFRA; 1937 ctl |= B43legacy_MACCTL_INFRA;
1938 1938
1939 if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) 1939 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
1940 ctl |= B43legacy_MACCTL_AP; 1940 ctl |= B43legacy_MACCTL_AP;
1941 else if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) 1941 else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC))
1942 ctl &= ~B43legacy_MACCTL_INFRA; 1942 ctl &= ~B43legacy_MACCTL_INFRA;
1943 1943
1944 if (wl->filter_flags & FIF_CONTROL) 1944 if (wl->filter_flags & FIF_CONTROL)
@@ -2646,7 +2646,7 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
2646 b43legacy_mgmtframe_txantenna(dev, antenna_tx); 2646 b43legacy_mgmtframe_txantenna(dev, antenna_tx);
2647 2647
2648 /* Update templates for AP mode. */ 2648 /* Update templates for AP mode. */
2649 if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) 2649 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
2650 b43legacy_set_beacon_int(dev, conf->beacon_int); 2650 b43legacy_set_beacon_int(dev, conf->beacon_int);
2651 2651
2652 2652
@@ -2733,12 +2733,12 @@ static int b43legacy_op_config_interface(struct ieee80211_hw *hw,
2733 else 2733 else
2734 memset(wl->bssid, 0, ETH_ALEN); 2734 memset(wl->bssid, 0, ETH_ALEN);
2735 if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) { 2735 if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) {
2736 if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) { 2736 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) {
2737 B43legacy_WARN_ON(vif->type != IEEE80211_IF_TYPE_AP); 2737 B43legacy_WARN_ON(vif->type != NL80211_IFTYPE_AP);
2738 b43legacy_set_ssid(dev, conf->ssid, conf->ssid_len); 2738 b43legacy_set_ssid(dev, conf->ssid, conf->ssid_len);
2739 if (conf->changed & IEEE80211_IFCC_BEACON) 2739 if (conf->changed & IEEE80211_IFCC_BEACON)
2740 b43legacy_update_templates(wl); 2740 b43legacy_update_templates(wl);
2741 } else if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) { 2741 } else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
2742 if (conf->changed & IEEE80211_IFCC_BEACON) 2742 if (conf->changed & IEEE80211_IFCC_BEACON)
2743 b43legacy_update_templates(wl); 2743 b43legacy_update_templates(wl);
2744 } 2744 }
@@ -3020,7 +3020,7 @@ static void b43legacy_set_synth_pu_delay(struct b43legacy_wldev *dev,
3020 bool idle) { 3020 bool idle) {
3021 u16 pu_delay = 1050; 3021 u16 pu_delay = 1050;
3022 3022
3023 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS) || idle) 3023 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC) || idle)
3024 pu_delay = 500; 3024 pu_delay = 500;
3025 if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8)) 3025 if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8))
3026 pu_delay = max(pu_delay, (u16)2400); 3026 pu_delay = max(pu_delay, (u16)2400);
@@ -3035,7 +3035,7 @@ static void b43legacy_set_pretbtt(struct b43legacy_wldev *dev)
3035 u16 pretbtt; 3035 u16 pretbtt;
3036 3036
3037 /* The time value is in microseconds. */ 3037 /* The time value is in microseconds. */
3038 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) 3038 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
3039 pretbtt = 2; 3039 pretbtt = 2;
3040 else 3040 else
3041 pretbtt = 250; 3041 pretbtt = 250;
@@ -3259,10 +3259,10 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
3259 3259
3260 /* TODO: allow WDS/AP devices to coexist */ 3260 /* TODO: allow WDS/AP devices to coexist */
3261 3261
3262 if (conf->type != IEEE80211_IF_TYPE_AP && 3262 if (conf->type != NL80211_IFTYPE_AP &&
3263 conf->type != IEEE80211_IF_TYPE_STA && 3263 conf->type != NL80211_IFTYPE_STATION &&
3264 conf->type != IEEE80211_IF_TYPE_WDS && 3264 conf->type != NL80211_IFTYPE_WDS &&
3265 conf->type != IEEE80211_IF_TYPE_IBSS) 3265 conf->type != NL80211_IFTYPE_ADHOC)
3266 return -EOPNOTSUPP; 3266 return -EOPNOTSUPP;
3267 3267
3268 mutex_lock(&wl->mutex); 3268 mutex_lock(&wl->mutex);