The suggested command executes without error, but phy0
appears to be stuck on 99
regulatory code. Currently running system-imagev3 (at least with 6.0.0-reform2-arm64
kernel)
root@reform:/sys/class/ieee80211# iw --debug reg set US
-- Debug: Sent Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 28
.type = 30 <0x1e>
.flags = 5 <REQUEST,ACK>
.seq = 1672115228
.port = -2134899589
[GENERIC NETLINK HEADER] 4 octets
.cmd = 27
.version = 0
.unused = 0
[PAYLOAD] 8 octets
**07 00 21 00 55 53 00 00 ..!.US..**
--------------------------- END NETLINK MESSAGE ---------------------------
-- Debug: Received Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 36
.type = 2 <ERROR>
.flags = 256 <ROOT>
.seq = 1672115228
.port = -2134899589
[ERRORMSG] 20 octets
.error = 0 "Success"
[ORIGINAL MESSAGE] 16 octets
.nlmsg_len = 16
.type = 30 <0x1e>
.flags = 5 <REQUEST,ACK>
.seq = 1672115228
.port = -2134899589
--------------------------- END NETLINK MESSAGE ---------------------------
root@reform:/home/achasen# iw --debug phy phy0 reg get
-- Debug: Sent Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 28
.type = 30 <0x1e>
.flags = 5 <REQUEST,ACK>
.seq = 1672115598
.port = 591398101
[GENERIC NETLINK HEADER] 4 octets
.cmd = 31
.version = 0
.unused = 0
[PAYLOAD] 8 octets
08 00 01 00 00 00 00 00 ........
--------------------------- END NETLINK MESSAGE ---------------------------
-- Debug: Received Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 220
.type = 30 <0x1e>
.flags = 0 <>
.seq = 1672115598
.port = 591398101
[GENERIC NETLINK HEADER] 4 octets
.cmd = 31
.version = 1
.unused = 0
[PAYLOAD] 200 octets
08 00 01 00 00 00 00 00 07 00 21 00 39 39 00 00 ..........!.**99**..
b8 00 22 00 3c 00 00 00 08 00 01 00 00 00 00 00 ..".<...........
08 00 02 00 d0 a6 24 00 08 00 03 00 40 b8 25 00 ......$.....@.%.
08 00 04 00 40 9c 00 00 08 00 05 00 00 00 00 00 ....@...........
08 00 06 00 d0 07 00 00 08 00 07 00 00 00 00 00 ................
3c 00 01 00 08 00 01 00 80 00 00 00 08 00 02 00 <...............
20 6e 4e 00 08 00 03 00 80 c9 51 00 08 00 04 00 nN.......Q.....
80 38 01 00 08 00 05 00 00 00 00 00 08 00 06 00 .8..............
b8 0b 00 00 08 00 07 00 00 00 00 00 3c 00 02 00 ............<...
08 00 01 00 80 00 00 00 08 00 02 00 38 34 57 00 ............84W.
08 00 03 00 a0 6a 59 00 08 00 04 00 80 38 01 00 .....jY......8..
08 00 05 00 00 00 00 00 08 00 06 00 b8 0b 00 00 ................
08 00 07 00 00 00 00 00 ........
--------------------------- END NETLINK MESSAGE ---------------------------
phy#0
**country 99: DFS-UNSET**
(2402 - 2472 @ 40), (N/A, 20), (N/A)
(5140 - 5360 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN
(5715 - 5860 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN
-- Debug: Received Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 36
.type = 2 <ERROR>
.flags = 256 <ROOT>
.seq = 1672115598
.port = 591398101
[ERRORMSG] 20 octets
.error = 0 "Success"
[ORIGINAL MESSAGE] 16 octets
.nlmsg_len = 16
.type = 30 <0x1e>
.flags = 5 <REQUEST,ACK>
.seq = 1672115598
.port = 591398101
--------------------------- END NETLINK MESSAGE ---------------------------
The netlink response to iw reg get
does not match US
“Country alpha2” mentioned in driver initialization:
[ 14.841818] ath9k 0000:01:00.0: enabling device (0000 -> 0002)
[ 15.273123] ath: EEPROM regdomain: 0x0
[ 15.273134] ath: EEPROM indicates default country code should be used
[ 15.273136] ath: doing EEPROM country->regdmn map search
[ 15.273139] ath: country maps to regdmn code: 0x3a
[ 15.273142] ath: Country alpha2 being used: US
[ 15.273144] ath: Regpair used: 0x3a
[ 15.353021] ath9k 0000:01:00.0 wlp1s0: renamed from wlan0
I found the following thread which indicates setting a parameter on cfg80211
module may help and it appears to set phy0 to the expected domain. I added a modprode.d file to set the parameter and a dependency for module loading order.
root@reform:/home/achasen# cat /etc/modprobe.d/wifi-regdomain.conf
softdep ath9k pre: cfg80211
options cfg80211 ieee80211_regdom=US
# iw reg get
global
country US: DFS-FCC
(902 - 904 @ 2), (N/A, 30), (N/A)
(904 - 920 @ 16), (N/A, 30), (N/A)
(920 - 928 @ 8), (N/A, 30), (N/A)
(2400 - 2472 @ 40), (N/A, 30), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
(5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
(5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
(5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
(57240 - 71000 @ 2160), (N/A, 40), (N/A)
phy#0
country US: DFS-FCC
(902 - 904 @ 2), (N/A, 30), (N/A)
(904 - 920 @ 16), (N/A, 30), (N/A)
(920 - 928 @ 8), (N/A, 30), (N/A)
(2400 - 2472 @ 40), (N/A, 30), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
(5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
(5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
(5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
(57240 - 71000 @ 2160), (N/A, 40), (N/A)
But this does not appear to enable the frequency for the device:
# iw phy0 info | grep disable
...
* 5500 MHz [100] (disabled)
* 5520 MHz [104] (disabled)
* 5540 MHz [108] (disabled)
* 5560 MHz [112] (disabled)
* 5580 MHz [116] (disabled)
* 5600 MHz [120] (disabled)
* 5620 MHz [124] (disabled)
* 5640 MHz [128] (disabled)
* 5660 MHz [132] (disabled)
* 5680 MHz [136] (disabled)
* 5700 MHz [140] (disabled)
...
Here is a sample of similar ath9k kernel module code which lines up with dmesg
output and it appears that ath9k is defaulting to US
but for some reason the card is still not allowing the DFS frequencies according to iw phy0 info
.
The FCC filing for the TK4WLE200NX (as marked on the card included in the kit) indicates support for DFS frequencies including DFS compliance tests.