From: Dan Williams <dcbw@redhat.com>
To: Pavel Roskin <proski@gnu.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
Tomas Winkler <tomasw@gmail.com>,
Vincent C Jones <v.jones@networkingunlimited.com>,
linux-wireless@vger.kernel.org,
Emmanuel Grumbach <egrumbach@gmail.com>
Subject: Re: iwl4965 - wpa_supplicant can't see 5Ghz frequencies - 2.6.26-rc1 kernel
Date: Thu, 22 May 2008 15:18:45 -0400 [thread overview]
Message-ID: <1211483925.28022.23.camel@localhost.localdomain> (raw)
In-Reply-To: <1211482203.18709.9.camel@dv>
On Thu, 2008-05-22 at 14:50 -0400, Pavel Roskin wrote:
> On Thu, 2008-05-22 at 14:34 -0400, Dan Williams wrote:
>
> > But what's the best fix to the supplicant? It could just parse A-band
> > channels and where the numbers overlap, assume B/G band. Or, it could
> > be patched to prefer FREQ+frequency over FREQ+channel if it received
> > both. That's probably the best solution.
>
> I checked the wpa_supplicant sources and I see that all it needs is the
> frequency. All that needs to be done is not to allow channels
> (everything below, say, 10000) overwrite existing frequency data.
> That's the second approach.
works for me. something like the following? will repost to hostap list
if this looks ok.
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 69aae16..60cdb79 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1294,8 +1294,15 @@ static void wext_get_scan_freq(struct iw_event *iwe,
/*
* Some drivers do not report frequency, but a channel.
* Try to map this to frequency by assuming they are using
- * IEEE 802.11b/g.
+ * IEEE 802.11b/g. But don't overwrite a previously parsed
+ * frequency if the driver sends both frequency and channel,
+ * since the driver may be sending an A-band channel that we
+ * don't handle here.
*/
+
+ if (res->res.freq)
+ return;
+
if (iwe->u.freq.m >= 1 && iwe->u.freq.m <= 13) {
res->res.freq = 2407 + 5 * iwe->u.freq.m;
return;
I guess the better solution would be to handle A-band channels too. Is
there a canonical mapping of channel # to frequency somewhere for the
A-band stuff? I put together the following table a while ago from
googling around which is probably the wrong way to do it, but... my
sources were mainly wikipedia channel maps for 802.11a and some cisco
docs from somewhere.
Dan
static struct cf_pair a_table[] = {
/* A band */
{ 7, 5035 },
{ 8, 5040 },
{ 9, 5045 },
{ 11, 5055 },
{ 12, 5060 },
{ 16, 5080 },
{ 34, 5170 },
{ 36, 5180 },
{ 38, 5190 },
{ 40, 5200 },
{ 42, 5210 },
{ 44, 5220 },
{ 46, 5230 },
{ 48, 5240 },
{ 50, 5250 },
{ 52, 5260 },
{ 56, 5280 },
{ 58, 5290 },
{ 60, 5300 },
{ 64, 5320 },
{ 100, 5500 },
{ 104, 5520 },
{ 108, 5540 },
{ 112, 5560 },
{ 116, 5580 },
{ 120, 5600 },
{ 124, 5620 },
{ 128, 5640 },
{ 132, 5660 },
{ 136, 5680 },
{ 140, 5700 },
{ 149, 5745 },
{ 152, 5760 },
{ 153, 5765 },
{ 157, 5785 },
{ 160, 5800 },
{ 161, 5805 },
{ 165, 5825 },
{ 183, 4915 },
{ 184, 4920 },
{ 185, 4925 },
{ 187, 4935 },
{ 188, 4945 },
{ 192, 4960 },
{ 196, 4980 },
{ 0, -1 }
};
next prev parent reply other threads:[~2008-05-22 19:18 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 16:57 iwl4965 - wpa_supplicant can't see 5Ghz frequencies - 2.6.26-rc1 kernel Vincent C Jones
2008-05-09 21:23 ` Tomas Winkler
2008-05-09 23:41 ` Vincent C Jones
2008-05-10 0:12 ` Tomas Winkler
2008-05-10 2:36 ` Vincent C Jones
2008-05-10 14:39 ` Vincent C Jones
2008-05-10 15:46 ` Vincent C Jones
2008-05-10 18:56 ` Tomas Winkler
2008-05-10 21:48 ` Vincent C Jones
2008-05-10 22:06 ` Tomas Winkler
2008-05-11 2:49 ` Vincent C Jones
2008-05-12 16:50 ` Tomas Winkler
2008-05-12 18:37 ` Vincent C Jones
2008-05-22 16:53 ` Tomas Winkler
2008-05-22 17:42 ` Dann Church
2008-05-22 17:54 ` Tomas Winkler
2008-05-24 11:03 ` Dann Church
2008-05-22 17:56 ` Johannes Berg
2008-05-22 17:58 ` Tomas Winkler
2008-05-22 18:34 ` Dan Williams
2008-05-22 18:50 ` Pavel Roskin
2008-05-22 19:18 ` Dan Williams [this message]
2008-05-22 19:21 ` Johannes Berg
2008-05-22 18:51 ` Tomas Winkler
2008-05-22 19:12 ` Johannes Berg
2008-05-22 19:30 ` Dan Williams
2008-05-22 19:34 ` Johannes Berg
2008-05-22 20:56 ` Tomas Winkler
2008-05-22 21:09 ` Johannes Berg
2008-05-22 22:07 ` Dan Williams
2008-05-22 18:22 ` Dan Williams
2008-05-22 19:16 ` Johannes Berg
2008-05-22 22:33 ` Vincent C Jones
2008-05-22 22:50 ` Tomas Winkler
2008-05-22 23:28 ` Vincent C Jones
2008-05-10 17:06 ` Tomas Winkler
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=1211483925.28022.23.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=egrumbach@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=proski@gnu.org \
--cc=tomasw@gmail.com \
--cc=v.jones@networkingunlimited.com \
/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