Search Linux Wireless

Re: [PATCH] mac80211: fix recalc_radar hwconf sync problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 04, 2013 at 03:38:33PM +0200, Zefir Kurtisi wrote:
> On 04/03/2013 02:46 PM, Johannes Berg wrote:
> > On Tue, 2013-04-02 at 18:39 +0200, Simon Wunderlich wrote:
> >> local->hw.conf maybe not be synced when recalcing whether radar is
> >> enabled, sometimes leaving radar enabled even if it's not neccesary
> >> anymore.
> > 
> > I don't really see how, can you explain more?

As far as I see, the problem happens when changing from a DFS to a non-DFS
channel. local->hw.conf.radar_enabled is true from the last (DFS) channel,
but the channel gets released when stopping the AP, and the channel context
is freed. Then when changing to the new channel, what happens is:

1. ieee80211_vif_use_channel() creates a new channel context. This channel
contxt has chanctx->conf.radar_enabled = false by default.

2. ieee80211_recalc_radar_chanctx() is called, and finds that no radar is
currently enabled => local radar_enabled = false

3. ieee80211_recalc_radar_chanctx() checks if 
chanctx->conf.radar_enabled == radar_enabled and both are false, and
returns
 => but local->hw.conf.radar_enabled would be changed later in this function
    and is therefore not updated.

Therefore I'm removing the check to always update the hw.conf.radar_enabled
field, to be safe in any case.

> > 
> > johannes
> > 
> 
> You seem to be right, the patch does not resolve the observed problem.
> 
> I am not deep enough in the DFS master code and its integration to resolve it
> myself. What I see is that ath9k_config() is called with a non-DFS channel but
> with ieee80211_hw->conf.radar_enabled set. For ath9k that's no problem at all
> (radar pulse detection can be enabled on any channel), but indicates a problem in
> the channel context handling for DFS.
> 
> To reproduce, start an AP on a DFS channel, wait until CAC is finished and fire a
> radar. hostapd will switch to a non-DFS channel with the radar_enabled flag set.

So the patch does not resolve the problem for you? I've checked it again with
a little printk in ath9ks config function.

With the patch the radar_enabled flag gets disabled when changing the channel (5500 -> 5200).
If I don't apply the patch, it stays enabled. I did the same thing (start hostapd on
channel 5500, wait for CAC, echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/simulate_radar).

Maybe I'm missing something?

Cheers,
	Simon


Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux