netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Mickler <florian-sVu6HhrpSfRAfugRpC6u6w@public.gmane.org>
To: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org
Cc: stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	reinette.chatre-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	ben.m.cahill-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Florian Mickler <florian-sVu6HhrpSfRAfugRpC6u6w@public.gmane.org>
Subject: [PATCH] iwlwifi: fix iwlwifi scanning corner cases
Date: Wed,  6 Oct 2010 00:21:32 +0200	[thread overview]
Message-ID: <1286317292-10679-1-git-send-email-florian@mickler.org> (raw)
In-Reply-To: <20101005085717.GA18012-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Stanislaw Gruszka pointed out, that commit
"iwl3945: queue the right work if the scan needs to be aborted"
has an awkward definition of "right". Specifically the abort_scan work
doesn't notify the generic wireless stack that the scan was aborted.

In order to get rid of the warning in bug
https://bugzilla.kernel.org/show_bug.cgi?id=17722
we inform ieee80211_scan_completed that we are aborting
the scan by setting the apropriate status bit in request_scan and 
pass it into ieee80211_scan_completed. 

Signed-off-by: Florian Mickler <florian-sVu6HhrpSfRAfugRpC6u6w@public.gmane.org>
---

Hi John!

Here is the fix that Stanislaw described. 
(Yes, it is in a brown paper bag.)  Please wait for him to review this. 

Another option would be to just revert my previous patch and live with the 
warning until the scanning rework hit's mainline.

Regards,
Flo




 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    4 +++-
 drivers/net/wireless/iwlwifi/iwl-scan.c     |    6 ++++--
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    3 ++-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 8fd00a6..2d26767 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1410,8 +1410,10 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	*/
 	clear_bit(STATUS_SCAN_HW, &priv->status);
 	clear_bit(STATUS_SCANNING, &priv->status);
+
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->abort_scan);
+	set_bit(STATUS_SCAN_ABORTING, &priv->status);
+	queue_work(priv->workqueue, &priv->scan_completed);
 }
 
 int iwlagn_manage_ibss_station(struct iwl_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index a4b3663..fedf384 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -552,8 +552,10 @@ void iwl_bg_scan_completed(struct work_struct *work)
 	 * into driver again into functions that will attempt to take
 	 * mutex.
 	 */
-	if (!internal)
-		ieee80211_scan_completed(priv->hw, false);
+	if (!internal) {
+		bool aborted = test_bit(STATUS_SCAN_ABORTING, &priv->status);
+		ieee80211_scan_completed(priv->hw, aborted);
+	}
 }
 EXPORT_SYMBOL(iwl_bg_scan_completed);
 
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index d31661c..da10588 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3018,7 +3018,8 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCANNING, &priv->status);
 
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->abort_scan);
+	set_bit(STATUS_SCAN_ABORTING, &priv->status);
+	queue_work(priv->workqueue, &priv->scan_completed);
 }
 
 static void iwl3945_bg_restart(struct work_struct *data)
-- 
1.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-10-05 22:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  6:43 Fw: [PATCH] iwl3945: queue the right work if the scan needs to be aborted Florian Mickler
     [not found] ` <20101005084305.52a31ed4-mGsOIKOveelVRbCss4o9kg@public.gmane.org>
2010-10-05  8:57   ` Stanislaw Gruszka
2010-10-05 10:12     ` Florian Mickler
     [not found]       ` <20101005121242.79cdafc2-mGsOIKOveelVRbCss4o9kg@public.gmane.org>
2010-10-05 10:43         ` Stanislaw Gruszka
     [not found]           ` <20101005104357.GB18833-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-05 22:29             ` Florian Mickler
     [not found]     ` <20101005085717.GA18012-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-05 22:21       ` Florian Mickler [this message]
     [not found]         ` <1286317292-10679-1-git-send-email-florian-sVu6HhrpSfRAfugRpC6u6w@public.gmane.org>
2010-10-06  9:02           ` [PATCH] iwlwifi: fix iwlwifi scanning corner cases Stanislaw Gruszka
     [not found]             ` <20101006090228.GA2523-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-06 16:04               ` [PATCH wireless-2.6 or stable] iwlwifi: return error when fail to start scanning Stanislaw Gruszka
2010-10-06 16:12                 ` Guy, Wey-Yi
2010-10-06 17:32                   ` Florian Mickler
     [not found]                 ` <20101006160434.GB24581-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-06 17:45                   ` Florian Mickler
2010-10-06 17:48                     ` Guy, Wey-Yi
2010-10-06 20:01                   ` John W. Linville

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=1286317292-10679-1-git-send-email-florian@mickler.org \
    --to=florian-svu6hhrpsfrafugrpc6u6w@public.gmane.org \
    --cc=ben.m.cahill-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=reinette.chatre-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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).