linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: fix sw scan bracketing
Date: Tue, 27 Jul 2010 01:27:25 -0700	[thread overview]
Message-ID: <AANLkTinch-sygnRmB6LKi6xLNYVKY6Ap3YL4_PMNdmKQ@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinHXxhwrOmhRxveekG7_C7WeydUdSBL2R7DwOvJ@mail.gmail.com>

On Tue, Jul 27, 2010 at 1:04 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Fri, Jun 18, 2010 at 3:32 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
>> From: Johannes Berg <johannes.berg@intel.com>
>>
>> Currently, detection in hwsim and ath9k can
>> detect that two sw scans are in flight at the
>> same time, which isn't really true. It is
>> caused by a race condition, because the scan
>> complete callback is called too late, after
>> the lock has been dropped, so that a new scan
>> can be started before it is called.
>>
>> It is also called too early semantically, as
>> it is currently called _after_ the return to
>> the operating channel -- it should be before
>> so that drivers know this is the operating
>> channel again.
>>
>> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>> ---
>>  net/mac80211/scan.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> --- wireless-testing.orig/net/mac80211/scan.c   2010-06-18 12:22:56.000000000 +0200
>> +++ wireless-testing/net/mac80211/scan.c        2010-06-18 12:23:25.000000000 +0200
>> @@ -287,6 +287,8 @@ void ieee80211_scan_completed(struct iee
>>        local->scanning = 0;
>>        local->scan_channel = NULL;
>>
>> +       drv_sw_scan_complete(local);
>> +
>>        /* we only have to protect scan_req and hw/sw scan */
>>        mutex_unlock(&local->scan_mtx);
>>
>> @@ -296,8 +298,6 @@ void ieee80211_scan_completed(struct iee
>>
>>        ieee80211_configure_filter(local);
>>
>> -       drv_sw_scan_complete(local);
>> -
>>        ieee80211_offchannel_return(local, true);
>>
>>  done:
>
> Leaving the entire patch in the e-mail reply as the patch is small to
> help with context.
>
> Turns out this patch broke ath9k in the sense that right after a scan
> we get disconnected from the AP. I just bisected wireless-testing by
> master-tag dates and found 2010-06-18 to be where we hit poo in. I
> reverted this patch and its cured. I'm going to test a recent
> wireless-testing now and then just try reverting this to see if its OK
> even on a recent wireless-testing, and then see if we can fix this
> properly on ath9k or whatever.

Yeap, reverting this patch alone today on wireless-testing makes me
ath9k happy once again.

 Luis

  reply	other threads:[~2010-07-27  8:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 10:32 [PATCH] mac80211: fix sw scan bracketing Johannes Berg
2010-07-27  8:04 ` Luis R. Rodriguez
2010-07-27  8:27   ` Luis R. Rodriguez [this message]
2010-07-27  9:22     ` Luis R. Rodriguez
2010-07-27  9:30       ` Luis R. Rodriguez
2010-07-27  9:31         ` Luis R. Rodriguez
2010-07-27 10:22       ` Johannes Berg
2010-07-27 15:54         ` Luis R. Rodriguez
2010-07-27 17:29           ` Luis R. Rodriguez
2010-07-27 20:09             ` Johannes Berg
2010-09-13 22:22       ` Luis R. Rodriguez

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=AANLkTinch-sygnRmB6LKi6xLNYVKY6Ap3YL4_PMNdmKQ@mail.gmail.com \
    --to=mcgrof@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).