sunxi: improve A20 Lime2 upload speed
[openwrt/staging/lynxis.git] / package / kernel / mac80211 / patches / 020-13-rt2x00-fixup-fill_tx_status-for-nomatch-case.patch
1 From ec80ad70d778af7665992672896633ebd3b02ac8 Mon Sep 17 00:00:00 2001
2 From: Stanislaw Gruszka <sgruszka@redhat.com>
3 Date: Wed, 15 Feb 2017 10:25:09 +0100
4 Subject: [PATCH 13/19] rt2x00: fixup fill_tx_status for nomatch case
5
6 Add bits rt2x00lib_fill_tx_status() when filling status in nomatch
7 case and hopefully do not break the function for existing cases.
8
9 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
10 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
11 ---
12 drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 +++++-
13 drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 1 +
14 2 files changed, 6 insertions(+), 1 deletion(-)
15
16 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
17 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
18 @@ -357,6 +357,9 @@ static void rt2x00lib_fill_tx_status(str
19 if (i < (IEEE80211_TX_MAX_RATES - 1))
20 tx_info->status.rates[i].idx = -1; /* terminate */
21
22 + if (test_bit(TXDONE_NO_ACK_REQ, &txdesc->flags))
23 + tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
24 +
25 if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {
26 if (success)
27 tx_info->flags |= IEEE80211_TX_STAT_ACK;
28 @@ -375,7 +378,8 @@ static void rt2x00lib_fill_tx_status(str
29 */
30 if (test_bit(TXDONE_AMPDU, &txdesc->flags) ||
31 tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
32 - tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
33 + tx_info->flags |= IEEE80211_TX_STAT_AMPDU |
34 + IEEE80211_TX_CTL_AMPDU;
35 tx_info->status.ampdu_len = 1;
36 tx_info->status.ampdu_ack_len = success ? 1 : 0;
37
38 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
39 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
40 @@ -215,6 +215,7 @@ enum txdone_entry_desc_flags {
41 TXDONE_FAILURE,
42 TXDONE_EXCESSIVE_RETRY,
43 TXDONE_AMPDU,
44 + TXDONE_NO_ACK_REQ,
45 };
46
47 /**