diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 1cb77db5c292..c66d57560e7c 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -888,13 +888,13 @@ generate_new: | |||
888 | 888 | ||
889 | static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev) | 889 | static 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); |
@@ -3403,7 +3403,7 @@ out_unlock: | |||
3403 | } | 3403 | } |
3404 | 3404 | ||
3405 | static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, | 3405 | static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, |
3406 | int aid, int set) | 3406 | struct ieee80211_sta *sta, bool set) |
3407 | { | 3407 | { |
3408 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3408 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3409 | unsigned long flags; | 3409 | unsigned long flags; |
@@ -3704,7 +3704,13 @@ static int b43legacy_wireless_init(struct ssb_device *dev) | |||
3704 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | | 3704 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | |
3705 | IEEE80211_HW_SIGNAL_DBM | | 3705 | IEEE80211_HW_SIGNAL_DBM | |
3706 | IEEE80211_HW_NOISE_DBM; | 3706 | IEEE80211_HW_NOISE_DBM; |
3707 | hw->wiphy->interface_modes = | ||
3708 | BIT(NL80211_IFTYPE_AP) | | ||
3709 | BIT(NL80211_IFTYPE_STATION) | | ||
3710 | BIT(NL80211_IFTYPE_WDS) | | ||
3711 | BIT(NL80211_IFTYPE_ADHOC); | ||
3707 | hw->queues = 1; /* FIXME: hardware has more queues */ | 3712 | hw->queues = 1; /* FIXME: hardware has more queues */ |
3713 | hw->max_altrates = 1; | ||
3708 | SET_IEEE80211_DEV(hw, dev->dev); | 3714 | SET_IEEE80211_DEV(hw, dev->dev); |
3709 | if (is_valid_ether_addr(sprom->et1mac)) | 3715 | if (is_valid_ether_addr(sprom->et1mac)) |
3710 | SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); | 3716 | SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); |