My nvram is stable and the country setting survives a reboot:
root@XiaoQiang:~# nvram get CountryCode
DE
The webinterfaces shows Region=Germany too
My script sets "iw reg set DE" after reboot, but I see the same txpowerlist-entries as you do. The last one is 30dm (1000mW).
To be honest, I do not think that this is wrong, as 1000 mW are allowed in Germany in the UNII-2 Extended (5470 - 5725)-band unter the following conditions:
When issuing the dmesg-command, I can see that the device is first initialized with a unset-region
[ 10.664921] cfg80211: World regulatory domain updated:
[ 10.664946] cfg80211: DFS Master region: unset
[ 10.669112] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 10.673555] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 10.683127] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 10.690954] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 10.700301] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 10.708284] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 10.718033] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 10.727497] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 10.735543] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
After "iw reg set DE" is set, it reports the region as DE and it looks like this:
[ 24.731630] cfg80211: Regulatory domain changed to country: DE
[ 24.731666] cfg80211: DFS Master region: ETSI
[ 24.736408] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 24.740888] cfg80211: (2400000 KHz - 2483000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 24.750477] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz, 200000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 24.758281] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz, 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 24.768050] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
[ 24.777493] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz), (N/A, 1400 mBm), (N/A)
[ 24.785603] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
These settings should be fine, but they are NOT, local regulations are violated.
When I manually switch channel to 36, the output power must be reduced to max 200mW = 23dBm, unfortunately this is not the case
root@XiaoQiang:~# iwinfo wl0 freqlist
* 5.180 GHz (Channel 36)
5.200 GHz (Channel 40)
5.220 GHz (Channel 44)
5.240 GHz (Channel 48)
5.260 GHz (Channel 52)
5.280 GHz (Channel 56)
5.300 GHz (Channel 60)
5.320 GHz (Channel 64)
5.500 GHz (Channel 100)
5.520 GHz (Channel 104)
5.540 GHz (Channel 108)
5.560 GHz (Channel 112)
5.580 GHz (Channel 116)
5.600 GHz (Channel 120)
5.620 GHz (Channel 124)
5.640 GHz (Channel 128)
5.660 GHz (Channel 132)
5.680 GHz (Channel 136)
5.700 GHz (Channel 140)
root@XiaoQiang:~# iwinfo wl0 txpowerlist
0 dBm ( 1 mW)
6 dBm ( 3 mW)
10 dBm ( 10 mW)
14 dBm ( 25 mW)
18 dBm ( 63 mW)
22 dBm ( 158 mW)
26 dBm ( 398 mW)
* 30 dBm (1000 mW)
30dBm / 1000 mW is more than allowed on channel 36, it should be reduced to 200mW = 23dBm.
Is this a firmware bug??