Upon upgrading my Kernel on my Ubuntu 20.04 LTS to the HWE stack, I ran into the issue that Wifi stopped working.
Turns out, it only refused to listen/transmit on channels 12 and higher. My router was using channel 13, so no luck.
After some research, I found that you can set the Wifi stack to obey your country’s regulatory requirements. In Germany, channels 12 and 13 are fine to use.
Others had the same problem back in the day, apparently. But the proposed solution did not work or did not work anymore.
In my case, with a Qualcomm Atheros AR93xx using
REGDOMAIN=DE or trying to use
iw reg set DE did not help.
What helped after all was setting
ieee80211_regdom=DE when loading the
cfg80211 module. So, I somehow doubt that the issue was the
ath9k module itself.
/etc/modprobe.d/cfg80211.conf with content:
options cfg80211 ieee80211_regdom=DE
Obviously, you set it to the 2-digit ISO code of the place you live at.
For Germany, this results in the expected 2.4 GHz band channel list (
iw list | grep -A 15 Frequencies:):
* 2412 MHz  (20.0 dBm) * 2417 MHz  (20.0 dBm) * 2422 MHz  (20.0 dBm) * 2427 MHz  (20.0 dBm) * 2432 MHz  (20.0 dBm) * 2437 MHz  (20.0 dBm) * 2442 MHz  (20.0 dBm) * 2447 MHz  (20.0 dBm) * 2452 MHz  (20.0 dBm) * 2457 MHz  (20.0 dBm) * 2462 MHz  (20.0 dBm) * 2467 MHz  (20.0 dBm) * 2472 MHz  (20.0 dBm) * 2484 MHz  (disabled)