aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 6f026fe63d7f..8b46b7069f1f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1234,8 +1234,16 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
1234 } 1234 }
1235 1235
1236 /* if the channel changes while joined, join again */ 1236 /* if the channel changes while joined, join again */
1237 if (channel != wl->channel && test_bit(WL1271_FLAG_JOINED, &wl->flags)) 1237 if (channel != wl->channel &&
1238 wl1271_join_channel(wl, channel); 1238 test_bit(WL1271_FLAG_JOINED, &wl->flags)) {
1239 wl->channel = channel;
1240 /* FIXME: maybe use CMD_CHANNEL_SWITCH for this? */
1241 ret = wl1271_cmd_join(wl);
1242 if (ret < 0)
1243 wl1271_warning("cmd join to update channel failed %d",
1244 ret);
1245 } else
1246 wl->channel = channel;
1239 1247
1240 if (conf->flags & IEEE80211_CONF_PS && 1248 if (conf->flags & IEEE80211_CONF_PS &&
1241 !test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags)) { 1249 !test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags)) {