Discussion:
[OpenWrt-Devel] Status of DFS in OpenWrt -> ath9k
Jacek Kikiewicz
2014-07-01 08:04:26 UTC
Permalink
Hello,

I have few APs that are using ath9k driver, I've read that now DFS is supported on that driver,
so I compiled latest revision (yesterday: 41415), and started playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels, exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried 52,56,100, 104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried with HT20 for the beginning.
So, question here is, should this work in current state or is there still some support missing?
I can pull any logs / settings that are of interest.

Thanks!
Jacek
Martin Garbe
2014-07-02 20:50:13 UTC
Permalink
Post by Jacek Kikiewicz
Hello,
I have few APs that are using ath9k driver, I've read that now DFS is supported on that driver,
so I compiled latest revision (yesterday: 41415), and started playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels, exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried 52,56,100, 104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried with HT20 for the beginning.
So, question here is, should this work in current state or is there still some support missing?
I can pull any logs / settings that are of interest.
Have you elected
CONFIG_PACKAGE_ATH_DFS=y
when compiling the driver? This way you agree to the fact that your
hardware supports DFS. After that DFS channels can be selected.


Martin
Post by Jacek Kikiewicz
Thanks!
Jacek
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Jacek Kikiewicz
2014-07-03 05:28:15 UTC
Permalink
Hi,

I sure selected this option, as I said command 'iw phy phy1 info' does
in fact show DFS channels, but I just cannot set them for usage...

Jacek
Post by Martin Garbe
Post by Jacek Kikiewicz
Hello,
I have few APs that are using ath9k driver, I've read that now DFS is supported on that driver,
so I compiled latest revision (yesterday: 41415), and started playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels, exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried 52,56,100, 104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried with HT20 for the beginning.
So, question here is, should this work in current state or is there still some support missing?
I can pull any logs / settings that are of interest.
Have you elected
CONFIG_PACKAGE_ATH_DFS=y
when compiling the driver? This way you agree to the fact that your
hardware supports DFS. After that DFS channels can be selected.
Martin
Post by Jacek Kikiewicz
Thanks!
Jacek
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Martin Garbe
2014-07-03 16:14:10 UTC
Permalink
Post by Jacek Kikiewicz
Hi,
I sure selected this option, as I said command 'iw phy phy1 info' does
in fact show DFS channels, but I just cannot set them for usage...
The command "iw phy ..." only shows hardware capabilities. For DFS
hardware AND software support is needed. In OpenWRT you need hostapd to
support DFS too. The config parameter CONFIG_PACKAGE_ATH_DFS explicitely
activates DFS in hostapd. This parameter is not set by default.
For more information see also the patch with comment in git:
http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=5fd90c893f86e88150ea81be7afd337ac1b802aa

Regards,
Martin
Post by Jacek Kikiewicz
Jacek
Post by Martin Garbe
Post by Jacek Kikiewicz
Hello,
I have few APs that are using ath9k driver, I've read that now DFS is
supported on that driver,
so I compiled latest revision (yesterday: 41415), and started
playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels,
exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried 52,56,100,
104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried with
HT20 for the beginning.
So, question here is, should this work in current state or is there
still some support missing?
I can pull any logs / settings that are of interest.
Have you elected
CONFIG_PACKAGE_ATH_DFS=y
when compiling the driver? This way you agree to the fact that your
hardware supports DFS. After that DFS channels can be selected.
Martin
Post by Jacek Kikiewicz
Thanks!
Jacek
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Jacek Kikiewicz
2014-07-04 14:29:07 UTC
Permalink
Hello,

I have CONFIG_PACKAGE_ATH_DFS=y and still cannot use this... any idea how / what should be debugged?

Jacek
Post by Martin Garbe
The command "iw phy ..." only shows hardware capabilities. For DFS
hardware AND software support is needed. In OpenWRT you need hostapd to
support DFS too. The config parameter CONFIG_PACKAGE_ATH_DFS explicitely
activates DFS in hostapd. This parameter is not set by default.
http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=5fd90c893f86e88150ea81be7afd337ac1b802aa
Regards,
Martin
Jacek
Post by Martin Garbe
Post by Jacek Kikiewicz
Hello,
I have few APs that are using ath9k driver, I've read that now DFS is
supported on that driver,
so I compiled latest revision (yesterday: 41415), and started
playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels,
exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried 52,56,100,
104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried with
HT20 for the beginning.
So, question here is, should this work in current state or is there
still some support missing?
I can pull any logs / settings that are of interest.
Have you elected
CONFIG_PACKAGE_ATH_DFS=y
when compiling the driver? This way you agree to the fact that your
hardware supports DFS. After that DFS channels can be selected.
Andre Valentin
2014-07-07 22:20:26 UTC
Permalink
Hi!

this should also be in your .config
# CONFIG_ATH_USER_REGD is not set
See http://wireless.kernel.org/en/users/Drivers/ath10k -> Limitations 3/3

Kind regards,

André
Post by Jacek Kikiewicz
Hello,
I have CONFIG_PACKAGE_ATH_DFS=y and still cannot use this... any idea how / what should be debugged?
..
Post by Jacek Kikiewicz
Post by Martin Garbe
CONFIG_PACKAGE_ATH_DFS=y
Martin Garbe
2014-07-09 18:28:59 UTC
Permalink
Hi,

for me it seems that DFS is broken in current trunk for ath9k.
I use trunk and compiled ar71xx. With the following configuration on a
Ubiquity Nanostation locoM5

---------
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11na'
option path 'pci0000:00/0000:00:00.0'
option htmode 'HT20'
option country 'DE'
option channel '104'
option txpower '20'

config wifi-iface
option device 'radio0'
option encryption 'none'
option network 'wifi'
option mode 'ap'
option ssid 'OpenWRT'
option ifname 'wlan0'
---------

All DFS channel attempts fail with
start_dfs_cac() failed, -1

Full log is as follows:
---------
Sat Jul 5 21:19:56 2014 daemon.notice netifd: Interface 'wifi' is enabled
Sat Jul 5 21:19:56 2014 kern.info kernel: [ 337.930000] IPv6:
ADDRCONF(NETDEV_UP): br-wifi: link is not ready
Sat Jul 5 21:19:58 2014 kern.info kernel: [ 339.140000] IPv6:
ADDRCONF(NETDEV_UP): wlan0: link is not ready
Sat Jul 5 21:19:58 2014 kern.info kernel: [ 339.150000] device wlan0
entered promiscuous mode
Sat Jul 5 21:19:58 2014 kern.info kernel: [ 339.160000] device wlan0
left promiscuous mode
Sat Jul 5 21:19:58 2014 kern.info kernel: [ 339.160000] br-wifi: port
1(wlan0) entered disabled state
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156):
Configuration file: /var/run/hostapd-phy0.conf
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): wlan0:
interface state UNINITIALIZED->COUNTRY_UPDATE
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): wlan0:
interface state COUNTRY_UPDATE->DFS
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): wlan0:
DFS-CAC-START freq=5520 chan=104 sec_chan=0, width=0, seg0=0, seg1=0,
cac_time=60s
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): DFS
start_dfs_cac() failed, -1
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): Interface
initialization failed
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): wlan0:
interface state DFS->DISABLED
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): wlan0:
AP-DISABLED
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): wlan0:
Unable to setup interface.
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156):
hostapd_free_hapd_data: Interface wlan0 wasn't started
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): ELOOP:
remaining socket: sock=18 eloop_data=0xab9020 user_data=(nil)
handler=0x4136d5
Sat Jul 5 21:19:58 2014 daemon.notice netifd: radio0 (4156): cat: can't
open '/var/run/wifi-phy0.pid': No such file or directory
----------------

I know that I already used DFS channels in March but I am not sure
whether it was with plain trunk or additional own patches.


Regards,
Martin
Post by Andre Valentin
Hi!
this should also be in your .config
# CONFIG_ATH_USER_REGD is not set
See http://wireless.kernel.org/en/users/Drivers/ath10k -> Limitations 3/3
Kind regards,
André
Post by Jacek Kikiewicz
Hello,
I have CONFIG_PACKAGE_ATH_DFS=y and still cannot use this... any idea
how / what should be debugged?
..
Post by Jacek Kikiewicz
Post by Martin Garbe
CONFIG_PACKAGE_ATH_DFS=y
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Matti Laakso
2014-07-10 07:47:43 UTC
Permalink
Hi,
Post by Martin Garbe
for me it seems that DFS is broken in current trunk for ath9k.
I use trunk and compiled ar71xx. With the following configuration on a
Ubiquity Nanostation locoM5
---------
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11na'
option path 'pci0000:00/0000:00:00.0'
option htmode 'HT20'
option country 'DE'
option channel '104'
option txpower '20'
config wifi-iface
option device 'radio0'
option encryption 'none'
option network 'wifi'
option mode 'ap'
option ssid 'OpenWRT'
option ifname 'wlan0'
---------
All DFS channel attempts fail with
start_dfs_cac() failed, -1
At least on r40878 and ath10k DFS is currently working. The only
difference in my config compared to yours is

option hwmode '11a'

(11na is obsolete). CONFIG_PACKAGE_ATH_DFS and CONFIG_ATH_USER_REGD are
enabled, otherwise default build settings.

Matti
Martin Garbe
2014-07-10 19:25:30 UTC
Permalink
Post by Matti Laakso
Hi,
Post by Martin Garbe
for me it seems that DFS is broken in current trunk for ath9k.
I use trunk and compiled ar71xx. With the following configuration on a
Ubiquity Nanostation locoM5
---------
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11na'
option path 'pci0000:00/0000:00:00.0'
option htmode 'HT20'
option country 'DE'
option channel '104'
option txpower '20'
config wifi-iface
option device 'radio0'
option encryption 'none'
option network 'wifi'
option mode 'ap'
option ssid 'OpenWRT'
option ifname 'wlan0'
---------
All DFS channel attempts fail with
start_dfs_cac() failed, -1
At least on r40878 and ath10k DFS is currently working. The only
Okay, I updated ones again my trunk git and now everything works as
expected. Very good.

Thanks,
Martin
Post by Matti Laakso
difference in my config compared to yours is
option hwmode '11a'
(11na is obsolete). CONFIG_PACKAGE_ATH_DFS and CONFIG_ATH_USER_REGD are
enabled, otherwise default build settings.
Matti
Martin Garbe
2014-07-10 19:34:23 UTC
Permalink
Post by Andre Valentin
Hi!
this should also be in your .config
# CONFIG_ATH_USER_REGD is not set
See http://wireless.kernel.org/en/users/Drivers/ath10k -> Limitations 3/3
What does it mean exactly? For ath9k the option CONFIG_PACKAGE_ATH_DFS
needs to be set.
For ath10k this option must not be set?

Regards,
Martin
Post by Andre Valentin
Kind regards,
André
Post by Jacek Kikiewicz
Hello,
I have CONFIG_PACKAGE_ATH_DFS=y and still cannot use this... any idea
how / what should be debugged?
..
Post by Jacek Kikiewicz
Post by Martin Garbe
CONFIG_PACKAGE_ATH_DFS=y
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Martin Garbe
2014-07-10 20:27:03 UTC
Permalink
Hi Jacek,

summarising all information from the mailinglist the following
configuration should work:

1. select CONFIG_PACKAGE_ATH_DFS=y
2. if ath9k select CONFIG_ATH_USER_REGD=y
if ath10k deactivate CONFIG_ATH_USER_REGD
3. compile current OpenWRT trunk
4. Configuration
---------
config wifi-device radio0
option type mac80211
option channel 104
option hwmode 11a
option path 'pci0000:00/0000:00:00.0'
option htmode HT20
option country 'DE'

config wifi-iface
option device radio0
option network lan
option mode ap
option ssid OpenWrt
option encryption none
---------

If this setting does not work for you please do the following.

- on AP exec "wifi down"
- on AP exec "logread -f" (on a second ssh session)
- on AP exec "wifi up"
- send us the log output + "iw phy0 info" output + information about
your hardware

Martin
Post by Jacek Kikiewicz
Hello,
I have CONFIG_PACKAGE_ATH_DFS=y and still cannot use this... any idea how / what should be debugged?
Jacek
Post by Martin Garbe
The command "iw phy ..." only shows hardware capabilities. For DFS
hardware AND software support is needed. In OpenWRT you need hostapd to
support DFS too. The config parameter CONFIG_PACKAGE_ATH_DFS explicitely
activates DFS in hostapd. This parameter is not set by default.
http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=5fd90c893f86e88150ea81be7afd337ac1b802aa
Regards,
Martin
Jacek
Post by Martin Garbe
Post by Jacek Kikiewicz
Hello,
I have few APs that are using ath9k driver, I've read that now DFS is
supported on that driver,
so I compiled latest revision (yesterday: 41415), and started
playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels,
exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried 52,56,100,
104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried with
HT20 for the beginning.
So, question here is, should this work in current state or is there
still some support missing?
I can pull any logs / settings that are of interest.
Have you elected
CONFIG_PACKAGE_ATH_DFS=y
when compiling the driver? This way you agree to the fact that your
hardware supports DFS. After that DFS channels can be selected.
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
s***@gmail.com
2014-07-08 13:22:48 UTC
Permalink
Only hostap work with dfs in AP-Mode?
This is the last development step here?
Than is this not rewarding for me.

Bacause:
Wy this limitation?
Is this necessary?

I think no.

1. I think the Hardware has only to disable the channel if Radar is
detectet. Right? It works.
2. The Software in Userspace has to choice a (ald and new) channel.
Right? It works only with hostapd!
3. We are not bound to honour a standard, that not explicit writen for
ours application!
4. We are only engaged to fulfil the laws of the countries.

But why only hostapd?

If the Hardware disables the channel because radardetect, i do not need
any instance, that tell me wich aplication rules my channels, because i
can not overide disabled channels by hardware with the software tools.

I think the choice of the channel can also be done by a shell-script
using iw or iwconfig located in chrontab.

The current situation is in my opinion not nessesary and not
consistent to ours situation.

lg




Am Thu, 03 Jul 2014 18:14:10 +0200
Post by Martin Garbe
Post by Jacek Kikiewicz
Hi,
I sure selected this option, as I said command 'iw phy phy1 info'
does in fact show DFS channels, but I just cannot set them for
usage...
The command "iw phy ..." only shows hardware capabilities. For DFS
hardware AND software support is needed. In OpenWRT you need hostapd
to support DFS too. The config parameter CONFIG_PACKAGE_ATH_DFS
explicitely activates DFS in hostapd. This parameter is not set by
http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=5fd90c893f86e88150ea81be7afd337ac1b802aa
Regards,
Martin
Post by Jacek Kikiewicz
Jacek
Post by Martin Garbe
Post by Jacek Kikiewicz
Hello,
I have few APs that are using ath9k driver, I've read that now
DFS is supported on that driver,
so I compiled latest revision (yesterday: 41415), and started
playing, basically when as per
manual / howto I run 'iw phy phy1 info' I can see DFS channels,
exactly like in howto on a wiki, problem is however
that I cannot make it work on those channels (I've tried
52,56,100, 104), after changing config and restarting wifi
I saw in dmesg 'interface wlan1 entered disabled mode) - I tried
with HT20 for the beginning.
So, question here is, should this work in current state or is
there still some support missing?
I can pull any logs / settings that are of interest.
Have you elected
CONFIG_PACKAGE_ATH_DFS=y
when compiling the driver? This way you agree to the fact that your
hardware supports DFS. After that DFS channels can be selected.
Martin
Post by Jacek Kikiewicz
Thanks!
Jacek
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Felix Fietkau
2014-07-08 13:47:46 UTC
Permalink
Post by s***@gmail.com
Only hostap work with dfs in AP-Mode?
This is the last development step here?
Than is this not rewarding for me.
LOLWUT?
Post by s***@gmail.com
Wy this limitation?
hostapd is already required for AP mode. It controls the AP state,
channel configuration, etc.
Post by s***@gmail.com
Is this necessary?
At the moment, yes.
Post by s***@gmail.com
I think no.
1. I think the Hardware has only to disable the channel if Radar is
detectet. Right? It works.
2. The Software in Userspace has to choice a (ald and new) channel.
Right? It works only with hostapd!
3. We are not bound to honour a standard, that not explicit writen for
ours application!
4. We are only engaged to fulfil the laws of the countries.
What you're writing looks a bit confused to me...
Post by s***@gmail.com
But why only hostapd?
If the Hardware disables the channel because radardetect, i do not need
any instance, that tell me wich aplication rules my channels, because i
can not overide disabled channels by hardware with the software tools.
I think the choice of the channel can also be done by a shell-script
using iw or iwconfig located in chrontab.
Even without DFS that doesn't work.
Post by s***@gmail.com
The current situation is in my opinion not nessesary and not
consistent to ours situation.
Your opinion seems to be lacking quite a bit of background regarding the
design of MAC layer management within mac80211, cfg80211 and hostapd.

- Felix
Bernd Naumann
2014-07-08 21:08:21 UTC
Permalink
Hi Felix,

As I do not have the lightest clue about the magic behind DFS I want to
ask a question.

If I understand it correctly, routers in a mesh network have to change
there channel if they detect a radar, and all routers in a mesh network
have to use the same channel, but have to switch to the proper channel
/at once/?

Additionally, the only way to set the channel on OpenWRT is to use
hostapd? And the problem is, that some script have to make the decision
and have to tell hostapd the set the 'new' channel? Or am I completely
miss the point?

Thanks for making things clear to me,
Bernd
Loading...