linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Don't stop tx queue on master device while scanning.
@ 2007-06-08 13:31 Ivo van Doorn
  2007-06-11 21:20 ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Ivo van Doorn @ 2007-06-08 13:31 UTC (permalink / raw)
  To: linux-wireless; +Cc: John Linville, Jiri Benc, Mattias Nissler

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Don't stop tx queue on master device while scanning.
  2007-06-08 13:31 [PATCH] mac80211: Don't stop tx queue on master device while scanning Ivo van Doorn
@ 2007-06-11 21:20 ` John W. Linville
  2007-06-11 21:59   ` Michael Wu
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2007-06-11 21:20 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-wireless, Jiri Benc, Mattias Nissler, Michael Wu

On Fri, Jun 08, 2007 at 03:31:13PM +0200, Ivo van Doorn wrote:
> 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.

Can I get a quick ACK/NAK on this one from the mac80211 guys?

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Don't stop tx queue on master device while scanning.
  2007-06-11 21:20 ` John W. Linville
@ 2007-06-11 21:59   ` Michael Wu
  2007-06-11 22:01     ` Michael Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Wu @ 2007-06-11 21:59 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, Jiri Benc, Mattias Nissler

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

On Monday 11 June 2007 14:20, John W. Linville wrote:
> On Fri, Jun 08, 2007 at 03:31:13PM +0200, Ivo van Doorn wrote:
> > 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.
>
> Can I get a quick ACK/NAK on this one from the mac80211 guys?
>
ACK.

Did this actually get to linux-wireless? I never saw it.

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Don't stop tx queue on master device while scanning.
  2007-06-11 21:59   ` Michael Wu
@ 2007-06-11 22:01     ` Michael Wu
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Wu @ 2007-06-11 22:01 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, Jiri Benc, Mattias Nissler

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

On Monday 11 June 2007 14:59, Michael Wu wrote:
> Did this actually get to linux-wireless? I never saw it.
>
Nevermind, I see it. Missed it for some reason..

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] mac80211: Don't stop tx queue on master device while scanning.
  2007-06-12  1:18   ` [PATCH] mac80211: fix debugfs tx power reduction output John W. Linville
@ 2007-06-12  1:18     ` John W. Linville
  0 siblings, 0 replies; 5+ messages in thread
From: John W. Linville @ 2007-06-12  1:18 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 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 9f30ae4..91b545c 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -2592,11 +2592,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);
@@ -2738,6 +2744,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.0.6

-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-12  1:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 13:31 [PATCH] mac80211: Don't stop tx queue on master device while scanning Ivo van Doorn
2007-06-11 21:20 ` 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

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).