Wifi stops working after suspend/resume

Hi everyone, I'm trying to get wifi to work in an old Macbook.

$ inxi -N
Network:
Device-1: NVIDIA MCP79 Ethernet driver: nfe
Device-2: Broadcom BCM4322 802.11a/b/g/n Wireless LAN driver: bwn_pci

I followed the instructions in this thread: BCM4322 - WIFI Card - Freebsd 11.2 not working. In short, I compiled a new kernel with the BWN_GPL_PHY and BWN_DEBUG options enabled, installed firmware from net/bwn-firmware-kmod, and loaded the firmware bwn_v4_n_ucode. After this I was able to configure wlan0/bwn0 and wifi works.

Until I suspend the laptop and resume. Then it doesn't work any more. I tried unloading the firmware and destroying wlan0 before suspend, but after resume, even if I load the firmware again and create the wlan0 interface, it won't work. The strange thing is that I can unload/reload the firmware without problems before suspend. It's only after the resume that things stop working. Does anyone know a solution?
 
My WIFI stucks very seldom, too. For my setup it is sufficient to run
Code:
ifconfig wlan down
sleep 1
ifconfig wlan up
The thread you mention is about FreeBSD-11.2, I assume you run a more up to date version as FreeBSD-12.x or FreeBSD-13.x, am I correct?
 
Yes, I'm running 13.0-RELEASE. Unfortunately bringing the interface down and then up doesn't help me. Do you also have the BCM4322? Does it work with suspend/resume?
 
I have an Intel chip or module. The Id is as below.
Code:
vendor=0x8086 device=0x0082 subvendor=0x8086 subdevice=0x1301 class=0x028000
When I close the LCD by moving it towards the keyboard and let it in this "transport" condition for some time the WIFI does not work sometimes after bringing the Laptop to normal operation again.
 
Back
Top