hal/hald/linux net_class_device.c,1.7,1.8
Joe Shaw
joe at pdx.freedesktop.org
Wed May 26 13:17:15 PDT 2004
Update of /cvs/hal/hal/hald/linux
In directory pdx:/tmp/cvs-serv11113/hald/linux
Modified Files:
net_class_device.c
Log Message:
2004-05-26 Joe Shaw <joeshaw at novell.com>
* hald/linux/net_class_device.c (parse_scanning_token): We're
likely to get multiple SIOCGIWFREQ tokens. If it's lower than
1000, then it's the channel and not the frequency. Ugh.
Index: net_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/net_class_device.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/net_class_device.c 26 May 2004 19:54:45 -0000 1.7
+++ b/net_class_device.c 26 May 2004 20:17:13 -0000 1.8
@@ -596,6 +596,7 @@
parse_scanning_token (struct iw_event *iwe, APInfo *old_ap)
{
APInfo *ap;
+ float val;
if (iwe->cmd == SIOCGIWAP)
ap = g_new0 (APInfo, 1);
@@ -611,7 +612,15 @@
break;
case SIOCGIWFREQ:
- ap->freq = iw_freq2float(&(iwe->u.freq));
+ /*
+ * If the value is less than 1000, then it's the channel.
+ * Otherwise, it's the frequency. I swear to god the
+ * iwlib code is like this.
+ */
+ val = iw_freq2float(&(iwe->u.freq));
+
+ if (val > 1000)
+ ap->freq = val;
break;
case SIOCGIWESSID:
More information about the hal-commit
mailing list