linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arik Nemtsov <arik@wizery.com>
To: <linux-wireless@vger.kernel.org>
Cc: Luciano Coelho <coelho@ti.com>, Arik Nemtsov <arik@wizery.com>
Subject: [PATCH] wl12xx: reset 5ghz num channels on hw init
Date: Mon, 10 Jan 2011 23:04:04 +0200	[thread overview]
Message-ID: <1294693444-30807-1-git-send-email-arik@wizery.com> (raw)

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


             reply	other threads:[~2011-01-10 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 21:04 Arik Nemtsov [this message]
2011-01-11  8:25 ` [PATCH] wl12xx: reset 5ghz num channels on hw init 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294693444-30807-1-git-send-email-arik@wizery.com \
    --to=arik@wizery.com \
    --cc=coelho@ti.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).