linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
	linux-wireless@vger.kernel.org,
	mathias.kretschmer@fokus.fraunhofer.de,
	Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Subject: Re: [PATCH] mac80211: fix recalc_radar hwconf sync problem
Date: Thu, 4 Apr 2013 20:22:19 +0200	[thread overview]
Message-ID: <20130404182219.GA24704@pandem0nium> (raw)
In-Reply-To: <515D8259.1030208@neratec.com>

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-04-04 18:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 16:39 [PATCH] mac80211: fix recalc_radar hwconf sync problem Simon Wunderlich
2013-04-03 12:46 ` Johannes Berg
2013-04-04 13:38   ` Zefir Kurtisi
2013-04-04 18:22     ` Simon Wunderlich [this message]
2013-04-05 10:08       ` Zefir Kurtisi
2013-04-05 10:11         ` Zefir Kurtisi
2013-04-05 11:29         ` Simon Wunderlich
2013-04-05 12:11           ` Zefir Kurtisi
2013-04-05 11:22       ` Johannes Berg
2013-04-05 12:16         ` Simon Wunderlich
2013-04-05 12:36           ` Johannes Berg
2013-04-08 11:51             ` Simon Wunderlich
2013-04-08 12:09             ` [PATCHv2] " Simon Wunderlich
2013-04-08 14:17               ` Zefir Kurtisi
2013-04-08 14:29               ` Johannes Berg
2013-04-08 17:04                 ` [PATCHv3] " Simon Wunderlich
2013-04-08 17:53                   ` Antonio Quartulli
2013-04-08 20:43                     ` [PATCHv4] " Simon Wunderlich
2013-04-09  9:50                       ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130404182219.GA24704@pandem0nium \
    --to=simon.wunderlich@s2003.tu-chemnitz.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mathias.kretschmer@fokus.fraunhofer.de \
    --cc=siwu@hrz.tu-chemnitz.de \
    --cc=zefir.kurtisi@neratec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).