Linux wireless drivers development
 help / color / mirror / Atom feed
From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 5/5] wl12xx: don't queue a new dummy packet if one is already pending
Date: Thu, 25 Aug 2011 19:04:30 +0300	[thread overview]
Message-ID: <1314288270-22380-5-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1314288270-22380-1-git-send-email-eliad@wizery.com>

From: Arik Nemtsov <arik@wizery.com>

The firmware only asks for one dummy packet at a time, but sometimes we
are unable to provide it before a FW timer expires. When this happens,
the FW will re-request the dummy packet. If a packet is still queued in
the driver queues, do nothing in this case.

This prevents spurious dummy packets from clogging up the VO AC.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 drivers/net/wireless/wl12xx/main.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index f1fd991..aeb4cc5 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1540,7 +1540,13 @@ out:
 int wl1271_tx_dummy_packet(struct wl1271 *wl)
 {
 	unsigned long flags;
-	int q = wl1271_tx_get_queue(skb_get_queue_mapping(wl->dummy_packet));
+	int q;
+
+	/* no need to queue a new dummy packet if one is already pending */
+	if (test_bit(WL1271_FLAG_DUMMY_PACKET_PENDING, &wl->flags))
+		return 0;
+
+	q = wl1271_tx_get_queue(skb_get_queue_mapping(wl->dummy_packet));
 
 	spin_lock_irqsave(&wl->wl_lock, flags);
 	set_bit(WL1271_FLAG_DUMMY_PACKET_PENDING, &wl->flags);
-- 
1.7.6.401.g6a319


      parent reply	other threads:[~2011-08-25 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 16:04 [PATCH 1/5] wl12xx: don't disconnect on recovery Eliad Peller
2011-08-25 16:04 ` [PATCH 2/5] wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag Eliad Peller
2011-08-25 16:04 ` [PATCH 3/5] wl12xx: check for ROC on scan_complete Eliad Peller
2011-08-25 16:04 ` [PATCH 4/5] wl12xx: add config_hangover command Eliad Peller
2011-08-25 17:48   ` Luciano Coelho
2011-08-28 10:33     ` Eliad Peller
2011-08-25 16:04 ` Eliad Peller [this message]

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=1314288270-22380-5-git-send-email-eliad@wizery.com \
    --to=eliad@wizery.com \
    --cc=coelho@ti.com \
    --cc=linux-wireless@vger.kernel.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