2014-04-07 10:11:54

by Cedric VONCKEN

[permalink] [raw]
Subject: [MAC80211] Radar detection management issue

I'm doing some tests in 802.11a with ath9k driver and I found a
strange behavior.

With iw phy0 info, I check the regulation rules. I can see some
channels needs radar detection. For test I set an AP on this channel and
I can see the beacon with wireshark. But ATH9K doesn't support radar
detection, so these channels should be disabled.

I think the problem is on MAC80211 layer. In /net/wireless/reg.c
the function map_regdom_flags set the flags IEEE80211_CHAN_RADAR if the
regulatory domain set NL80211_RRF_DFS.
But ATH9K doesn't support the radar detection, and I don't found
in MAC80211 a test on this capability.

I only found a capabilities in ATH9K (ATH9K_HW_CAP_DFS), but
this flag is set and not used.

I don't know how fix this issue. For the moment I disable the
channel when the NL80211_RRF_DFS is set (in map_regdom_flags).

Cedric Voncken



2014-04-07 12:53:05

by Janusz Dziedzic

[permalink] [raw]
Subject: Re: [MAC80211] Radar detection management issue

2014-04-07 14:04 GMT+02:00 voncken <[email protected]>:
>> >
>> > I don't know how fix this issue. For the moment I disable the
>> > channel when the NL80211_RRF_DFS is set (in map_regdom_flags).
>> >
>>
>> This seems like a bug in ath9k (init.c) driver, when register interface
>> combinations.
>> Seems RADAR combination should be registered only in case when
>> ATH9K_DFS_CERTIFIED is set.
>
> Thanks for the answer.
>
> The ATH9K_HW_CAP_DFS is set in hw.c only if the function
> ath9k_hw_dfs_tested return true.
>
> In the ath9k/init.c, the function ath9k_set_hw_capab do not set any
> flags in hw->flags relevant to DFS.
>
> I'm looking for a similar line
> if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_DFS)
> hw->flags |= IEEE80211_HW_xxxx;
>
> But I don't found.
>
> I'm looking in net/mac80211.h the IEEE80211 flag relevant to DFS (to
> add the test in ath9k init), but I don't found it.
>
> It seem the mac80211 do not know the hardware capability to detect
> radar.
>
Driver set this in iface_combinations (check):

.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
BIT(NL80211_CHAN_WIDTH_20),

BR
Janusz

2014-04-07 15:28:55

by voncken

[permalink] [raw]
Subject: RE: [MAC80211] Radar detection management issue

> >
> > I don't know how fix this issue. For the moment I disable the
> > channel when the NL80211_RRF_DFS is set (in map_regdom_flags).
> >
>
> This seems like a bug in ath9k (init.c) driver, when register interface
> combinations.
> Seems RADAR combination should be registered only in case when
> ATH9K_DFS_CERTIFIED is set.

Thanks for the answer.

The ATH9K_HW_CAP_DFS is set in hw.c only if the function
ath9k_hw_dfs_tested return true.

In the ath9k/init.c, the function ath9k_set_hw_capab do not set any
flags in hw->flags relevant to DFS.

I'm looking for a similar line
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_DFS)
hw->flags |= IEEE80211_HW_xxxx;

But I don't found.

I'm looking in net/mac80211.h the IEEE80211 flag relevant to DFS (to
add the test in ath9k init), but I don't found it.

It seem the mac80211 do not know the hardware capability to detect
radar.

Cedric.
>
> BR
> Janusz


2014-04-07 13:48:57

by Cedric VONCKEN

[permalink] [raw]
Subject: RE: [MAC80211] Radar detection management issue

> >
> > I'm looking in net/mac80211.h the IEEE80211 flag relevant to
> > DFS (to add the test in ath9k init), but I don't found it.
> >
> > It seem the mac80211 do not know the hardware capability to
> > detect radar.
> >
> Driver set this in iface_combinations (check):
>
> .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
> BIT(NL80211_CHAN_WIDTH_20),
>

I'm sorry, but I don't understand:
how the low level driver (ath9k) advise the MAC80211 driver of radar
detection capabilities.
How the MAC80211 driver disable the channel if the DFS is not
supported by the low level driver.

Cedric.

> BR
> Janusz


2014-04-07 11:09:35

by Janusz Dziedzic

[permalink] [raw]
Subject: Re: [MAC80211] Radar detection management issue

2014-04-07 11:30 GMT+02:00 Cedric VONCKEN <[email protected]>:
> I'm doing some tests in 802.11a with ath9k driver and I found a
> strange behavior.
>
> With iw phy0 info, I check the regulation rules. I can see some
> channels needs radar detection. For test I set an AP on this channel and
> I can see the beacon with wireshark. But ATH9K doesn't support radar
> detection, so these channels should be disabled.
>
> I think the problem is on MAC80211 layer. In /net/wireless/reg.c
> the function map_regdom_flags set the flags IEEE80211_CHAN_RADAR if the
> regulatory domain set NL80211_RRF_DFS.
> But ATH9K doesn't support the radar detection, and I don't found
> in MAC80211 a test on this capability.
>
> I only found a capabilities in ATH9K (ATH9K_HW_CAP_DFS), but
> this flag is set and not used.
>
> I don't know how fix this issue. For the moment I disable the
> channel when the NL80211_RRF_DFS is set (in map_regdom_flags).
>

This seems like a bug in ath9k (init.c) driver, when register
interface combinations.
Seems RADAR combination should be registered only in case when
ATH9K_DFS_CERTIFIED is set.

BR
Janusz