mirror of
https://github.com/GiovanniGrieco/bcm43602-linux-workaround.git
synced 2024-12-22 04:49:53 +00:00
First commit
This commit is contained in:
commit
24aaa91df1
4 changed files with 93 additions and 0 deletions
31
README.md
Normal file
31
README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Broadcom BCM43602 workaround
|
||||||
|
|
||||||
|
This is a quick and dirty trick to take control of this misbehaving network
|
||||||
|
card.
|
||||||
|
|
||||||
|
Scripts are tested on Fedora 29. If you have any problems, please file an issue
|
||||||
|
here or via email at _corsaro [AT] fedoraproject [DOT] com_.
|
||||||
|
|
||||||
|
Note that I did not want to package this workaround because it's, well, _dirty_.
|
||||||
|
It does not fix the problem, just makes things bearable.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
```
|
||||||
|
# ./install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Control the service
|
||||||
|
```
|
||||||
|
# systemctl start broadcom
|
||||||
|
# systemctl stop broadcom
|
||||||
|
# systemctl restart broadcom
|
||||||
|
```
|
||||||
|
|
||||||
|
## Uninstall
|
||||||
|
```
|
||||||
|
# systemctl stop broadcom
|
||||||
|
# systemctl disable broadcom
|
||||||
|
# rm /usr/local/bin/broadcomctl
|
||||||
|
# rm /etc/systemd/system/broadcom.service
|
||||||
|
```
|
||||||
|
|
16
broadcom.service
Normal file
16
broadcom.service
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[Unit]
|
||||||
|
Description=bring up Broadcom network connectivity
|
||||||
|
|
||||||
|
# make sure we run it as late as possible
|
||||||
|
After=wpa-supplicant.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/local/bin/broadcomctl start
|
||||||
|
ExecStop=/usr/local/bin/broadcomctl stop
|
||||||
|
ExecReload=/usr/local/bin/broadcomctl restart
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical.target
|
||||||
|
|
34
broadcomctl
Executable file
34
broadcomctl
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/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
|
||||||
|
|
12
install.sh
Normal file
12
install.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
echo "Please give me the root power!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp broadcomctl /usr/local/bin/
|
||||||
|
cp broadcom.service /etc/systemd/system/
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable broadcom
|
Loading…
Reference in a new issue