summaryrefslogtreecommitdiff
path: root/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh')
-rwxr-xr-xrecipes-kernel/rsi-91x/files/rs9113_remove_modules.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh b/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh
new file mode 100755
index 0000000..f468545
--- /dev/null
+++ b/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+killall -9 wpa_supplicant
+killall -9 hostapd
+killall -9 bluetoothd
+rm -rf /var/run/wpa_supplicant/
+sleep 2
+
+modules=" "$(lsmod)" "
+### COMMON HAL MODULES
+for mod in rsi_btsdio rsi_btusb rsi_bt91x rsi_sdio rsi_usb rsi_91x mac80211 cfg80211 bluetooth rfkill ; do
+ if [[ ${modules} =~ [[:space:]]${mod}[[:space:]] ]] ; then
+ result+=$(rmmod $mod 2>&1)
+ last=$?
+ if [[ -n $result ]] ; then
+ echo "$result" | logger -s -p daemon.notice
+ fi
+ fi
+done
+
+if ((last > 0)) ; then
+ echo "${result}" | logger -s -p daemon.notice
+ lsmod | grep rsi | logger -s -p daemon.notice
+fi
+UNBIND=/sys/devices/soc0/soc/2100000.aips-bus/2190000.usdhc/driver/unbind
+if [[ -f $UNBIND ]] ; then
+ echo 2190000.usdhc >$UNBIND
+fi
+