Issues with Atheros AR9462

Hello everyone,
I have a laptop with an Atheros AR9462, which is supported by FreeBSD with the ath driver. Indeed everything works, but randomly the wireless card stops working with the ath_hal complaining with:
Code:
ath0: unable to reset hardware; hal status 18.
As the man for ath(4) says, in sys/dev/ath/ath_hal/ah.h there are all the error codes, and the error code 18 stands for HAL_INV_PMODE, with comment "couldn't bring out of sleep state".
The only solution that I found to get the card working again is a reboot.
I searched online for this, and what I found is that the Atheros MAC supports 3 power modes: "force-awake", "full-sleep" and "network-sleep". In network-sleep mode, the MAC controls whether itself, the radio and the PHY are required to be on (https://wiki.freebsd.org/dev/ath_hal(4)/NetworkSleep), and I think that the problem is here. I tried to debug the card compiling the kernel with AH_DEBUG and ATH_DEBUG and when the hal "crashes", this is the output:
Code:
ABORT LOOP finished for Q: 9, num_pending: 3
ar9300_reset: ar9300_stop_dma_receive failed
ar9300_set_reset_power_on: RTC not waking up for 1000
ath0: ath_chan_set: unable to reset channel %n (%n MHz, flags 0x140), hal status 18

This repeats over and over until I reboot the machine (notice that the frequency, the flags and the channel are always different, this message repeats with every possible channel).

Does anyone have any clues on this? Tested on FreeBSD 12.1-RELEASE and FreeBSD 12.2-BETA3, all the same. (I did not try FreeBSD 13-CURRENT).
Thanks in advance.
 
Back
Top