hal: Branch 'origin'

Danny Kukawka dkukawka at kemper.freedesktop.org
Tue Nov 14 09:31:29 PST 2006


 hald/linux/device.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

New commits:
diff-tree cb2d58efd6283e92edb12067b15358c44de3c99f (from 984a8a9d3c82ae948aedcd3bb8136ee65aca3b2e)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Mon Nov 13 15:59:45 2006 +0100

    fixed detection of wireless devices with dscape kernel stack
    
    Fixes detection of wireless devices with dscape stack as e.g.
    from the rt2500pci kernel module. Check for wiphy directory
    in sysfs to identify as wireless network device.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 9f1a86a..6c8c259 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -191,11 +191,16 @@ net_add (const gchar *sysfs_path, const 
 	if (media_type == ARPHRD_ETHER) {
 		const char *addr;
 		char wireless_path[HAL_PATH_MAX];
+		char wiphy_path[HAL_PATH_MAX];
 		gboolean is_wireless;
 		struct stat s;
 
 		snprintf (wireless_path, HAL_PATH_MAX, "%s/wireless", sysfs_path);
-                if (stat (wireless_path, &s) == 0 && (s.st_mode & S_IFDIR)) { 
+		/* wireless dscape stack e.g. from rt2500pci driver*/
+		snprintf (wiphy_path, HAL_PATH_MAX, "%s/wiphy", sysfs_path);
+
+                if ((stat (wireless_path, &s) == 0 && (s.st_mode & S_IFDIR)) ||
+		    (stat (wiphy_path, &s) == 0) && (s.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");


More information about the hal-commit mailing list