SOURCES: hal-80211.patch (NEW) - added; fixes 80211 devices for me...
aredridel
aredridel at pld-linux.org
Sun Sep 24 21:40:38 CEST 2006
Author: aredridel Date: Sun Sep 24 19:40:38 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added; fixes 80211 devices for me (and simpler code!)
---- Files affected:
SOURCES:
hal-80211.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/hal-80211.patch
diff -u /dev/null SOURCES/hal-80211.patch:1.1
--- /dev/null Sun Sep 24 21:40:38 2006
+++ SOURCES/hal-80211.patch Sun Sep 24 21:40:33 2006
@@ -0,0 +1,58 @@
+--- hal-0.5.7.1-o/hald/linux2/classdev.c 2006-01-28 15:51:18.000000000 -0700
++++ hal-0.5.7.1/hald/linux2/classdev.c 2006-09-24 13:36:35.000000000 -0600
+@@ -210,50 +210,21 @@
+
+ media_type = hal_device_property_get_int (d, "net.arp_proto_hw_id");
+ if (media_type == ARPHRD_ETHER) {
+- FILE *f;
+ gboolean is_wireless;
++ char wireless_path[1024];
+ const char *addr;
+
+ is_wireless = FALSE;
+
+- f = fopen ("/proc/net/wireless", "ro");
+- if (f != NULL) {
+- unsigned int i;
+- unsigned int ifname_len;
+- char buf[128];
+-
+- ifname_len = strlen (ifname);
+-
+- do {
+- if (fgets (buf, sizeof (buf), f) == NULL)
+- break;
+-
+- for (i=0; i < sizeof (buf); i++) {
+- if (isspace (buf[i]))
+- continue;
+- else
+- break;
+- }
+-
+- if (strncmp (ifname, buf + i, ifname_len) == 0) {
+- is_wireless = TRUE;
+- break;
+- }
+-
+- } while (TRUE);
+- fclose (f);
+- }
+-
+- if (is_wireless) {
+ /* Check to see if this interface supports wireless extensions */
+- /*
+- snprintf (wireless_path, SYSFS_PATH_MAX, "%s/wireless", sysfs_path);
+- if (stat (wireless_path, &statbuf) == 0) {
+- */
++ snprintf (wireless_path, 1024, "%s/wireless", sysfs_path);
++ if (access (wireless_path, F_OK) == 0) {
++ is_wireless = TRUE;
+ hal_device_property_set_string (d, "info.product", "WLAN Interface");
+ hal_device_property_set_string (d, "info.category", "net.80211");
+ hal_device_add_capability (d, "net.80211");
+ } else {
++ hal_device_property_set_string (d, "info.product", "WLAN Interface");
+ hal_device_property_set_string (d, "info.product", "Networking Interface");
+ hal_device_property_set_string (d, "info.category", "net.80203");
+ hal_device_add_capability (d, "net.80203");
================================================================
More information about the pld-cvs-commit
mailing list