linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wl12xx: reset 5ghz num channels on hw init
@ 2011-01-10 21:04 Arik Nemtsov
  2011-01-11  8:25 ` Johannes Berg
  2011-01-11 17:37 ` Luciano Coelho
  0 siblings, 2 replies; 6+ messages in thread
From: Arik Nemtsov @ 2011-01-10 21:04 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho, Arik Nemtsov

The number of 5ghz channels is set to 0 when 11a is not supported in the
NVS file. When a single rmmod/insmod of wl12xx_sdio this leads to a
supported band (5ghz) with 0 supported channels, which mac80211
considers illegal.

Fix this by always resetting the number of supported 5ghz channels
before the HW is registered.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
 drivers/net/wireless/wl12xx/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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;
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-11 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-10 21:04 [PATCH] wl12xx: reset 5ghz num channels on hw init Arik Nemtsov
2011-01-11  8:25 ` Johannes Berg
2011-01-11  8:32   ` Luciano Coelho
2011-01-11  8:36     ` Johannes Berg
2011-01-11  8:53       ` Luciano Coelho
2011-01-11 17:37 ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).