Commit ddb01a5b authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville

wl1271: Fix channel changing code

The channel changing code would a) change the BSSID to a dummy on upon
channel change, breaking connectivity, and b) not update the channel number
at all for ad-hoc, breaking adhoc.
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d8c42c0c
...@@ -1234,8 +1234,16 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -1234,8 +1234,16 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
} }
/* if the channel changes while joined, join again */ /* if the channel changes while joined, join again */
if (channel != wl->channel && test_bit(WL1271_FLAG_JOINED, &wl->flags)) if (channel != wl->channel &&
wl1271_join_channel(wl, channel); test_bit(WL1271_FLAG_JOINED, &wl->flags)) {
wl->channel = channel;
/* FIXME: maybe use CMD_CHANNEL_SWITCH for this? */
ret = wl1271_cmd_join(wl);
if (ret < 0)
wl1271_warning("cmd join to update channel failed %d",
ret);
} else
wl->channel = channel;
if (conf->flags & IEEE80211_CONF_PS && if (conf->flags & IEEE80211_CONF_PS &&
!test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags)) { !test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags)) {
......
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