summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-05-23 17:29:47 +0200
committerDanny Kukawka <danny.kukawka@web.de>2008-05-23 17:29:47 +0200
commitd5d0b8cd48d07b5854565d9ad2c4dcc92fdda2e7 (patch)
tree74bc148f3d24aea13f66fdc3c4fca7faa459b00f
parent8a0c16153762b27ae84e030576b5e8ec0878e4dd (diff)
use 'phy80211' instead of 'wiphy' symlink to detect wireless
When hal wants to determine whether a device is wireless or not, it looks up the 'wiphy' symlink that only existed in unreleased versions of cfg80211, mainline uses 'phy80211' now.
-rw-r--r--hald/linux/device.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 99450d0e..07605400 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -533,7 +533,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
533 const char *parent_subsys; 533 const char *parent_subsys;
534 char bridge_path[HAL_PATH_MAX]; 534 char bridge_path[HAL_PATH_MAX];
535 char wireless_path[HAL_PATH_MAX]; 535 char wireless_path[HAL_PATH_MAX];
536 char wiphy_path[HAL_PATH_MAX]; 536 char phy80211_path[HAL_PATH_MAX];
537 struct stat s; 537 struct stat s;
538 dbus_uint64_t mac_address = 0; 538 dbus_uint64_t mac_address = 0;
539 539
@@ -554,9 +554,10 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
554 } 554 }
555 555
556 snprintf (bridge_path, HAL_PATH_MAX, "%s/bridge", sysfs_path); 556 snprintf (bridge_path, HAL_PATH_MAX, "%s/bridge", sysfs_path);
557 /* wireless extensions */
557 snprintf (wireless_path, HAL_PATH_MAX, "%s/wireless", sysfs_path); 558 snprintf (wireless_path, HAL_PATH_MAX, "%s/wireless", sysfs_path);
558 /* wireless dscape stack e.g. from rt2500pci driver*/ 559 /* cfg80211 */
559 snprintf (wiphy_path, HAL_PATH_MAX, "%s/wiphy", sysfs_path); 560 snprintf (phy80211_path, HAL_PATH_MAX, "%s/phy80211", sysfs_path);
560 parent_subsys = hal_device_property_get_string (parent_dev, "info.subsystem"); 561 parent_subsys = hal_device_property_get_string (parent_dev, "info.subsystem");
561 562
562 if (parent_subsys && strcmp(parent_subsys, "bluetooth") == 0) { 563 if (parent_subsys && strcmp(parent_subsys, "bluetooth") == 0) {
@@ -565,7 +566,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
565 hal_device_add_capability (d, "net.bluetooth"); 566 hal_device_add_capability (d, "net.bluetooth");
566 hal_device_property_set_uint64 (d, "net.bluetooth.mac_address", mac_address); 567 hal_device_property_set_uint64 (d, "net.bluetooth.mac_address", mac_address);
567 } else if ((stat (wireless_path, &s) == 0 && (s.st_mode & S_IFDIR)) || 568 } else if ((stat (wireless_path, &s) == 0 && (s.st_mode & S_IFDIR)) ||
568 (stat (wiphy_path, &s) == 0 && (s.st_mode & S_IFDIR))) { 569 (stat (phy80211_path, &s) == 0 && (s.st_mode & S_IFDIR))) {
569 hal_device_property_set_string (d, "info.product", "WLAN Interface"); 570 hal_device_property_set_string (d, "info.product", "WLAN Interface");
570 hal_device_property_set_string (d, "info.category", "net.80211"); 571 hal_device_property_set_string (d, "info.category", "net.80211");
571 hal_device_add_capability (d, "net.80211"); 572 hal_device_add_capability (d, "net.80211");