Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Unified Diff: laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt

Issue 4675003: laptop-mode-tools: switch wifi support to be nl80211-only (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/laptop-mode-tools.git@master
Patch Set: remove wext support per review comments Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
diff --git a/laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-powermgmt b/laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
similarity index 68%
rename from laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-powermgmt
rename to laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
index 2efb1a661353ffa4f6113cc99ea73319ea48ecc9..934d080bf7a4a20f8725b6e346b5a32c7ebaa363 100755
--- a/laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-powermgmt
+++ b/laptop-mode-tools_1.52/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
@@ -1,6 +1,8 @@
-IWCONFIG=iwconfig
+IW=/usr/sbin/iw
-if [ x$CONTROL_WIFI_POWER = x1 ] ; then
+if [ ! -x $IW ]; then
+ log "VERBOSE" "No $IW program, WiFi power setting is disabled."
+elif [ x$CONTROL_WIFI_POWER = x1 ] ; then
if [ $ON_AC -eq 1 ] ; then
power_mgmt="off"
else
@@ -8,9 +10,9 @@ if [ x$CONTROL_WIFI_POWER = x1 ] ; then
fi
for DEVICE in /sys/class/net/* ; do
- if [ -d $DEVICE/wireless ]; then
+ if [ -d $DEVICE/phy80211 ]; then
dev=`basename $DEVICE`
- $IWCONFIG $dev power $power_mgmt
+ $IW $dev set power_save $power_mgmt
ret=$?
if [ "$ret" = "0" ]; then
log "VERBOSE" "Power Management set to $power_mgmt for $dev."
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698