aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r--drivers/net/wireless/b43legacy/main.c73
1 files changed, 29 insertions, 44 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index ee202b4f77b5..07c7898c87ac 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2721,11 +2721,6 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
2721 /* Antennas for RX and management frame TX. */ 2721 /* Antennas for RX and management frame TX. */
2722 b43legacy_mgmtframe_txantenna(dev, antenna_tx); 2722 b43legacy_mgmtframe_txantenna(dev, antenna_tx);
2723 2723
2724 /* Update templates for AP mode. */
2725 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
2726 b43legacy_set_beacon_int(dev, conf->beacon_int);
2727
2728
2729 if (!!conf->radio_enabled != phy->radio_on) { 2724 if (!!conf->radio_enabled != phy->radio_on) {
2730 if (conf->radio_enabled) { 2725 if (conf->radio_enabled) {
2731 b43legacy_radio_turn_on(dev); 2726 b43legacy_radio_turn_on(dev);
@@ -2809,6 +2804,7 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
2809 u32 savedirqs; 2804 u32 savedirqs;
2810 2805
2811 mutex_lock(&wl->mutex); 2806 mutex_lock(&wl->mutex);
2807 B43legacy_WARN_ON(wl->vif != vif);
2812 2808
2813 dev = wl->current_dev; 2809 dev = wl->current_dev;
2814 phy = &dev->phy; 2810 phy = &dev->phy;
@@ -2822,11 +2818,37 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
2822 goto out_unlock_mutex; 2818 goto out_unlock_mutex;
2823 } 2819 }
2824 savedirqs = b43legacy_interrupt_disable(dev, B43legacy_IRQ_ALL); 2820 savedirqs = b43legacy_interrupt_disable(dev, B43legacy_IRQ_ALL);
2825 spin_unlock_irqrestore(&wl->irq_lock, flags); 2821
2826 b43legacy_synchronize_irq(dev); 2822 if (changed & BSS_CHANGED_BSSID) {
2823 spin_unlock_irqrestore(&wl->irq_lock, flags);
2824 b43legacy_synchronize_irq(dev);
2825
2826 if (conf->bssid)
2827 memcpy(wl->bssid, conf->bssid, ETH_ALEN);
2828 else
2829 memset(wl->bssid, 0, ETH_ALEN);
2830
2831 if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) {
2832 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) {
2833 B43legacy_WARN_ON(vif->type != NL80211_IFTYPE_AP);
2834 if (changed & BSS_CHANGED_BEACON)
2835 b43legacy_update_templates(wl);
2836 } else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
2837 if (changed & BSS_CHANGED_BEACON)
2838 b43legacy_update_templates(wl);
2839 }
2840 b43legacy_write_mac_bssid_templates(dev);
2841 }
2842 spin_unlock_irqrestore(&wl->irq_lock, flags);
2843 }
2827 2844
2828 b43legacy_mac_suspend(dev); 2845 b43legacy_mac_suspend(dev);
2829 2846
2847 if (changed & BSS_CHANGED_BEACON_INT &&
2848 (b43legacy_is_mode(wl, NL80211_IFTYPE_AP) ||
2849 b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)))
2850 b43legacy_set_beacon_int(dev, conf->beacon_int);
2851
2830 if (changed & BSS_CHANGED_BASIC_RATES) 2852 if (changed & BSS_CHANGED_BASIC_RATES)
2831 b43legacy_update_basic_rates(dev, conf->basic_rates); 2853 b43legacy_update_basic_rates(dev, conf->basic_rates);
2832 2854
@@ -2846,8 +2868,6 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
2846 spin_unlock_irqrestore(&wl->irq_lock, flags); 2868 spin_unlock_irqrestore(&wl->irq_lock, flags);
2847 out_unlock_mutex: 2869 out_unlock_mutex:
2848 mutex_unlock(&wl->mutex); 2870 mutex_unlock(&wl->mutex);
2849
2850 return;
2851} 2871}
2852 2872
2853static void b43legacy_op_configure_filter(struct ieee80211_hw *hw, 2873static void b43legacy_op_configure_filter(struct ieee80211_hw *hw,
@@ -2889,40 +2909,6 @@ static void b43legacy_op_configure_filter(struct ieee80211_hw *hw,
2889 spin_unlock_irqrestore(&wl->irq_lock, flags); 2909 spin_unlock_irqrestore(&wl->irq_lock, flags);
2890} 2910}
2891 2911
2892static int b43legacy_op_config_interface(struct ieee80211_hw *hw,
2893 struct ieee80211_vif *vif,
2894 struct ieee80211_if_conf *conf)
2895{
2896 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
2897 struct b43legacy_wldev *dev = wl->current_dev;
2898 unsigned long flags;
2899
2900 if (!dev)
2901 return -ENODEV;
2902 mutex_lock(&wl->mutex);
2903 spin_lock_irqsave(&wl->irq_lock, flags);
2904 B43legacy_WARN_ON(wl->vif != vif);
2905 if (conf->bssid)
2906 memcpy(wl->bssid, conf->bssid, ETH_ALEN);
2907 else
2908 memset(wl->bssid, 0, ETH_ALEN);
2909 if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) {
2910 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) {
2911 B43legacy_WARN_ON(vif->type != NL80211_IFTYPE_AP);
2912 if (conf->changed & IEEE80211_IFCC_BEACON)
2913 b43legacy_update_templates(wl);
2914 } else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
2915 if (conf->changed & IEEE80211_IFCC_BEACON)
2916 b43legacy_update_templates(wl);
2917 }
2918 b43legacy_write_mac_bssid_templates(dev);
2919 }
2920 spin_unlock_irqrestore(&wl->irq_lock, flags);
2921 mutex_unlock(&wl->mutex);
2922
2923 return 0;
2924}
2925
2926/* Locking: wl->mutex */ 2912/* Locking: wl->mutex */
2927static void b43legacy_wireless_core_stop(struct b43legacy_wldev *dev) 2913static void b43legacy_wireless_core_stop(struct b43legacy_wldev *dev)
2928{ 2914{
@@ -3563,7 +3549,6 @@ static const struct ieee80211_ops b43legacy_hw_ops = {
3563 .remove_interface = b43legacy_op_remove_interface, 3549 .remove_interface = b43legacy_op_remove_interface,
3564 .config = b43legacy_op_dev_config, 3550 .config = b43legacy_op_dev_config,
3565 .bss_info_changed = b43legacy_op_bss_info_changed, 3551 .bss_info_changed = b43legacy_op_bss_info_changed,
3566 .config_interface = b43legacy_op_config_interface,
3567 .configure_filter = b43legacy_op_configure_filter, 3552 .configure_filter = b43legacy_op_configure_filter,
3568 .get_stats = b43legacy_op_get_stats, 3553 .get_stats = b43legacy_op_get_stats,
3569 .get_tx_stats = b43legacy_op_get_tx_stats, 3554 .get_tx_stats = b43legacy_op_get_tx_stats,