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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 IWCONFIG=iwconfig 1 IW=/usr/sbin/iw
2 2
3 if [ x$CONTROL_WIFI_POWER = x1 ] ; then 3 if [ ! -x $IW ]; then
4 log "VERBOSE" "No $IW program, WiFi power setting is disabled."
5 elif [ x$CONTROL_WIFI_POWER = x1 ] ; then
4 if [ $ON_AC -eq 1 ] ; then 6 if [ $ON_AC -eq 1 ] ; then
5 power_mgmt="off" 7 power_mgmt="off"
6 else 8 else
7 power_mgmt="on" 9 power_mgmt="on"
8 fi 10 fi
9 11
10 for DEVICE in /sys/class/net/* ; do 12 for DEVICE in /sys/class/net/* ; do
11 if [ -d $DEVICE/wireless ]; then 13 if [ -d $DEVICE/phy80211 ]; then
12 dev=`basename $DEVICE` 14 dev=`basename $DEVICE`
13 $IWCONFIG $dev power $power_mgmt 15 $IW $dev set power_save $power_mgmt
14 ret=$? 16 ret=$?
15 if [ "$ret" = "0" ]; then 17 if [ "$ret" = "0" ]; then
16 log "VERBOSE" "Power Management set to $power_mgmt for $dev." 18 log "VERBOSE" "Power Management set to $power_mgmt for $dev."
17 else 19 else
18 log "VERBOSE" "Failed to set Power Management to $power_mgmt for $dev." 20 log "VERBOSE" "Failed to set Power Management to $power_mgmt for $dev."
19 fi 21 fi
20 fi 22 fi
21 done 23 done
22 else 24 else
23 log "VERBOSE" "WiFi power setting is disabled." 25 log "VERBOSE" "WiFi power setting is disabled."
24 fi 26 fi
OLDNEW
« 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