netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: margitsw@t-online.de (Margit Schubert-While)
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com, prism54-devel@prism54.org
Subject: [PATCH Linux-2.6.7-bk19] prism54 freq to channel incorrect for 5GHz
Date: Tue, 6 Jul 2004 17:38:07 +0200	[thread overview]
Message-ID: <200407061738.07098.margitsw@t-online.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

2004-07-06 Margit Schubert-While <margitsw@t-online.de>

* The frequency to channel conversion is wrong for the 5GHz band
* Although the (known) devices don't/can't use it,
  they do report it. (iwlist ethX freq)

Margit



[-- Attachment #2: chanfreq.patch --]
[-- Type: text/x-diff, Size: 890 bytes --]

diff -Naur linux-2.6.7-02/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.7-03/drivers/net/wireless/prism54/oid_mgt.c
--- linux-2.6.7-02/drivers/net/wireless/prism54/oid_mgt.c	2004-07-01 07:23:52.000000000 +0200
+++ linux-2.6.7-03/drivers/net/wireless/prism54/oid_mgt.c	2004-07-06 17:26:44.000000000 +0200
@@ -28,10 +28,6 @@
 	2447, 2452, 2457, 2462, 2467, 2472, 2484
 };
 
-const int frequency_list_a[] = { 5170, 5180, 5190, 5200, 5210, 5220, 5230,
-	5240, 5260, 5280, 5300, 5320
-};
-
 int
 channel_of_freq(int f)
 {
@@ -41,10 +37,8 @@
 		while ((c < 14) && (f != frequency_list_bg[c]))
 			c++;
 		return (c >= 14) ? 0 : ++c;
-	} else if ((f >= (int) 5170) && (f <= (int) 5320)) {
-		while ((c < 12) && (f != frequency_list_a[c]))
-			c++;
-		return (c >= 12) ? 0 : (c + 37);
+	} else if ((f >= (int) 5000) && (f <= (int) 6000)) {
+		return ( (f - 5000) / 5 );
 	} else
 		return 0;
 }

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Prism54-devel mailing list
Prism54-devel@prism54.org
http://prism54.org/mailman/listinfo/prism54-devel

             reply	other threads:[~2004-07-06 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-06 15:38 Margit Schubert-While [this message]
2004-07-06 15:50 ` [PATCH Linux-2.6.7-bk19] prism54 freq to channel incorrect for 5GHz Sam Leffler
2004-07-07  5:02 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-07-07  6:31 Margit Schubert-While
2004-07-07  7:49 ` Bjørn Mork
2004-07-08 18:43 ` Vladimir Kondratiev
2004-07-09  6:58 ` Vladimir Kondratiev

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=200407061738.07098.margitsw@t-online.de \
    --to=margitsw@t-online.de \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=prism54-devel@prism54.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).