prism54 freq to channel incorrect for 5GHz
Subsystems (3)
PATCH 1/1 prism54 freq to channel incorrect for 5GHz
2004-07-06 Margit Schubert-While <[email protected]>
* 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
drivers/net/wireless/prism54/oid_mgt.c +2 -8
@@ -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 ; }
_______________________________________________
Prism54-devel mailing list
[email protected]
http://prism54.org/mailman/listinfo/prism54-devel
Quoted 5 lines · Margit Schubert-While
2004-07-06 Margit Schubert-While <[email protected]>
* 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)
There is known good code to do this in the madwifi net80211 layer.
Sam
Jeff Garzik
Appliedapplied.
any comment on Sam's comment? is there generic code, so that we can avoid driver-specific code?