mirror of
https://github.com/GiovanniGrieco/bcm43602-linux-workaround.git
synced 2024-11-14 13:25:25 +00:00
35 lines
542 B
Text
35 lines
542 B
Text
|
#!/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
|
||
|
|