* Re: [PATCH] mac80211: Ensure off-channel frames don't get queued
@ 2013-02-25 22:45 Fabio Rossi
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Rossi @ 2013-02-25 22:45 UTC (permalink / raw)
To: seth.forshee, Johannes Berg; +Cc: linux-wireless
On 25 Feb 2013 Seth wrote:
>Commit 6c17b77b67587b9f9e3070fb89fe98cef3187131 (mac80211: Fix tx queue
>handling during scans) contains a bug that causes off-channel frames to
>get queued when they should be handed down to the driver for transmit.
>Prevent this from happening.
>
>Reported-by: Fabio Rossi <rossi.f@inwind.it>
>Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
>---
>
>Fabio, this patch should fix the problem. Can you verify?
tested, now it works again
Fabio
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: regression with kernel 3.8
@ 2013-02-25 19:26 Seth Forshee
2013-02-25 20:58 ` [PATCH] mac80211: Ensure off-channel frames don't get queued Seth Forshee
0 siblings, 1 reply; 3+ messages in thread
From: Seth Forshee @ 2013-02-25 19:26 UTC (permalink / raw)
To: Fabio Rossi, Johannes Berg; +Cc: linux-wireless
On Mon, Feb 25, 2013 at 07:18:16PM +0100, Fabio Rossi wrote:
> I'm using the latest wireless-testing.git and I have found a regression with
> kernel 3.8. I don't know if this is related to the driver I'm using (ath5k) but
> I have bisected the problem to the commit
> 6c17b77b67587b9f9e3070fb89fe98cef3187131 (mac80211: Fix tx queue handling
> during scans). Basically the authentication and association infos don't appear
> anymore in the kernel logs during a connection to my access point.
>
> Tell me what you need to further debug the issue and solve the problem.
That patch is after 3.8.
Johannes, this looks like a problem with the changes you made when
applying that patch. I really should have tested the result before now.
I think the off-channel frames are getting queued rather than passed
down to the driver, which obviously isn't what we want. I'll get this
fixed.
Seth
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] mac80211: Ensure off-channel frames don't get queued
2013-02-25 19:26 regression with kernel 3.8 Seth Forshee
@ 2013-02-25 20:58 ` Seth Forshee
2013-02-26 20:16 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Seth Forshee @ 2013-02-25 20:58 UTC (permalink / raw)
To: Johannes Berg, Fabio Rossi; +Cc: linux-wireless
Commit 6c17b77b67587b9f9e3070fb89fe98cef3187131 (mac80211: Fix tx queue
handling during scans) contains a bug that causes off-channel frames to
get queued when they should be handed down to the driver for transmit.
Prevent this from happening.
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
Fabio, this patch should fix the problem. Can you verify?
Johannes, this prevents the off-channel frames from getting queued
without affecting the fast path. It does however make the indentation
awfully deep ...
net/mac80211/tx.c | 56 +++++++++++++++++++++++++++++------------------------
1 file changed, 31 insertions(+), 25 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 5b9602b..b1296e7 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1231,34 +1231,40 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
if (local->queue_stop_reasons[q] ||
(!txpending && !skb_queue_empty(&local->pending[q]))) {
if (unlikely(info->flags &
- IEEE80211_TX_INTFL_OFFCHAN_TX_OK &&
- local->queue_stop_reasons[q] &
- ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL))) {
+ IEEE80211_TX_INTFL_OFFCHAN_TX_OK)) {
+ if (local->queue_stop_reasons[q] &
+ ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL)) {
+ /*
+ * Drop off-channel frames if queues
+ * are stopped for any reason other
+ * than off-channel operation. Never
+ * queue them.
+ */
+ spin_unlock_irqrestore(
+ &local->queue_stop_reason_lock,
+ flags);
+ ieee80211_purge_tx_queue(&local->hw,
+ skbs);
+ return true;
+ }
+ } else {
+
/*
- * Drop off-channel frames if queues are stopped
- * for any reason other than off-channel
- * operation. Never queue them.
+ * Since queue is stopped, queue up frames for
+ * later transmission from the tx-pending
+ * tasklet when the queue is woken again.
*/
- spin_unlock_irqrestore(
- &local->queue_stop_reason_lock, flags);
- ieee80211_purge_tx_queue(&local->hw, skbs);
- return true;
+ if (txpending)
+ skb_queue_splice_init(skbs,
+ &local->pending[q]);
+ else
+ skb_queue_splice_tail_init(skbs,
+ &local->pending[q]);
+
+ spin_unlock_irqrestore(&local->queue_stop_reason_lock,
+ flags);
+ return false;
}
-
- /*
- * Since queue is stopped, queue up frames for later
- * transmission from the tx-pending tasklet when the
- * queue is woken again.
- */
- if (txpending)
- skb_queue_splice_init(skbs, &local->pending[q]);
- else
- skb_queue_splice_tail_init(skbs,
- &local->pending[q]);
-
- spin_unlock_irqrestore(&local->queue_stop_reason_lock,
- flags);
- return false;
}
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mac80211: Ensure off-channel frames don't get queued
2013-02-25 20:58 ` [PATCH] mac80211: Ensure off-channel frames don't get queued Seth Forshee
@ 2013-02-26 20:16 ` Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2013-02-26 20:16 UTC (permalink / raw)
To: Seth Forshee; +Cc: Fabio Rossi, linux-wireless
On Mon, 2013-02-25 at 14:58 -0600, Seth Forshee wrote:
> Commit 6c17b77b67587b9f9e3070fb89fe98cef3187131 (mac80211: Fix tx queue
> handling during scans) contains a bug that causes off-channel frames to
> get queued when they should be handed down to the driver for transmit.
> Prevent this from happening.
>
> Reported-by: Fabio Rossi <rossi.f@inwind.it>
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
>
> Fabio, this patch should fix the problem. Can you verify?
>
> Johannes, this prevents the off-channel frames from getting queued
> without affecting the fast path. It does however make the indentation
> awfully deep ...
Ugh .. I do see the bug, but the indentation is crap. I'll apply this
anyway, and then we can sort it out later.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-26 20:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 22:45 [PATCH] mac80211: Ensure off-channel frames don't get queued Fabio Rossi
-- strict thread matches above, loose matches on Subject: below --
2013-02-25 19:26 regression with kernel 3.8 Seth Forshee
2013-02-25 20:58 ` [PATCH] mac80211: Ensure off-channel frames don't get queued Seth Forshee
2013-02-26 20:16 ` Johannes Berg
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).