aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-12-13 08:26:38 -0500
committerLuciano Coelho <coelho@ti.com>2011-12-15 02:58:42 -0500
commit5de8eef4fdd2044f6981ebf62330720bcdba8ee3 (patch)
treeab7f4f531ec4c811b8cb83cf6caf61f2ad2d63d4 /drivers
parent2c8f82eabc6b3b6d1fc97954377e67f2d83db687 (diff)
wl12xx: use ieee80211_free_txskb()
Use the newly introduced ieee80211_free_txskb() instead of dev_kfree_skb() for failed tx packets. Additionally, if the skb is a dummy packet, re-enqueue it (as the fw expects it) instead of freeing it. Reported-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/main.c2
-rw-r--r--drivers/net/wireless/wl12xx/tx.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 2f7bfa86c8cd..333bc294f1d9 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1448,7 +1448,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1448 if (hlid == WL12XX_INVALID_LINK_ID || 1448 if (hlid == WL12XX_INVALID_LINK_ID ||
1449 (wlvif && !test_bit(hlid, wlvif->links_map))) { 1449 (wlvif && !test_bit(hlid, wlvif->links_map))) {
1450 wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d", hlid, q); 1450 wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d", hlid, q);
1451 dev_kfree_skb(skb); 1451 ieee80211_free_txskb(hw, skb);
1452 goto out; 1452 goto out;
1453 } 1453 }
1454 1454
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 7d727ee6ddf6..4508ccd78328 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -740,7 +740,14 @@ void wl1271_tx_work_locked(struct wl1271 *wl)
740 set_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags); 740 set_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags);
741 goto out_ack; 741 goto out_ack;
742 } else if (ret < 0) { 742 } else if (ret < 0) {
743 dev_kfree_skb(skb); 743 if (wl12xx_is_dummy_packet(wl, skb))
744 /*
745 * fw still expects dummy packet,
746 * so re-enqueue it
747 */
748 wl1271_skb_queue_head(wl, wlvif, skb);
749 else
750 ieee80211_free_txskb(wl->hw, skb);
744 goto out_ack; 751 goto out_ack;
745 } 752 }
746 buf_offset += ret; 753 buf_offset += ret;