wl1251: initialise default channel to zero
authorKalle Valo <kalle.valo@nokia.com>
Fri, 7 Aug 2009 10:34:27 +0000 (13:34 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:13:40 +0000 (09:13 -0400)
Because wl->channel was initialised to one, the first join command in
wl1251_op_config() always failed.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1251.h
drivers/net/wireless/wl12xx/wl1251_main.c

index 86d2abea4e1efa16c735f9be3093760d8c2867a4..998e4b6252bd4bbbe088c9770d8e032d7af75f48 100644 (file)
@@ -398,6 +398,8 @@ void wl1251_disable_interrupts(struct wl1251 *wl);
 #define WL1251_DEFAULT_BEACON_INT 100
 #define WL1251_DEFAULT_DTIM_PERIOD 1
 
+#define WL1251_DEFAULT_CHANNEL 0
+
 #define CHIP_ID_1251_PG10                 (0x7010101)
 #define CHIP_ID_1251_PG11                 (0x7020101)
 #define CHIP_ID_1251_PG12                 (0x7030101)
index d03169266b29e66c8906ecfb8adadca0c0ca362b..2514c94294d7a18f0b594411fcb86671b1a6fcb3 100644 (file)
@@ -461,6 +461,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
        wl->psm = 0;
        wl->tx_queue_stopped = false;
        wl->power_level = WL1251_DEFAULT_POWER_LEVEL;
+       wl->channel = WL1251_DEFAULT_CHANNEL;
 
        wl1251_debugfs_reset(wl);
 
@@ -1302,7 +1303,6 @@ out:
 }
 EXPORT_SYMBOL_GPL(wl1251_init_ieee80211);
 
-#define WL1251_DEFAULT_CHANNEL 1
 struct ieee80211_hw *wl1251_alloc_hw(void)
 {
        struct ieee80211_hw *hw;