Skip to content

Commit

Permalink
wl1271: Fix channel changing code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Feb 19, 2010
1 parent d8c42c0 commit ddb01a5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,8 +1234,16 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
}

/* if the channel changes while joined, join again */
if (channel != wl->channel && test_bit(WL1271_FLAG_JOINED, &wl->flags))
wl1271_join_channel(wl, channel);
if (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 &&
!test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags)) {
Expand Down

0 comments on commit ddb01a5

Please sign in to comment.