alonbl 14/06/11 22:29:13 Added: laptop-mode-tools-1.64-wireless-sysfsattr.patch Log: Add wireless kernel compatibility, bug#511110, thanks to Stefan Huber (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BF20DC51)
Revision Changes Path 1.1 app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.64-wireless-sysfsattr.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.64-wireless-sysfsattr.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.64-wireless-sysfsattr.patch?rev=1.1&content-type=text/plain Index: laptop-mode-tools-1.64-wireless-sysfsattr.patch =================================================================== commit b340a340256c8fc97ec35a1df9e67ab033765480 Author: Alon Bar-Lev <[email protected]> Date: Sat May 24 12:59:21 2014 +0300 wireless: support both sysfs attr enable/enabled backport of commit 8e8a88373079dffdf7196e2e622c5ade209b4439 Starting with linux kernel 3.13, the sysfs attribute 'enable' for pci devices was renambed to 'enabled'. Support the two notations to allow seamless migration. Signed-off-by: Stefan Huber <[email protected]> diff --git a/usr/share/laptop-mode-tools/modules/wireless-ipw-power b/usr/share/laptop-mode-tools/modules/wireless-ipw-power index 3fd93ec..1579c1f 100755 --- a/usr/share/laptop-mode-tools/modules/wireless-ipw-power +++ b/usr/share/laptop-mode-tools/modules/wireless-ipw-power @@ -71,7 +71,7 @@ if [ x$CONTROL_IPW_POWER = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_IPW # the driver. LINK_TARGET=`readlink $DEVICE/device/driver` LINK_TARGET=${LINK_TARGET##*/} - ENABLED=`cat $DEVICE/device/enable` + ENABLED=`[ -r $DEVICE/device/enabled ] && cat $DEVICE/device/enabled || cat $DEVICE/device/enable` if [ $ENABLED -eq 1 -a "$LINK_TARGET" = "$1" ]; then # add the interface name to the list diff --git a/usr/share/laptop-mode-tools/modules/wireless-iwl-power b/usr/share/laptop-mode-tools/modules/wireless-iwl-power index ffdedec..ce82e1d 100755 --- a/usr/share/laptop-mode-tools/modules/wireless-iwl-power +++ b/usr/share/laptop-mode-tools/modules/wireless-iwl-power @@ -24,7 +24,7 @@ findWifiIfsByDriver () { # the driver. LINK_TARGET=`readlink $DEVICE/device/driver` LINK_TARGET=${LINK_TARGET##*/} - ENABLED=`cat $DEVICE/device/enable` + ENABLED=`[ -r $DEVICE/device/enabled ] && cat $DEVICE/device/enabled || cat $DEVICE/device/enable` if [ $ENABLED -eq 1 -a "$LINK_TARGET" = "$1" ] ; then # add the interface name to the list
