OpenWrt Forum Archive

Topic: ath9k is not using 802.11h / DFS for channels 100+

The content of this topic has been archived on 27 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I am wondering how DFS could be enabled with ath9k in the latest trunk. According to this paragraph of the wireless wiki it is enabled in Barrier Breaker (since some SVN) but according to that paragraph (of the same wiki article) the "doth" option, which enables 802.11h support is not addopted to mac80211 yet.

Of course I know that the wiki may be outdated, especially for cases that are under heavy development but as far as I understand it correctly, 802.11h support implies DFS and vice versa you need 802.11h support for DFS and TCP.

So there should be a line "ieee80211h=1" generated in the corresponding hostapd.conf but that is not the case.
A patch to hostapd.sh in /lib/wifi could probably do that.
For the 80211h issue see also this topic (related to 80211ac)

Furthermore DFS means to me that you configure not a certain channel but a set of channels to be used and therefore configure a certain centre frequency and an interval around it, as I have seen that for the ac mode or am I wrong?

Final question: Are all the patches regarding ath9k,80211h, DFS,etc. (especially the 300-pending_work.patch automatically included in the latest trunk snapshot and does anyone have 5GHz with channels that require DFS (100-140 in europe) working with ath9k?

By the way: I've got a TP-Link WDR4300 using snapshot r38884.



cheers,

rizzy

I am trying to make a setup running with 2 ath10k / ath9k dual band devices (and a ath9k dual band device):
Sitecom WLR-8100 (qca988x ver 2)
TP-Link Archer C7 (qca988x hw_ver2 card instead of factory v1)
TP-Link WDR3600

my hostapd.conf file in trunk r38924 - created manually:

# hostapd
interface=wlan0
driver=nl80211
ssid=ath10k
country_code=US

hw_mode=a
ieee80211ac=1
ieee80211d=1
ieee80211h=1
ieee80211n=1

wmm_enabled=1

ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
vht_capab=[MAX-MPDU-11454][SHORT-GI-80][RXLDPC][TX-STBC-2BY1][RX-ANTENNA-PATTERN]

vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=42

macaddr_acl=0
logger_syslog=-1
logger_syslog_level=4
logger_stdout=-1
logger_stdout_level=0

however I did not get it to work with DFS on ath10k (still have to test ath9k device WDR3600)
It seems stuck in a loop

output with commands:

root@OpenWrt:/# rmmod ath10k_pci; rmmod ath10k_core; insmod ath10k_core; insmod 
ath10k_pci
[  298.170000] ath10k_pci 0000:01:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
[  298.180000] ath10k: MSI-X didn't succeed (-1), trying MSI
[  298.180000] ath10k: MSI didn't succeed (-1), trying legacy INTR
[  298.210000] ath10k: legacy interrupt handling
[  298.300000] ath10k: Hardware name qca988x hw2.0 version 0x4100016c
[  299.440000] ath10k: UART prints disabled
[  299.450000] ath10k: firmware 999.999.0.636 booted
[  299.470000] ath10k: htt target version 2.1
root@OpenWrt:/# ip addr add 192.168.10.1 broadcast 192.168.10.255 dev wlan0
root@OpenWrt:/# hostapd -dddd -P /var/run/hostapd.pid -B /etc/hostapd_wlan0.conf
Configuration file: /etc/hostapd_wlan0.conf
[  360.760000] ath10k: MSI-X didn't succeed (-1), trying MSI
[  360.760000] ath10k: MSI didn't succeed (-1), trying legacy INTR
[  360.790000] ath10k: legacy interrupt handling
[  362.020000] ath10k: UART prints disabled
[  362.020000] ath10k: firmware 999.999.0.636 booted
[  362.040000] ath10k: htt target version 2.1
[  362.050000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
wlan0: interface state COUNTRY_UPDATE->ACS
wlan0: ACS-STARTED 
wlan0: ACS-COMPLETED freq=5260 channel=52
wlan0: interface state ACS->HT_SCAN
wlan0: interface state HT_SCAN->DFS
wlan0: DFS-CAC-START freq=5260 chan=52 sec_chan=1
# --------------- STRG-C pressed -----------------------------
hostapd_free_hapd_data: Interface wlan0 wasn't started
ELOOP: remaining socket: sock=11 eloop_data=0x4d9138 user_data=(nil) handler=0x41d19c

edit: it seems to work after calling hostapd a second time on Sitecom:

root@OpenWrt:/# hostapd -dddd -P /var/run/hostapd.pid -B /etc/hostapd_wlan0.conf
Configuration file: /etc/hostapd_wlan0.conf
[  987.270000] ath10k: MSI-X didn't succeed (-1), trying MSI
[  987.270000] ath10k: MSI didn't succeed (-1), trying legacy INTR
[  987.300000] ath10k: legacy interrupt handling
[  988.530000] ath10k: UART prints disabled
[  988.530000] ath10k: firmware 999.999.0.636 booted
[  988.550000] ath10k: htt target version 2.1
[  988.550000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
wlan0: interface state COUNTRY_UPDATE->ACS
wlan0: ACS-STARTED 
wlan0: ACS-COMPLETED freq=5180 channel=36
wlan0: interface state ACS->HT_SCAN
Using interface wlan0 with hwaddr 00:03:07:12:34:56 and ssid "ath10k"
[ 1004.660000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: interface state HT_SCAN->ENABLED
wlan0: AP-ENABLED 

PS: i did observe an Oops earlier and had to hard reset the Sitecom WLR-8100

I just submitted a patch to enable DFS on the mailing list:
https://lists.openwrt.org/pipermail/ope … 22666.html

With DFS you still just configure one channel. It is then up to hostapd to select a suitable free and allowed channel depending on the regulatory domain. It would of course be nice to restrict the set of channels, based on transmit power, for example, but that requires work on the hostapd side.

Everything you see in the OpenWrt SVN is automatically included in the current trunk.

(Last edited by snk on 28 Nov 2013, 10:59)

It worked smile

I wasn't even aware of the possibility to call hostapd and the proper hostapd.conf directly but thank you very much for making that clear to me.

I have to admit I'm pretty new to the 'guts' of Openwrt because I only configured some basic files in /etc/config and everything went fine so far.

Here is what it says:

root@AP_J11:~# hostapd -dddd -P /var/run/hostapd-wlan1.pid -B /etc/config/hostapd-wlan1.conf 
Configuration file: /etc/config/hostapd-wlan1.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
wlan1: interface state COUNTRY_UPDATE->ACS
wlan1: ACS-STARTED 
wlan1: ACS-COMPLETED freq=5220 channel=44
wlan1: interface state ACS->HT_SCAN
Using interface wlan1 with hwaddr 64:66:b3:6f:8b:f8 and ssid "MyWifi"
wlan1: interface state HT_SCAN->ENABLED
wlan1: AP-ENABLED 

And here is my corresponding hostapd-wlan1.conf:

interface=wlan1
driver=nl80211

country_code=DE
ssid=MyWifi


channel=acs_survey #equals channel=0
acs_num_scans=20

hw_mode=a
ieee80211n=1 

ieee80211d=1
ieee80211h=1

ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]

wmm_enabled=1

wds_sta=1 #needed for 4-adress-mode bridge

#auth_algs=1
ignore_broadcast_ssid=0 
wpa=2 
wpa_passphrase=MyPassphrase 
wpa_key_mgmt=WPA-PSK 
wpa_pairwise=TKIP 
rsn_pairwise=CCMP 
macaddr_acl=0

logger_syslog=-1
logger_syslog_level=4
logger_stdout=-1

Thank you for providing the patch, snk.

Regarding the hostapd side I found this discussion on the mailing list but I don't know it's actual status.

In my opinion the option to set specific channels is mandatory for outdoor use since some channels of the 5GHz band are for indoor use only in some countries e.g. Germany or Austria and all channels that are allowed for outdoor use must use DFS.

(Last edited by rizzyrinn on 29 Nov 2013, 01:15)

I have the same problem. Channels 36 is ok, but 100-140 doesn't work.

I have compiled latest OpenWrt from git with DFS support http://wiki.openwrt.org/doc/uci/wireles … _detection :

# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='Chaos Calmer'
DISTRIB_REVISION='r47046'
DISTRIB_CODENAME='chaos_calmer'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer 15.05'
DISTRIB_TAINTS='no-all'

Channels 100-140 are usable:

# iw phy0 info
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2285 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0x3 RX 0x3
        Configured Antennas: TX 0x3 RX 0x3
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
        Band 1:
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
        Band 2:
                Frequencies:
                        * 5040 MHz [8] (disabled)
                        * 5060 MHz [12] (disabled)
                        * 5080 MHz [16] (disabled)
                        * 5180 MHz [36] (23.0 dBm)
                        * 5200 MHz [40] (23.0 dBm)
                        * 5220 MHz [44] (23.0 dBm)
                        * 5240 MHz [48] (23.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5280 MHz [56] (20.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5300 MHz [60] (20.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5320 MHz [64] (20.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5500 MHz [100] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5520 MHz [104] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5540 MHz [108] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5560 MHz [112] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5580 MHz [116] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5600 MHz [120] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5620 MHz [124] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5640 MHz [128] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5660 MHz [132] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5680 MHz [136] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5700 MHz [140] (27.0 dBm) (radar detection)
                          DFS state: usable (for 78399 sec)
                          DFS CAC time: 60000 ms
                        * 5745 MHz [149] (disabled)
                        * 5765 MHz [153] (disabled)
                        * 5785 MHz [157] (disabled)
                        * 5805 MHz [161] (disabled)
                        * 5825 MHz [165] (disabled)
        valid interface combinations:
                 * #{ managed } <= 2048, #{ AP, mesh point } <= 4, #{ IBSS } <= 1,
                   total <= 2048, #channels <= 1
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing

My hostapd config:

interface=wlan0
driver=nl80211
country_code=CZ
bssid=00:0c:42:0c:6a:16
channel=100

hw_mode=a
ieee80211d=1
ieee80211h=1

wmm_enabled=1

macaddr_acl=0
logger_syslog=-1
logger_syslog_level=4
logger_stdout=-1
logger_stdout_level=0

wpa_passphrase=123456789abc
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=AP
bridge=br-wifi
wpa_key_mgmt=WPA-PSK

I have Mikrotik R52 wifi card (802.11a).

Start of Hostapd fail:

# hostapd -dddd -B /etc/config/wlan0.conf
Configuration file: /etc/config/wlan0.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started

What I do bad?
Is your patch in current OpenWrt or I must patch it manually?

The discussion might have continued from here.