aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r--drivers/net/wireless/b43legacy/main.c63
1 files changed, 24 insertions, 39 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 276f314688f7..07c7898c87ac 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2804,6 +2804,7 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
2804 u32 savedirqs; 2804 u32 savedirqs;
2805 2805
2806 mutex_lock(&wl->mutex); 2806 mutex_lock(&wl->mutex);
2807 B43legacy_WARN_ON(wl->vif != vif);
2807 2808
2808 dev = wl->current_dev; 2809 dev = wl->current_dev;
2809 phy = &dev->phy; 2810 phy = &dev->phy;
@@ -2817,8 +2818,29 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
2817 goto out_unlock_mutex; 2818 goto out_unlock_mutex;
2818 } 2819 }
2819 savedirqs = b43legacy_interrupt_disable(dev, B43legacy_IRQ_ALL); 2820 savedirqs = b43legacy_interrupt_disable(dev, B43legacy_IRQ_ALL);
2820 spin_unlock_irqrestore(&wl->irq_lock, flags); 2821
2821 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 }
2822 2844
2823 b43legacy_mac_suspend(dev); 2845 b43legacy_mac_suspend(dev);
2824 2846
@@ -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,