Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443530 - =sys-power/pm-utils-1.4.1-r3: Check /sys/class/net/$1/phy80211 instead of /sys/class/net/$1/wireless in /usr/lib/pm-utils/power.d/wireless (?)
Summary: =sys-power/pm-utils-1.4.1-r3: Check /sys/class/net/$1/phy80211 instead of /sy...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-16 16:33 UTC by Florian Klink
Modified: 2015-07-31 15:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Klink 2012-11-16 16:33:04 UTC
please look at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618878


To fix wireless power saving in the pm-utils script, you need to apply the following patch to /usr/lib/pm-utils/power.d/wireless:

--- wireless.orig       2011-04-12 13:27:38.000000000 +0200
+++ wireless    2011-09-20 21:53:38.425880522 +0200
@@ -18,7 +18,7 @@
     # Don't do anything if we cannot find a driver for this iface.
     [ -L "/sys/class/net/$1/device/driver" ] || return 1
     # Skip if not a wireless card.
-    [ -d "/sys/class/net/$1/wireless" ] || return 1
+    [ -d "/sys/class/net/$1/phy80211" ] || return 1
     # Also don't do anything if the device is disabled
     [ "$(cat /sys/class/net/$1/device/enable)" = "1" ] || return 1
     driver="$(readlink "/sys/class/net/$1/device/driver")"
@@ -76,4 +76,4 @@
     *) exit $NA ;;
 esac
 
-exit 0
\ No newline at end of file
+exit 0
Comment 1 Samuli Suominen gentoo-dev 2014-06-04 20:12:38 UTC
(In reply to Florian Klink from comment #0)
> please look at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618878

Looks like it's still undone.

> -    [ -d "/sys/class/net/$1/wireless" ] || return 1
> +    [ -d "/sys/class/net/$1/phy80211" ] || return 1

Can't we leave both these in? As in, check both?