wl12xx: initialize rate_set on band rates initialization
authorEliad Peller <eliad@wizery.com>
Tue, 23 Aug 2011 12:56:23 +0000 (15:56 +0300)
committerLuciano Coelho <coelho@ti.com>
Thu, 25 Aug 2011 07:19:28 +0000 (10:19 +0300)
In some corner cases, (invalid) 11g rates were used while
working on 11a band.

Take care of it by initializing rate_set according to the
configured band.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/main.c

index 20e7bc7..3702e61 100644 (file)
@@ -2200,10 +2200,14 @@ out:
 
 static void wl1271_set_band_rate(struct wl1271 *wl)
 {
 
 static void wl1271_set_band_rate(struct wl1271 *wl)
 {
-       if (wl->band == IEEE80211_BAND_2GHZ)
+       if (wl->band == IEEE80211_BAND_2GHZ) {
                wl->basic_rate_set = wl->conf.tx.basic_rate;
                wl->basic_rate_set = wl->conf.tx.basic_rate;
-       else
+               wl->rate_set = wl->conf.tx.basic_rate;
+       } else {
                wl->basic_rate_set = wl->conf.tx.basic_rate_5;
                wl->basic_rate_set = wl->conf.tx.basic_rate_5;
+               wl->rate_set = wl->conf.tx.basic_rate_5;
+       }
+
 }
 
 static bool wl12xx_is_roc(struct wl1271 *wl)
 }
 
 static bool wl12xx_is_roc(struct wl1271 *wl)