Return-path: Received: from paleale.coelho.fi ([176.9.41.70]:46500 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726956AbeIDQFy (ORCPT ); Tue, 4 Sep 2018 12:05:54 -0400 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Andrei Otcheretianski , Luca Coelho Date: Tue, 4 Sep 2018 14:40:54 +0300 Message-Id: <20180904114055.1429-9-luca@coelho.fi> (sfid-20180904_134135_549722_296C97BF) In-Reply-To: <20180904114055.1429-1-luca@coelho.fi> References: <20180831083130.15525-1-luca@coelho.fi> <20180904114055.1429-1-luca@coelho.fi> Subject: [PATCH v2 8/9] mac80211: Always report TX status Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Andrei Otcheretianski 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 --- 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.18.0