rt2x00: fixup fill_tx_status for nomatch case
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 15 Feb 2017 09:25:09 +0000 (10:25 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 8 Mar 2017 15:05:52 +0000 (17:05 +0200)
Add bits rt2x00lib_fill_tx_status() when filling status in nomatch
case and hopefully do not break the function for existing cases.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
drivers/net/wireless/ralink/rt2x00/rt2x00queue.h

index 90fc259fb5bce639dc06a87dc0fbd130ecabdc3b..e95d2aad3b3f84736aa12c9020a49a20fd19955a 100644 (file)
@@ -357,6 +357,9 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
        if (i < (IEEE80211_TX_MAX_RATES - 1))
                tx_info->status.rates[i].idx = -1; /* terminate */
 
+       if (test_bit(TXDONE_NO_ACK_REQ, &txdesc->flags))
+               tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
+
        if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {
                if (success)
                        tx_info->flags |= IEEE80211_TX_STAT_ACK;
@@ -375,7 +378,8 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
         */
        if (test_bit(TXDONE_AMPDU, &txdesc->flags) ||
            tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
-               tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
+               tx_info->flags |= IEEE80211_TX_STAT_AMPDU |
+                                 IEEE80211_TX_CTL_AMPDU;
                tx_info->status.ampdu_len = 1;
                tx_info->status.ampdu_ack_len = success ? 1 : 0;
 
index 9b297fce4692a8c58a9f75900c2d3d92c0dd1f9d..c78fb8c8838a5ebec5892fe6b2bc2589602aac0a 100644 (file)
@@ -215,6 +215,7 @@ enum txdone_entry_desc_flags {
        TXDONE_FAILURE,
        TXDONE_EXCESSIVE_RETRY,
        TXDONE_AMPDU,
+       TXDONE_NO_ACK_REQ,
 };
 
 /**