Skip to content

Commit

Permalink
wl12xx: don't queue a new dummy packet if one is already pending
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Sep 14, 2011
1 parent 9487775 commit 1462378
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,13 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
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);
Expand Down

0 comments on commit 1462378

Please sign in to comment.