diff mbox

wl12xx: reset 5ghz num channels on hw init

Message ID 1294693444-30807-1-git-send-email-arik@wizery.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arik Nemtsov Jan. 10, 2011, 9:04 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 062247e..44cdefd 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2679,6 +2679,10 @@  int wl1271_init_ieee80211(struct wl1271 *wl)
 	wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz;
 	wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
 
+	/* reset the number of channels as this can be changed at runtime */
+	wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels =
+					ARRAY_SIZE(wl1271_channels_5ghz);
+
 	wl->hw->queues = 4;
 	wl->hw->max_rates = 1;