Commit f9471e99 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville

b43: b43_op_config: set channel info before switching band

Band switching code needs to know what channel we switch to.
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent eb530b0f
...@@ -3808,6 +3808,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -3808,6 +3808,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
b43_mac_suspend(dev); b43_mac_suspend(dev);
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
phy->channel = conf->chandef.chan->hw_value;
if (conf_is_ht(conf)) if (conf_is_ht(conf))
phy->is_40mhz = conf_is_ht40_minus(conf) || phy->is_40mhz = conf_is_ht40_minus(conf) ||
conf_is_ht40_plus(conf); conf_is_ht40_plus(conf);
...@@ -3822,7 +3823,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -3822,7 +3823,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
/* Switch to the requested channel. /* Switch to the requested channel.
* The firmware takes care of races with the TX handler. * The firmware takes care of races with the TX handler.
*/ */
b43_switch_channel(dev, conf->chandef.chan->hw_value); b43_switch_channel(dev, phy->channel);
} }
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS)
......
...@@ -424,7 +424,6 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel) ...@@ -424,7 +424,6 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel)
if (err) if (err)
goto err_restore_cookie; goto err_restore_cookie;
dev->phy.channel = new_channel;
/* Wait for the radio to tune to the channel and stabilize. */ /* Wait for the radio to tune to the channel and stabilize. */
msleep(8); msleep(8);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment