diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-02-18 06:25:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-19 15:52:42 -0500 |
commit | ddb01a5b368270f3cc86b606ba6f7ee8795a8a99 (patch) | |
tree | 11be644e6ad57e0e72820ee78c202ddd1d970407 /drivers/net | |
parent | d8c42c0c282a5edd9ea2eef4c929d9cec2798653 (diff) |
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: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 12 |
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)) { |