Re: NetworkManager and mac80211_hwsim



On Wed, 2009-02-18 at 09:06 +0100, Daniel Wagner wrote:

> +	if (parent_dev != NULL) {
> +		hal_device_property_set_string (d, "info.parent", hal_device_get_udi (parent_dev));
> +		hal_device_property_set_string (d, "net.originating_device", hal_device_get_udi (parent_dev));
> +	} else {
> +		hal_device_property_set_string (d, "info.parent", "/org/freedesktop/Hal/devices/computer");
> +		hal_device_property_set_string (d, "net.originating_device", "/org/freedesktop/Hal/devices/computer");
> +		hal_device_property_set_string (d, "info.linux.driver", "mac80211_hwsim");
> +		parent_dev = hal_device_store_find (hald_get_gdl (), "/org/freedesktop/Hal/devices/computer");
> +		hal_device_property_set_string (parent_dev, "info.linux.driver", "mac80211");
> +	}

This is actually not _that_ bad an idea, because it makes sure everybody
else will properly link up their parent pointer in sysfs. An alternative
that doesn't guarantee that would be to check "is it in the ieee80211
class".

johannes

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]