Skip to contentSkip to conversation

prism54 freq to channel incorrect for 5GHz

PATCH Applied Margit Schubert-While 3 participants 3 messages Jul 6, 2004 – Jul 7, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
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
@@ -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

#1 lore raw
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