Commit 5de8eef4 authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho

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: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 2c8f82ea
...@@ -1448,7 +1448,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -1448,7 +1448,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
if (hlid == WL12XX_INVALID_LINK_ID || if (hlid == WL12XX_INVALID_LINK_ID ||
(wlvif && !test_bit(hlid, wlvif->links_map))) { (wlvif && !test_bit(hlid, wlvif->links_map))) {
wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d", hlid, q); wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d", hlid, q);
dev_kfree_skb(skb); ieee80211_free_txskb(hw, skb);
goto out; goto out;
} }
......
...@@ -740,7 +740,14 @@ void wl1271_tx_work_locked(struct wl1271 *wl) ...@@ -740,7 +740,14 @@ void wl1271_tx_work_locked(struct wl1271 *wl)
set_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags); set_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags);
goto out_ack; goto out_ack;
} else if (ret < 0) { } else if (ret < 0) {
dev_kfree_skb(skb); if (wl12xx_is_dummy_packet(wl, skb))
/*
* fw still expects dummy packet,
* so re-enqueue it
*/
wl1271_skb_queue_head(wl, wlvif, skb);
else
ieee80211_free_txskb(wl->hw, skb);
goto out_ack; goto out_ack;
} }
buf_offset += ret; buf_offset += ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment