Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework the WiFi scripts to suit the Clara 2E
- Loading branch information
1 parent
7528598
commit fc25e3f
Showing
2 changed files
with
61 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
#! /bin/sh | ||
|
||
grep -q '^sdio_wifi_pwr\b' /proc/modules || exit 1 | ||
grep -q "^${WIFI_MODULE}\b" /proc/modules || exit 1 | ||
|
||
SCRIPTS_DIR=$(dirname "$0") | ||
PRE_DOWN_SCRIPT=$SCRIPTS_DIR/wifi-pre-down.sh | ||
[ -e "$PRE_DOWN_SCRIPT" ] && $PRE_DOWN_SCRIPT | ||
|
||
killall udhcpc default.script wpa_supplicant 2> /dev/null | ||
HAS_SDIO_WIFI_PWR=1 | ||
[ "$WIFI_MODULE" = moal ] && HAS_SDIO_WIFI_PWR=0 | ||
|
||
killall -q udhcpc default.script | ||
|
||
wpa_cli -i "$INTERFACE" terminate | ||
[ "$WIFI_MODULE" = dhd ] && wlarm_le -i "$INTERFACE" down | ||
ifconfig "$INTERFACE" down | ||
|
||
sleep 0.2 | ||
|
||
rmmod "$WIFI_MODULE" | ||
rmmod sdio_wifi_pwr | ||
|
||
[ "$WIFI_MODULE" = moal ] && rmmod mlan | ||
|
||
if [ "$HAS_SDIO_WIFI_PWR" -eq 1 ]; then | ||
rmmod sdio_wifi_pwr | ||
else | ||
# CM_WIFI_CTRL | ||
ioctl -q -v 0 /dev/ntx_io 208 | ||
fi | ||
|
||
POST_DOWN_SCRIPT=$SCRIPTS_DIR/wifi-post-down.sh | ||
[ -e "$POST_DOWN_SCRIPT" ] && $POST_DOWN_SCRIPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters