mac80211: Always report TX status
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 5 Sep 2018 05:06:13 +0000 (08:06 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 5 Sep 2018 08:04:51 +0000 (10:04 +0200)
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 <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/status.c

index 9a6d720..001a869 100644 (file)
@@ -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;
@@ -507,6 +502,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 */
                skb_complete_wifi_ack(skb, acked);