From 1417ea94c29adb538d3d74b95023246049707a7d Mon Sep 17 00:00:00 2001 From: Matias Nitsche Date: Fri, 8 Feb 2019 19:13:39 -0300 Subject: [PATCH] PRSTUX: wifi/suspend fixes --- platform/sony-prstux/set-wifi.sh | 7 +++---- platform/sony-prstux/suspend.sh | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/platform/sony-prstux/set-wifi.sh b/platform/sony-prstux/set-wifi.sh index 3e422e0b7..de0338425 100755 --- a/platform/sony-prstux/set-wifi.sh +++ b/platform/sony-prstux/set-wifi.sh @@ -5,10 +5,9 @@ if [ "$1" = "on" ]; then wmiconfig -i wlan0 --wlan enable wmiconfig -i wlan0 --setreassocmode 0 wmiconfig -i wlan0 --power maxperf - /sbin/wpa_supplicant -B -i wlan0 -D wext -C /var/run/wpa_supplicant -f /var/log/wpa_supplicant.log + echo "WiFi Enabled" else - if [ "$(pidof wpa_supplicant)" != "" ]; then - kill "$(pidof wpa_supplicant)" - fi + wmiconfig -i wlan0 --abortscan wmiconfig -i wlan0 --wlan disable + echo "Wifi Disabled" fi diff --git a/platform/sony-prstux/suspend.sh b/platform/sony-prstux/suspend.sh index 254a0932c..f0eef68d6 100755 --- a/platform/sony-prstux/suspend.sh +++ b/platform/sony-prstux/suspend.sh @@ -2,12 +2,12 @@ set -x -# enter sleep, disabling all devices except CPU -echo mem >/sys/power/state - # disable WiFi ./set-wifi.sh off +# enter sleep, disabling all devices except CPU +echo mem >/sys/power/state + # set minimum CPU frequency during sleep echo powersave >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor