From patchwork Tue Feb 10 18:25:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 5808481 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B1C58BF440 for ; Tue, 10 Feb 2015 18:25:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3A8120115 for ; Tue, 10 Feb 2015 18:25:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25FB220117 for ; Tue, 10 Feb 2015 18:25:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752822AbbBJSZo (ORCPT ); Tue, 10 Feb 2015 13:25:44 -0500 Received: from mail2.candelatech.com ([208.74.158.173]:40035 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752458AbbBJSZo (ORCPT ); Tue, 10 Feb 2015 13:25:44 -0500 Received: from ben-dt2.candelatech.com. (unknown [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id 6D51340EAA0; Tue, 10 Feb 2015 10:25:43 -0800 (PST) From: greearb@candelatech.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ben Greear Subject: [PATCH] mac80211-hwsim: Don't enqueue pkts that do not want txstatus. Date: Tue, 10 Feb 2015 10:25:32 -0800 Message-Id: <1423592732-17256-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear Otherwise, skb is not cleaned up until there is some timeout and the tx-queue quickly becomes overly full. Signed-off-by: Ben Greear --- 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: