2016-09-01 07:05:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Disable wifi, and remove all modules.
|
|
|
|
|
|
|
|
killall udhcpc default.script wpa_supplicant 2>/dev/null
|
|
|
|
|
|
|
|
wlarm_le -i eth0 down
|
|
|
|
ifconfig eth0 down
|
|
|
|
|
2016-12-12 22:36:07 +00:00
|
|
|
# Some sleep in between may avoid system getting hung
|
|
|
|
# (we test if a module is actually loaded to avoid unneeded sleeps)
|
2017-04-11 09:28:01 +00:00
|
|
|
if lsmod | grep -q "${WIFI_MODULE}"; then
|
2016-12-12 22:36:07 +00:00
|
|
|
usleep 200000
|
2017-04-09 08:42:16 +00:00
|
|
|
rmmod -r "${WIFI_MODULE}"
|
2016-12-12 22:36:07 +00:00
|
|
|
fi
|
2017-04-11 09:28:01 +00:00
|
|
|
if lsmod | grep -q sdio_wifi_pwr; then
|
2016-12-12 22:36:07 +00:00
|
|
|
usleep 200000
|
|
|
|
rmmod -r sdio_wifi_pwr
|
|
|
|
fi
|