diff -u hal-0.5.7.1/debian/changelog hal-0.5.7.1/debian/changelog --- hal-0.5.7.1/debian/changelog +++ hal-0.5.7.1/debian/changelog @@ -1,3 +1,10 @@ +hal (0.5.7.1-0ubuntu14) edgy; urgency=low + + * debian/patches/19_fix_wifi_detection.patch: Switch to sysfs based + wifi detection. Closes: LR#59981 + + -- Soren Hansen Mon, 25 Sep 2006 15:44:28 +0200 + hal (0.5.7.1-0ubuntu13) edgy; urgency=low * debian/patches/02_ignored_volumes.patch: Ignore unmounted only in patch2: unchanged: --- hal-0.5.7.1.orig/debian/patches/19_fix_wifi_detection.patch +++ hal-0.5.7.1/debian/patches/19_fix_wifi_detection.patch @@ -0,0 +1,63 @@ +diff -ur hal-0.5.7.1.orig/hald/linux2/classdev.c hal-0.5.7.1/hald/linux2/classdev.c +--- hal-0.5.7.1.orig/hald/linux2/classdev.c 2006-09-25 23:16:52.300588000 +0200 ++++ hal-0.5.7.1/hald/linux2/classdev.c 2006-09-25 23:22:08.050588000 +0200 +@@ -210,53 +210,23 @@ + + media_type = hal_device_property_get_int (d, "net.arp_proto_hw_id"); + if (media_type == ARPHRD_ETHER) { +- FILE *f; + gboolean is_wireless; + const char *addr; ++ char wireless_path[HAL_PATH_MAX]; ++ struct stat statbuf; + +- 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, HAL_PATH_MAX, "%s/wireless", sysfs_path); ++ if (stat (wireless_path, &statbuf) == 0 && (statbuf.st_mode & S_IFDIR)) { + 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"); ++ is_wireless = TRUE; + } else { + 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"); ++ is_wireless = FALSE; + } + + addr = hal_device_property_get_string (d, "net.address");