Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2454708imd; Fri, 2 Nov 2018 11:41:18 -0700 (PDT) X-Google-Smtp-Source: AJdET5emx1l3IkM+oQjCgfpJ47HKIGfA9JfQcp6ER07RjvI4hDFlZYYimPOrC5uMEC/ZoxJuFvWF X-Received: by 2002:a17:902:4e25:: with SMTP id f34-v6mr12470413ple.43.1541184078421; Fri, 02 Nov 2018 11:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184078; cv=none; d=google.com; s=arc-20160816; b=i677PYXuz7+IytHqMnBNJ+ZoF2rbFjOjNqM2R/ZGhcTixgULxHQyq0S06c/XkQ1dKE R7XpVIon6TR8RPMUkrs1KceMspkK6uMiMb2es5qm+O4bTJOvJs1N2V1xR7eMrn1AjPdu v/SXBplhPOwEdENbHPsImbo8K7PGACs/A0vNV3lbTk+rTDKTB029MIcq0w9BIyCCflqt 7l7FS1swmUmlhDiCrCrA6vbo1ayoFSh038W/u1Y9dCS1mk7MOHxTJAMI7ZJeL1ydocEk XNoiH8LbpGFKE+a90KcB/PUQX8LAbihxMHhi1Pokp6msI6NUiHUugvQFgYsCRUXudtUz 82QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EljR71js1CU78SrzEUGIZ/G5n2zOb47TP2tEeb6KYbI=; b=cCQGtKEO40wofVeTo0K5SFpygpLRhJ8FjL9qhtlyJCobNJphYRERISKbOwXnrvXa8O KlzPTsgWm3gwvA72nRF4qJlFIbEhrXH0x54jBjIWUcfhHvsaA/pVQ5ywY6iY1NA9+x1o fOc8iJL8IATfld5txiRfIPoisWJbFrVLWeUhiy3DDCQF9j6Qcqb43dGuwIftOLdLbMCv sK/8u18gu0GKGARfl+2AFYidyBkdEwx03+bB0wLYA0t1e6wx+TCZxpt2yqVHG3QhnH2d 23rYsmsyx6VNGX0PvssGcvWyn33QbbUmL09wb9xNBSmYHqzjbcMd7Grk+JT8jXYy+OKI MZfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vVn7xkLs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h71-v6si23880805pgc.122.2018.11.02.11.41.03; Fri, 02 Nov 2018 11:41:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vVn7xkLs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728928AbeKCDqy (ORCPT + 99 others); Fri, 2 Nov 2018 23:46:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:40816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728140AbeKCDqx (ORCPT ); Fri, 2 Nov 2018 23:46:53 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C33B2082D; Fri, 2 Nov 2018 18:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541183922; bh=3AF4QSFvkrFqgAkIKodc2qKcT8RT0UBLjlIJslrT/Vk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vVn7xkLs3xAeuamZsk7tbp+QAYMK5v2rm9RATvHlkjrcmzaa631ftwn938fmukSWw CqrdVqivNFAtbwX1cmanocSlJxPlzU+u+BV9r4IhZ0yczmaXinpk96FseSISvZ1/eJ NEe5kxqO5gyvUHRses0FYCcnc3kr0tNTAFsIiIkg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrei Otcheretianski , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.18 005/150] mac80211: Always report TX status Date: Fri, 2 Nov 2018 19:32:47 +0100 Message-Id: <20181102182902.812595741@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 8682250b3c1b75a45feb7452bc413d004cfe3778 ] If a frame is dropped for any reason, mac80211 wouldn't report the TX status back to user space. As the user space may rely on the TX_STATUS to kick its state machines, resends etc, it's better to just report this frame as not acked instead. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/status.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 9a6d7208bf4f..001a869c059c 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -479,11 +479,6 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, if (!skb) return; - if (dropped) { - dev_kfree_skb_any(skb); - return; - } - if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; struct ieee80211_sub_if_data *sdata; @@ -506,6 +501,8 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, } rcu_read_unlock(); + dev_kfree_skb_any(skb); + } else if (dropped) { dev_kfree_skb_any(skb); } else { /* consumes skb */ -- 2.17.1