2007-06-08 13:33:20

by Ivo Van Doorn

[permalink] [raw]
Subject: [PATCH] mac80211: Don't stop tx queue on master device while scanning.

From: Mattias Nissler <[email protected]>

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 <[email protected]>

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


2007-06-11 22:00:58

by Michael Wu

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Don't stop tx queue on master device while scanning.

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 <[email protected]>
> >
> > 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


Attachments:
(No filename) (620.00 B)
(No filename) (189.00 B)
Download all attachments

2007-06-11 22:02:06

by Michael Wu

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Don't stop tx queue on master device while scanning.

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


Attachments:
(No filename) (171.00 B)
(No filename) (189.00 B)
Download all attachments

2007-06-11 21:54:38

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Don't stop tx queue on master device while scanning.

On Fri, Jun 08, 2007 at 03:31:13PM +0200, Ivo van Doorn wrote:
> From: Mattias Nissler <[email protected]>
>
> 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
[email protected]