From 14623787abd1217f4c48f128fd4dc03e238265fe Mon Sep 17 00:00:00 2001 From: Arik Nemtsov Date: Sun, 28 Aug 2011 15:11:57 +0300 Subject: [PATCH] wl12xx: don't queue a new dummy packet if one is already pending 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 Signed-off-by: Eliad Peller Signed-off-by: Luciano Coelho --- drivers/net/wireless/wl12xx/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index f1fd9916e020..aeb4cc51bd3b 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); -- 2.39.2