meta-digi-arm: Remove wifi pre/post actions from suspend script
The suspend script did a ifup/ifdown on wlan0 to workaround issues we had using wireless drivers on some platforms. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
parent
99f55af6d4
commit
a77cd1406d
|
|
@ -31,26 +31,6 @@ suspend_system_time() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend_interfaces() {
|
|
||||||
# 'wlan0' interface on some platforms (ccwmx5xjs, cwme9210, ccardwmx28js)
|
|
||||||
# has problems on suspend-resume, so we workaround it by bringing the
|
|
||||||
# interface down before suspend and bring it up again after resume.
|
|
||||||
# (#35777, #40082)
|
|
||||||
if grep -qs '^wlan0' /var/run/ifstate; then
|
|
||||||
ifdown wlan0 && up_wlan_on_resume="1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
resume_interfaces() {
|
|
||||||
# 'wlan0' interface on some platforms (ccwmx5xjs, cwme9210, ccardwmx28js)
|
|
||||||
# has problems on suspend-resume, so we workaround it by bringing the
|
|
||||||
# interface down before suspend and bring it up again after resume.
|
|
||||||
# (#35777, #40082)
|
|
||||||
if ! grep -qs '^wlan0' /var/run/ifstate; then
|
|
||||||
[ -n "${up_wlan_on_resume}" ] && ifup wlan0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
resume_system_time() {
|
resume_system_time() {
|
||||||
if [ "$(echo /sys/class/rtc/rtc*)" != "/sys/class/rtc/rtc*" ]; then
|
if [ "$(echo /sys/class/rtc/rtc*)" != "/sys/class/rtc/rtc*" ]; then
|
||||||
hwclock -s
|
hwclock -s
|
||||||
|
|
@ -66,14 +46,12 @@ done
|
||||||
if [ -f "${syspower}" ]; then
|
if [ -f "${syspower}" ]; then
|
||||||
# Pre-suspend actions
|
# Pre-suspend actions
|
||||||
suspend_system_time
|
suspend_system_time
|
||||||
suspend_interfaces
|
|
||||||
|
|
||||||
# Suspend the device
|
# Suspend the device
|
||||||
printf "mem" > ${syspower}
|
printf "mem" > ${syspower}
|
||||||
sleep .5
|
sleep .5
|
||||||
|
|
||||||
# Post-resume actions
|
# Post-resume actions
|
||||||
resume_interfaces
|
|
||||||
resume_system_time
|
resume_system_time
|
||||||
else
|
else
|
||||||
printf "\n[ERROR] File ${syspower} not found\n\n"
|
printf "\n[ERROR] File ${syspower} not found\n\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue