On 02/12/2018 01:44 PM, Kalle Valo wrote:
> Timothy Redaelli <tredae...@redhat.com> writes:
>> On Fri, 09 Feb 2018 10:01:09 +0200
>> Kalle Valo <kv...@codeaurora.org> wrote:
>>> Timothy Redaelli <tredae...@redhat.com> writes:
>>>> The code currently syncronize the DFS region only if curchan != 0,
>>>> but hostapd launch DFS before the channel is set and so
>>>> set_dfs_domain is never executed.
>>>> CC: Felix Fietkau <n...@nbd.name>
>>>> Signed-off-by: Timothy Redaelli <tredae...@redhat.com>
>>> What kind of bug does this fix? Please describe the symptoms from
>>> user's point of view.
>> With the current code radar detection (CAC) doesn't work on ath9k
>> since "dpd_set_domain" is only called once with NL80211_DFS_UNSET (0) as
>> region and so "dpd_add_pulse" always returns true (radar detected)
>> without doing a real scan.
>> You can test it easily with a kernel built with
>> CONFIG_ATH9K_DFS_CERTIFIED and by using a simple hostapd configuration:
>> chanlist=100 104 108 112 116 120 124 128 132 136 140
> Any ideas what broke this? Or has it never worked with FCC (US)?
> Anyway, please add this info to the commit log and submit v2.
the idea / reasoning behind setting the DFS detector's initial regulatory domain
to UNSET is a fail-safe mechanism to ensure a proper countrycode is set before
CAC is initiated.
It used to work for a long time, but might broke when the regdb was moved into
kernel and with that the initialization order between channel and regulatory
Not tested, but patch looks sane.