From: Ben Greear <[email protected]>

Otherwise, skb is not cleaned up until there is some timeout
and the tx-queue quickly becomes overly full.

Signed-off-by: Ben Greear <[email protected]>
---

This is against 3.17.8+ kernel...it looks like same problem is in
the 3.19.0-rc7 kernel as well.

 drivers/net/wireless/mac80211_hwsim.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c 
b/drivers/net/wireless/mac80211_hwsim.c
index 989a6ba..7ea8948 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -928,10 +928,14 @@ static void mac80211_hwsim_tx_frame_nl(struct 
ieee80211_hw *hw,
        genlmsg_end(skb, msg_head);
        genlmsg_unicast(&init_net, skb, dst_portid);
 
-       /* Enqueue the packet */
-       skb_queue_tail(&data->pending, my_skb);
        data->tx_pkts++;
        data->tx_bytes += my_skb->len;
+
+       /* Enqueue the packet if we are expecting a tx-status response */
+       if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)
+               skb_queue_tail(&data->pending, my_skb);
+       else
+               ieee80211_free_txskb(hw, my_skb);
        return;
 
 nla_put_failure:
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to