Commit 33d7e016 authored by Margit Schubert-While's avatar Margit Schubert-While Committed by Jeff Garzik

[PATCH] prism54 freq to channel incorrect for 5GHz

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)
parent 07f0a148
...@@ -28,10 +28,6 @@ const int frequency_list_bg[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, ...@@ -28,10 +28,6 @@ const int frequency_list_bg[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
2447, 2452, 2457, 2462, 2467, 2472, 2484 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 int
channel_of_freq(int f) channel_of_freq(int f)
{ {
...@@ -41,10 +37,8 @@ channel_of_freq(int f) ...@@ -41,10 +37,8 @@ channel_of_freq(int f)
while ((c < 14) && (f != frequency_list_bg[c])) while ((c < 14) && (f != frequency_list_bg[c]))
c++; c++;
return (c >= 14) ? 0 : ++c; return (c >= 14) ? 0 : ++c;
} else if ((f >= (int) 5170) && (f <= (int) 5320)) { } else if ((f >= (int) 5000) && (f <= (int) 6000)) {
while ((c < 12) && (f != frequency_list_a[c])) return ( (f - 5000) / 5 );
c++;
return (c >= 12) ? 0 : (c + 37);
} else } else
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment