linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 0/14 v4] iwlwifi: rewrite iwl-scan.c to avoid race conditions
Date: Mon, 13 Sep 2010 07:08:29 -0700	[thread overview]
Message-ID: <1284386909.23922.21.camel@wwguy-ubuntu> (raw)
In-Reply-To: <1284382005-3246-1-git-send-email-sgruszka@redhat.com>

On Mon, 2010-09-13 at 05:46 -0700, Stanislaw Gruszka wrote:
> Avoid iwlwifi hardware scanning race conditions
> that may lead to not call ieee80211_scan_completed() (what in
> consequences gives "WARNING: at net/wireless/core.c:614
> wdev_cleanup_work+0xb7/0xf0"), or call iee80211_scan_completed() more
> then once (what gives " WARNING: at net/mac80211/scan.c:312
> ieee80211_scan_completed+0x5f/0x1f1").
> 
> First problem (warning in wdev_cleanup_work) make any further scan
> request from cfg80211 are ignored by mac80211 with EBUSY error,
> hence NetworkManager can not perform successful scan and not allow
> to establish a new connection. So after suspend/resume (but maybe
> not only then) user is not able to connect to wireless network again.
> 
> We can not rely on that the commands (start and abort scan) are
> successful. Even if they are successfully send to the hardware, we can
> not get back notification from firmware (i.e. firmware hung or was
> reseted), or we can get notification when we actually perform abort
> scan in driver code or after that.
> 
> To assure we call ieee80211_scan_completed() only once when scan
> was started we use SCAN_SCANNING bit. Code path, which first clear
> STATUS_SCANNING bit will call ieee80211_scan_completed().
> We do this in many cases, in scan complete notification, scan
> abort, device down, etc. Each time we check SCANNING bit.
> 
> Tested on 3945, 4965 and 5300 adapters. Tested normal work
> functionality and doing scan stress testing using scripts:
> http://people.redhat.com/sgruszka/misc/test_wifi_scan_reboot.sh
> http://people.redhat.com/sgruszka/misc/test_wifi_scan_updown.sh
> 
> v1 -> v2:
> - fix not cleared STATUS_SCAN_HW bit in patch 2
> - merged patch 7 and 8
> - add 3 new patches
> 
> v2 -> v3:
> - merged patch 5 and 14
> - merged patch 2 and 16
> - add bugzilla reference into 3 most important patches
> - not use cancel_delayed_work_sync in work function (patch 10)
> 
> v3 -> v4:
> - add additional changelog comments in patch 9 and 13 and Wey acks
>   in other patches

Thank you, looks good to me.

Wey


      parent reply	other threads:[~2010-09-13 14:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 12:46 [PATCH 0/14 v4] iwlwifi: rewrite iwl-scan.c to avoid race conditions Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 01/14] iwlwifi: remove unused conf variables Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 02/14] iwlwifi: unify scan start checks Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 03/14] iwlwifi: move scan completed flags handling Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 04/14] iwlwifi: cancel scan when down the device Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 05/14] iwlwifi: report scan completion when abort fail Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 06/14] iwlwifi: rework iwl_scan_cancel_timeout Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 07/14] iwlwifi: rewrite scan completion Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 08/14] iwlwifi: force scan complete after timeout Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 09/14] iwlwifi: assure we complete scan in scan_abort and scan_check works Stanislaw Gruszka
2010-09-13 14:07   ` Guy, Wey-Yi
2010-09-13 12:46 ` [PATCH 10/14] iwlwifi: do not force complete scan too early Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 11/14] mac80211: wait for scan work complete before restarting hw Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 12/14] iwlwifi: cleanup scan initiate check Stanislaw Gruszka
2010-09-13 12:46 ` [PATCH 13/14] iwlwifi: use IWL_DEBUG_SCAN for debug scanning Stanislaw Gruszka
2010-09-13 14:07   ` Guy, Wey-Yi
2010-09-13 12:46 ` [PATCH 14/14] iwlwifi: apply settings when finishing scan Stanislaw Gruszka
2010-09-13 14:08 ` Guy, Wey-Yi [this message]

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=1284386909.23922.21.camel@wwguy-ubuntu \
    --to=wey-yi.w.guy@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=reinette.chatre@intel.com \
    --cc=sgruszka@redhat.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).