]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/wl12xx/wl1251_main.c
wl1251: fix channel setting in wl1251_op_config()
[karo-tx-linux.git] / drivers / net / wireless / wl12xx / wl1251_main.c
index e575b7869fbca69591ede1b39e7b29489f2b3ed2..568b640aaa5293dc927ca3790bc2ad8c549bd5d7 100644 (file)
@@ -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);