bcm43602-linux-workaround/broadcomctl

35 lines
542 B
Text
Raw Normal View History

2018-12-09 09:57:56 +00:00
#!/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