For completeness, here's a description of the remaining elements of my setup, but keep in mind that it's not necessary to reproduce the issue - only to explain how the logs have looked so far. hostapd cannot switch to a different channel while running; it has to be restarted on the new channel. I'm usually connected to WiFi, and constantly switching between stations depending on connectivity (NetworkManager does this automatically), which means that I'm constantly changing channels. So I have a script that runs `iw dev wlo1 info` every 2 seconds and greps the current channel number from its output (yes I know that `iw` has a warning not to scrape its output because it isn't considered stable; I don't know any other way to do this), and compares it to the channel number from its previous run of `iw`. It then restarts hostapd.service if they don't match, or stops/starts it if one of them is the empty string (meaning the interface had no channel number when `iw` was run). Finally - hostapd does not handle suspend+resume well. It stops working and spams 'handle_probe_req: send failed' into the logs, and it needs to be restarted. So I have a systemd service to automatically restart it on resume - ``` [Unit] After=suspend.target After=hibernate.target Description=restart hostapd after resume from suspend # ...because it stops working and spams the journal with # 'handle_probe_req: send failed' error [Service] Type=simple ExecStart=/usr/bin/systemctl restart hostapd.service [Install] WantedBy=suspend.target WantedBy=hibernate.target ``` I'll leave out the dnsmasq and iptables configuration I had to do, since I can't see how it could be related. > Attachment is a debug patch that add more messages and code trace, please help > to reproduce problem with patches of [2] and attachment. If your kernel enables > dynamic debug, need additional commands to have debug message: > sudo bash -c 'echo -n "module rtw89_core +p" > /sys/kernel/debug/dynamic_debug/control' > sudo bash -c 'echo -n "module rtw89_pci +p" > /sys/kernel/debug/dynamic_debug/control' > Since there are more than one symptoms causing system freeze, please collect > four logs as before. Also please give me two logs that system can normally > suspend/resume, so I can compare their difference. I applied both patches on the latest master; here are the crash logs. With the patches, I am no longer able to trigger the crash merely by suspending and resuming. I have to run `sudo systemctl restart hostapd.service` after hostapd emits the 'handle_probe_req: send failed' errors (which, as described above, happen after suspend+resume). So maybe [2] is making a difference here. I wanted to test with your debug patch and without [2], but the patch application failed unless I applied both together. [2] https://lore.kernel.org/linux-wireless/20240517013350.11278-1-pkshih@realtek.com/