Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp18524imu; Thu, 8 Nov 2018 14:01:29 -0800 (PST) X-Google-Smtp-Source: AJdET5cvZJGgKTB1NYpfojaMi33D7L9MDQbRkDWTz/oNupZBLvQO6JweT6C41xfGMEXlmJ1QuHPr X-Received: by 2002:a17:902:b03:: with SMTP id 3-v6mr6317640plq.233.1541714489727; Thu, 08 Nov 2018 14:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541714489; cv=none; d=google.com; s=arc-20160816; b=UB2QlC8mbJVrVfB50mjb4+CGRehR8dlAoRulyOylxjCEOI0x1KiUNMaIPgRyYUEHHV YC6SWVVfFzgmBC4iQQk+Inc5QVY+wembhXCPOnypzJpdtvEVLNX5nsPFBfm7zeCuBfMi B3cLHWp3oOUJl4VZU8jCUF33RYd40JTOunDJcOmssSIqqIPrfm0Qs2/M4jn3MmQJnRRp 4rist29fdUnRSqAkj+MjvTrwj9eGmmPKMLLPAO628sFtG7NwOEZs3GmFepevhvwF5Qkg 6yw5/tXX7V0BAqvj617wyMCbDemdPHSBWiHueI/UxlaEP+G1agVLrN3/GpxP+5PNwhjW M3GQ== 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=iSilTuUUzwd6Vb0JZUMbrncUM/OKs6KiWT2xzw9BoHc=; b=q7QFkxaqPlYM8XkJbqoNLDMnIrzZPrgDoR9Ov5xYrTIlZP/WfG5tR9pQoHTaXp7op2 vw+OEqgzjoDdoD4+fPJwFfh1qRKxtGq4gjSbS3JkzA7vFfdvMTOj5jaTS9at8UlWmiUf G82Qu6/AbOIwYu5YXngjhrXH4Bm4qdtCdNo/hpwR2DZpDZmSx6Ejh4w/NkWfzD2Cn3Pk P8f2zyiDnCwdXwqML43yKEQy61s5ze5FDdiUMtBt53ko4yOKJZrtUIAF2fZT6x4idsHI dAwRQVl+EmOGfoKvET6Oxyp9bZHoBhfql+2PEwIPMYSiSfvm6z0cXcOKrRLqJYwS+x/A GjIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o1bKUfKW; 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 3-v6si5374726pfd.146.2018.11.08.14.01.10; Thu, 08 Nov 2018 14:01:29 -0800 (PST) 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=o1bKUfKW; 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 S1729763AbeKIHgI (ORCPT + 99 others); Fri, 9 Nov 2018 02:36:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:53326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728347AbeKIHgH (ORCPT ); Fri, 9 Nov 2018 02:36:07 -0500 Received: from localhost (unknown [208.72.13.198]) (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 80BBB208E3; Thu, 8 Nov 2018 21:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714319; bh=qTKF1X5OXMvJMIsBcwqOgAKtCt58TOa4GEoyO6H/+qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o1bKUfKWejkU2ty76pmpMZqJL5SF2kXVHoDRGGmiTOAjGQKg2lYpBJ/xit/Tus2sA k6wVqDxEJgQLly5Itrbb7DANKo/n5pOTND5kT9vs1jcbUZBpfLOwVjTKQRm5pR4CxH JpMJsZht2zGoCJCM53MkxTzZ+JuYyXMc9z3UXVrA= 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.4 003/114] mac80211: Always report TX status Date: Thu, 8 Nov 2018 13:50:18 -0800 Message-Id: <20181108215059.304209937@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@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.4-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 45fb1abdb265..2731cf5bf052 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -466,11 +466,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; @@ -491,6 +486,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