1 --- a/drivers/net/wireless/b43/main.c
2 +++ b/drivers/net/wireless/b43/main.c
3 @@ -326,6 +326,10 @@ static void b43_wireless_core_exit(struc
4 static int b43_wireless_core_init(struct b43_wldev *dev);
5 static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev);
6 static int b43_wireless_core_start(struct b43_wldev *dev);
7 +static void b43_op_bss_info_changed(struct ieee80211_hw *hw,
8 + struct ieee80211_vif *vif,
9 + struct ieee80211_bss_conf *conf,
12 static int b43_ratelimit(struct b43_wl *wl)
14 @@ -3762,14 +3766,24 @@ static int b43_op_config(struct ieee8021
15 struct ieee80211_conf *conf = &hw->conf;
18 + bool reload_bss = false;
20 mutex_lock(&wl->mutex);
22 + dev = wl->current_dev;
24 /* Switch the band (if necessary). This might change the active core. */
25 err = b43_switch_band(wl, conf->channel);
27 goto out_unlock_mutex;
28 - dev = wl->current_dev;
30 + /* Need to reload all settings if the core changed */
31 + if (dev != wl->current_dev) {
32 + dev = wl->current_dev;
40 @@ -3830,6 +3844,9 @@ out_mac_enable:
42 mutex_unlock(&wl->mutex);
44 + if (wl->vif && reload_bss)
45 + b43_op_bss_info_changed(hw, wl->vif, &wl->vif->bss_conf, ~0);
50 @@ -3918,7 +3935,8 @@ static void b43_op_bss_info_changed(stru
51 if (changed & BSS_CHANGED_BEACON_INT &&
52 (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
53 b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT) ||
54 - b43_is_mode(wl, NL80211_IFTYPE_ADHOC)))
55 + b43_is_mode(wl, NL80211_IFTYPE_ADHOC)) &&
57 b43_set_beacon_int(dev, conf->beacon_int);
59 if (changed & BSS_CHANGED_BASIC_RATES)
60 @@ -4699,6 +4717,9 @@ static int b43_op_add_interface(struct i
62 mutex_unlock(&wl->mutex);
65 + b43_op_bss_info_changed(hw, vif, &vif->bss_conf, ~0);
70 @@ -4769,6 +4790,9 @@ static int b43_op_start(struct ieee80211
72 mutex_unlock(&wl->mutex);
74 + /* reload configuration */
75 + b43_op_config(hw, ~0);
80 @@ -4925,10 +4949,18 @@ out:
82 wl->current_dev = NULL; /* Failed to init the dev. */
83 mutex_unlock(&wl->mutex);
87 b43err(wl, "Controller restart FAILED\n");
89 - b43info(wl, "Controller restarted\n");
93 + /* reload configuration */
94 + b43_op_config(wl->hw, ~0);
96 + b43_op_bss_info_changed(wl->hw, wl->vif, &wl->vif->bss_conf, ~0);
98 + b43info(wl, "Controller restarted\n");
101 static int b43_setup_bands(struct b43_wldev *dev,