From: Kalle Valo Date: Fri, 7 Aug 2009 10:34:49 +0000 (+0300) Subject: wl1251: fix channel setting in wl1251_op_config() X-Git-Tag: Ubuntu-5.2.0-15.16~28243^2~367^2~91 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=fe9a98460b6c8dac47d0e34bcb04850193d41565;p=mirror_ubuntu-eoan-kernel.git wl1251: fix channel setting in wl1251_op_config() There is a bug in wl1251_op_config(). It was calling join with previous channel. Fix it by setting assigning wl->channel before calling join command. Signed-off-by: Kalle Valo Reviewed-by: Vidhya Govindan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index e575b7869fbc..568b640aaa52 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c @@ -593,12 +593,12 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) goto out; if (channel != wl->channel) { + wl->channel = channel; + ret = wl1251_join(wl, wl->bss_type, wl->channel, wl->beacon_int, wl->dtim_period); if (ret < 0) goto out_sleep; - - wl->channel = channel; } ret = wl1251_build_null_data(wl);