On my system the BCM4331 card is dom0:04_00.0
Create a new vm, so we have the same settings. Use AppVM, fedora-29 as the template and check provides networking. Set your virtualization mode to HVM.
Start the vm and open a terminal.
[vm]
$ sudo dnf update
$ sudo dnf install gcc-plugin-devel bison flex patch
$ cp -r /lib/modules/($uname -r)/build /tmp/build
$ make -C /tmp/build gcc-plugins
$ git clone https://github.com/fabiomartino/broadcom-wl.git
$ cd broadcom-wl/
$ wget https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
$ tar zxvf hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
$ patch -p1 < linux-415.patch
$ make -C /tmp/build M=$PWD
$ sudo cp -a /lib/modules /rw/modules
$ sudo mkdir /rw/modules/$(uname -r)/kernel/drivers/net/wireless/broadcom/wl
$ sudo cp wl.ko /rw/modules/$(uname -r)/kernel/drivers/net/wireless/broadcom/wl/
$ sudo mount --bind /rw/modules /lib/modules
$ systemctl --no-block restart systemd-udevd
$ sudo depmod -a
$ sudo modprobe wl
Next you need to edit your /rw/config/rc.local file and add the following 4 lines:
mount --bind /rw/modules /lib/modules
systemctl --no-block restart systemd-udevd
rmmod b43 ssb bcma
modprobe wl
$ sudo chmod +x /rw/config/rc.local
$ poweroff
Add the pci card to the vm with permissive=true
[dom0]
$ qvm-pci attach --persistent --option permissive=true <vm-name> dom0:04_00.0
$ qvm-start <vm-name>
Now check to see if you scan for networks. With this card you cannot spoof the MAC address.
You are a life saver!
I got close to quitting Qubes since I was not able to get the wifi working properly but everything is working great right now. Thanks so much!!
Though I'm a bit disappointed by my troubleshooting skills. Applying a patch for the driver never crossed my mind.