TP-Link Archer C5 V1.2 / 5Ghz in Germany

Hi,

I succesfully upgraded from openwrt 15.05.1 to Lede 17.01.0
After the upgrade, my 5 GHz wlan is pinned to us. I can't set country DE anymore.
Can somebody help me or explain this behaviour?

iw reg get:

root@OpenWrt:~# iw reg get
global
country DE: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 27), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 14), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#1
country US: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)
        (57240 - 63720 @ 2160), (N/A, 40), (N/A)

phy#0
country US: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)
        (57240 - 63720 @ 2160), (N/A, 40), (N/A)

uci show wireless | egrep -v key:

root@OpenWrt:~# uci show wireless | egrep -v key
wireless.radio0=wifi-device
wireless.radio0.type='mac80211'
wireless.radio0.hwmode='11a'
wireless.radio0.path='pci0000:01/0000:01:00.0'
wireless.radio0.country='DE'
wireless.radio0.log_level='1'
wireless.radio0.channel='100'
wireless.radio0.htmode='VHT80'
wireless.radio0.txpower='27'
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device='radio0'
wireless.@wifi-iface[0].mode='ap'
wireless.@wifi-iface[0].ssid='ZwiTest'
wireless.@wifi-iface[0].encryption='psk2+ccmp'
wireless.@wifi-iface[0].network='home'
wireless.radio1=wifi-device
wireless.radio1.type='mac80211'
wireless.radio1.hwmode='11g'
wireless.radio1.path='platform/qca955x_wmac'
wireless.radio1.disabled='0'
wireless.radio1.htmode='HT40'
wireless.radio1.txpower='20'
wireless.radio1.country='DE'
wireless.radio1.channel='6'
wireless.@wifi-iface[1]=wifi-iface
wireless.@wifi-iface[1].device='radio1'
wireless.@wifi-iface[1].mode='ap'
wireless.@wifi-iface[1].encryption='psk2+ccmp'
wireless.@wifi-iface[1].network='home'
wireless.@wifi-iface[1].ssid='ZwiTest2'
wireless.@wifi-iface[2]=wifi-iface
wireless.@wifi-iface[2].device='radio0'
wireless.@wifi-iface[2].mode='ap'
wireless.@wifi-iface[2].network='guest'
wireless.@wifi-iface[2].encryption='psk2+ccmp'
wireless.@wifi-iface[2].ssid='ZwickerGaeste'
wireless.@wifi-iface[3]=wifi-iface
wireless.@wifi-iface[3].device='radio1'
wireless.@wifi-iface[3].mode='ap'
wireless.@wifi-iface[3].network='guest'
wireless.@wifi-iface[3].encryption='psk2+ccmp'
wireless.@wifi-iface[3].ssid='Zwicker2Gaeste'
wireless.@wifi-iface[4]=wifi-iface
wireless.@wifi-iface[4].device='radio0'
wireless.@wifi-iface[4].mode='ap'
wireless.@wifi-iface[4].ssid='ZwickerIOT'
wireless.@wifi-iface[4].encryption='psk2+ccmp'
wireless.@wifi-iface[4].network='iot'
wireless.@wifi-iface[5]=wifi-iface
wireless.@wifi-iface[5].device='radio0'
wireless.@wifi-iface[5].mode='ap'
wireless.@wifi-iface[5].ssid='ZwickerKids'
wireless.@wifi-iface[5].encryption='psk2+ccmp'
wireless.@wifi-iface[5].network='kids'
wireless.@wifi-iface[6]=wifi-iface
wireless.@wifi-iface[6].device='radio1'
wireless.@wifi-iface[6].mode='ap'
wireless.@wifi-iface[6].encryption='psk2+ccmp'
wireless.@wifi-iface[6].ssid='Zwicker2Kids'
wireless.@wifi-iface[6].network='kids'
wireless.@wifi-iface[7]=wifi-iface
wireless.@wifi-iface[7].device='radio1'
wireless.@wifi-iface[7].mode='ap'
wireless.@wifi-iface[7].ssid='Zwicker2IOT'
wireless.@wifi-iface[7].encryption='psk2+ccmp'
wireless.@wifi-iface[7].network='iot'

I can't really help at this point, but I can at least say it seems to be the same on the Archer C7 v2. I have actually not tested what the output of 'iw reg get' would have looked like on OpenWrt Chaos Calmer. But with LEDE 17.01.0 the output is the same as you posted.

In addition, the kernel log also shows something going on with the country code:

root@LEDE:~# dmesg | grep country
[ 15.077237] ath: EEPROM indicates default country code should be used
[ 15.077245] ath: doing EEPROM country->regdmn map search
[ 15.077261] ath: country maps to regdmn code: 0x3a
[ 15.765167] ath: EEPROM indicates default country code should be used
[ 15.765175] ath: doing EEPROM country->regdmn map search
[ 15.765191] ath: country maps to regdmn code: 0x3a
[ 22.705429] ath: EEPROM indicates we should expect a country code
[ 22.705438] ath: doing EEPROM country->regdmn map search
[ 22.705447] ath: country maps to regdmn code: 0x37
[ 22.705557] ath: EEPROM indicates we should expect a country code
[ 22.705565] ath: doing EEPROM country->regdmn map search
[ 22.705573] ath: country maps to regdmn code: 0x37

One more update. I'm actually not sure whether the output of iw is just wront. Because if I look at the kernel log again, it looks like the last country code being set (and then used) is Germany (0x37).

If I filter the kernel log less restrictively it looks like this:

root@LEDE:~# dmesg | grep -i -e 'country' -e 'regdomain'
[ 15.077225] ath: EEPROM regdomain: 0x0
[ 15.077237] ath: EEPROM indicates default country code should be used
[ 15.077245] ath: doing EEPROM country->regdmn map search
[ 15.077261] ath: country maps to regdmn code: 0x3a
[ 15.077270] ath: Country alpha2 being used: US
[ 15.765151] ath: EEPROM regdomain: 0x0
[ 15.765167] ath: EEPROM indicates default country code should be used
[ 15.765175] ath: doing EEPROM country->regdmn map search
[ 15.765191] ath: country maps to regdmn code: 0x3a
[ 15.765201] ath: Country alpha2 being used: US
[ 22.705412] ath: EEPROM regdomain: 0x8114
[ 22.705429] ath: EEPROM indicates we should expect a country code
[ 22.705438] ath: doing EEPROM country->regdmn map search
[ 22.705447] ath: country maps to regdmn code: 0x37
[ 22.705456] ath: Country alpha2 being used: DE
[ 22.705474] ath: regdomain 0x8114 dynamically updated by user
[ 22.705549] ath: EEPROM regdomain: 0x8114
[ 22.705557] ath: EEPROM indicates we should expect a country code
[ 22.705565] ath: doing EEPROM country->regdmn map search
[ 22.705573] ath: country maps to regdmn code: 0x37
[ 22.705581] ath: Country alpha2 being used: DE
[ 22.705597] ath: regdomain 0x8114 dynamically updated by user

So this looks fine - the country code being used seems to be DE (Germany) as configured in my wireless configuration. Maybe a dev with more knowledge can tell whether this is just a bug in iw or whether the country code is really not set properly.