bcm43602-linux-workaround/broadcomctl
Giovanni Grieco 24aaa91df1 First commit
2018-12-09 10:57:56 +01:00

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