Created attachment 54531 [details] [review] Use iwgetid to detect wireless cards pm/power.d/wireless currently tries to detect wireless interfaces by checking the existence of /sys/class/net/$1/wireless directory. This directory has been made optional and deprecated around 2009 (See WIRELESS_EXT_SYSFS kernel configuration option). As pm/power.d/wireless is using iwconfig in wireless-tools to set the power saving options we would probably be better off using wireless-tools to detect whether the interface is a wireless interface or not. Man page for iwgetid command documents "iwgetid --protocol" being a reliable way to check whether the interface supports Wireless Extension or not. The attached patch has been tested using iwlagn driver on Linux 3.1.0 with WIRELESS_EXT_SYSFS disabled.
'wireless-tools' is deprecated in favour of 'iw', so wouldn't this just create extra dependency on a obsolete tool?
(In reply to comment #1) > 'wireless-tools' is deprecated in favour of 'iw', so wouldn't this just > create extra dependency on a obsolete tool? I seem to have said that as wireless-tools was already used for setting power saving options, it would also make sense to use wireless-tools for detecting which interfaces were supported. I think that would have made sense even when wireless-tools itself was deprecated, unless there was an active effort to convert pm-utils to use 'iw'. Having said that, I'm happy for this issue to be closed as it doesn't seem to be a problem for anyone else, and I'm not currently using pm-utils either.
pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.