ccimx6ul: suspend: unload wireless module always before suspending
The suspend script was unloading the wireless module driver *only* if the interface 'wlan0' was previously up. If the interface is down the module does not unload and the system fails to suspend. This patch removes the module always if it appears in the list of loaded modules. While on it, move the unloading of wireless after the unloading of Bluetooth, to be in line with the reversed order in which they are loaded on the resume_interfaces() call. Signed-off-by: Hector Palacios <hector.palacios@digi.com> https://jira.digi.com/browse/DEL-3241
This commit is contained in:
parent
e441b6fec5
commit
e7a21cdad0
|
|
@ -26,12 +26,15 @@ usage() {
|
|||
}
|
||||
|
||||
suspend_interfaces() {
|
||||
if grep -qs '^wlan0' /var/run/ifstate; then
|
||||
ifdown wlan0 && up_wlan_on_resume="1" && sleep 0.5 && rmmod wlan
|
||||
fi
|
||||
if hcitool -i hci0 dev >/dev/null 2>&1; then
|
||||
hciconfig hci0 down && up_hci0_on_resume="1" && sleep 0.5
|
||||
fi
|
||||
if grep -qs '^wlan0' /var/run/ifstate; then
|
||||
ifdown wlan0 && up_wlan_on_resume="1" && sleep 0.5
|
||||
fi
|
||||
if grep -qs '^wlan' /proc/modules; then
|
||||
rmmod wlan
|
||||
fi
|
||||
}
|
||||
|
||||
resume_interfaces() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue