linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: "John Linville" <linville@tuxdriver.com>,
	Jiri Benc <jbenc@suse.cz>,
	Mattias Nissler <mattias.nissler@gmx.de>
Subject: [PATCH] mac80211: Don't stop tx queue on master device while scanning.
Date: Fri, 8 Jun 2007 15:31:13 +0200	[thread overview]
Message-ID: <200706081531.14086.IvDoorn@gmail.com> (raw)

From: Mattias Nissler <mattias.nissler@gmx.de>

mac80211 stops the tx queues during scans. This is wrong with respect
to the master deivce tx queue, since stopping it prevents any probes
from being sent during the scan. Instead, they accumulate in the queue
and are only sent after the scan is finished, which is obviously
wrong.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>

---
 net/mac80211/ieee80211_sta.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 8bd8031..9fdd265 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -3533,11 +3533,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
 
 	read_lock(&local->sub_if_lock);
 	list_for_each_entry(sdata, &local->sub_if_list, list) {
+
+		/* No need to wake the master device. */
+		if (sdata->dev == local->mdev)
+			continue;
+
 		if (sdata->type == IEEE80211_IF_TYPE_STA) {
 			if (sdata->u.sta.associated)
 				ieee80211_send_nullfunc(local, sdata, 0);
 			ieee80211_sta_timer((unsigned long)sdata);
 		}
+
 		netif_wake_queue(sdata->dev);
 	}
 	read_unlock(&local->sub_if_lock);
@@ -3679,6 +3685,12 @@ static int ieee80211_sta_start_scan(struct net_device *dev,
 
 	read_lock(&local->sub_if_lock);
 	list_for_each_entry(sdata, &local->sub_if_list, list) {
+
+		/* Don't stop the master interface, otherwise we can't transmit
+		 * probes! */
+		if (sdata->dev == local->mdev)
+			continue;
+
 		netif_stop_queue(sdata->dev);
 		if (sdata->type == IEEE80211_IF_TYPE_STA &&
 		    sdata->u.sta.associated)
-- 
1.5.2

             reply	other threads:[~2007-06-08 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 13:31 Ivo van Doorn [this message]
2007-06-11 21:20 ` [PATCH] mac80211: Don't stop tx queue on master device while scanning John W. Linville
2007-06-11 21:59   ` Michael Wu
2007-06-11 22:01     ` Michael Wu
  -- strict thread matches above, loose matches on Subject: below --
2007-06-12  1:16 mac80211 fixes for 2.6.22 John W. Linville
2007-06-12  1:17 ` [PATCH] cfg80211: fix signed macaddress in sysfs John W. Linville
2007-06-12  1:18   ` [PATCH] mac80211: fix debugfs tx power reduction output John W. Linville
2007-06-12  1:18     ` [PATCH] mac80211: Don't stop tx queue on master device while scanning 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=200706081531.14086.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=jbenc@suse.cz \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mattias.nissler@gmx.de \
    /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).