mirror of
https://github.com/GiovanniGrieco/bcm43602-linux-workaround.git
synced 2024-12-22 12:59:53 +00:00
34 lines
542 B
Bash
Executable file
34 lines
542 B
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
start_service() {
|
|
echo "Adding brcmfmac"
|
|
modprobe brcmfmac || exit -1
|
|
sleep 3
|
|
echo "Turning radio on"
|
|
nmcli radio wifi on || exit -2
|
|
}
|
|
|
|
stop_service() {
|
|
echo "Turning radio off"
|
|
nmcli radio wifi off || exit -1
|
|
sleep 3
|
|
echo "Removing brcmfmac"
|
|
modprobe -rf brcmfmac || exit -2
|
|
}
|
|
|
|
case $1 in
|
|
start)
|
|
start_service $1
|
|
;;
|
|
stop)
|
|
stop_service $1
|
|
;;
|
|
restart)
|
|
stop_service $1
|
|
sleep 3
|
|
start_service $1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|
|
|