diff options
author | John Klug <john.klug@multitech.com> | 2023-01-04 19:49:18 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2023-01-10 16:42:56 -0600 |
commit | b2512f0e210fc3f2d1eeeefa7be37a20b9af26ad (patch) | |
tree | 487589b63fd165004cb687fc367853224830b280 /recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh | |
parent | a2a00ca0f5c8a10ce2dfe2dac8c7ef71c8074662 (diff) | |
download | meta-multitech-atmel-b2512f0e210fc3f2d1eeeefa7be37a20b9af26ad.tar.gz meta-multitech-atmel-b2512f0e210fc3f2d1eeeefa7be37a20b9af26ad.tar.bz2 meta-multitech-atmel-b2512f0e210fc3f2d1eeeefa7be37a20b9af26ad.zip |
Add WiFi Station/AP mode
Diffstat (limited to 'recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh')
-rwxr-xr-x | recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh b/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh index ba65254..606f069 100755 --- a/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh +++ b/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh @@ -5,9 +5,33 @@ killall -9 bluetoothd rm -rf /var/run/wpa_supplicant/ sleep 2 +# Find the wifi interfaces +ints=$(find -L /sys/class/net -maxdepth 2 -name phy80211) + +# Remove the links with the ip command. +for phy in $ints ; do + dir=$(dirname $phy) + vap=$(basename $dir) + echo Setting $vap down + logger -p daemon.alert Setting $vap down + ip link set $vap down +done + +# So ifdown is not confused, +# make sure ifup/ifdown is now +# in the down state. +if [[ -x /sbin/ifdown ]] ; then + for phy in $ints ; do + dir=$(dirname $phy) + vap=$(basename $dir) + logger -p daemon.alert ifdown $vap + ifdown $vap + done +fi + modules=" "$(lsmod)" " ### COMMON HAL MODULES -for mod in bnep rfcomm rsi_btsdio rsi_btusb rsi_bt91x rsi_sdio rsi_usb rsi_91x mac80211 cfg80211 bluetooth ; do +for mod in bnep rfcomm rsi_btsdio rsi_btusb rsi_bt91x rsi_sdio rsi_usb rsi_usb_sta_ap rsi_91x_sta_ap rsi_91x mac80211 cfg80211 bluetooth ; do if [[ ${modules} =~ [[:space:]]${mod}[[:space:]] ]] ; then result+=$(rmmod $mod 2>&1) last=$? |