Bug 217183 - AR9462/ath9k: running wifi scan freezes the laptop
Summary: AR9462/ath9k: running wifi scan freezes the laptop
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-12 19:27 UTC by primalmotion
Modified: 2023-04-14 09:30 UTC (History)
3 users (show)

See Also:
Kernel Version: >= 6.2.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
journalctl -k output on kernel 6.2.6 (70.70 KB, text/plain)
2023-03-19 04:46 UTC, malocascio
Details

Description primalmotion 2023-03-12 19:27:05 UTC
Since 6.2.1 (and onward), running a wifi scan freezes the laptop completely. The screen is frozen, caps lock led is on, and there's nothing left to do but force reboot.

Step to reproduce:
1) iwctl station wlan0 scan

This works just fine on 6.1.12 and below. 
This is 100% reproducible. 

I can't find any relevant log. I tried to collect dmesg and journalctl -k while I was performing the command, but the laptop freezes before I can get anything.

Card: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)
Driver: ath9k

module parameters:
/sys/module/ath9k/parameters/blink 0
/sys/module/ath9k/parameters/bt_ant_diversity 0
/sys/module/ath9k/parameters/btcoex_enable 1
/sys/module/ath9k/parameters/led_active_high -1
/sys/module/ath9k/parameters/ps_enable 1
/sys/module/ath9k/parameters/use_chanctx 0
/sys/module/ath9k/parameters/use_msi 0

Let me know if you need any additional logs from other places I don't know
Comment 1 Kalle Valo 2023-03-13 10:44:51 UTC
Can you do a git bisect to find the commit which broke this? Also setting up a netconsole to catch the logs before the crash is nice, but you need ethernet for that.
Comment 2 primalmotion 2023-03-13 17:08:10 UTC
I did more tests playing with the driver parameters. What seems to cause the freeze is enabling the option btcoex_enable=1. Without this option set, scanning works as expected.
Comment 3 Toke Høiland-Jørgensen 2023-03-13 21:05:44 UTC
Does 6.1 work regardless of the value of the btcoex_enable parameter? In fact, nothing has really changed *at all* in the driver between those two versions apart from compile fixes. So that suggest this is a mac80211-induced regression; perhaps the same underlying issue as https://bugzilla.kernel.org/show_bug.cgi?id=217119 ?
Comment 4 primalmotion 2023-03-13 21:14:01 UTC
Yes, it does work with btcoex_enable on 6.1
Comment 5 Toke Høiland-Jørgensen 2023-03-15 13:52:57 UTC
Hmm, okay, don't really see any obvious connection here, then. Not sure we can get any closer without a bisect and/or a kernel log when the crash happens :(
Comment 6 malocascio 2023-03-19 04:45:11 UTC
I've been having the same issue on Arch Linux. The 6.1.9 kernel works fine, but kernels 6.2 and above are unstable. The system isn't always totally unusable, though, so I was able to get the output of `journalctl -k`. I have attached it here.

The system is an Acer C720 with an Atheros AR9462 wireless interface.
Comment 7 malocascio 2023-03-19 04:46:31 UTC
Created attachment 303981 [details]
journalctl -k output on kernel 6.2.6
Comment 8 Toke Høiland-Jørgensen 2023-04-13 21:45:25 UTC
Ah! That stack trace did indeed narrow it down, and I'm pretty sure I see the change that caused this. Sent a fix, here: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk
Comment 9 primalmotion 2023-04-14 03:41:12 UTC
I confirm this patch fixes my issue! Thanks!
Comment 10 Toke Høiland-Jørgensen 2023-04-14 09:30:46 UTC
Great, thank you for testing!

Note You need to log in before you can comment on or make changes to this bug.