020-13-rt2x00-fixup-fill_tx_status-for-nomatch-case.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. Add bits rt2x00lib_fill_tx_status() when filling status in nomatch
  6. case and hopefully do not break the function for existing cases.
  7. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  8. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  9. ---
  10. drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 +++++-
  11. drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 1 +
  12. 2 files changed, 6 insertions(+), 1 deletion(-)
  13. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  14. index 90fc259fb5bc..e95d2aad3b3f 100644
  15. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  16. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  17. @@ -357,6 +357,9 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
  18. if (i < (IEEE80211_TX_MAX_RATES - 1))
  19. tx_info->status.rates[i].idx = -1; /* terminate */
  20. + if (test_bit(TXDONE_NO_ACK_REQ, &txdesc->flags))
  21. + tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
  22. +
  23. if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {
  24. if (success)
  25. tx_info->flags |= IEEE80211_TX_STAT_ACK;
  26. @@ -375,7 +378,8 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
  27. */
  28. if (test_bit(TXDONE_AMPDU, &txdesc->flags) ||
  29. tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
  30. - tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
  31. + tx_info->flags |= IEEE80211_TX_STAT_AMPDU |
  32. + IEEE80211_TX_CTL_AMPDU;
  33. tx_info->status.ampdu_len = 1;
  34. tx_info->status.ampdu_ack_len = success ? 1 : 0;
  35. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
  36. index 9b297fce4692..c78fb8c8838a 100644
  37. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
  38. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
  39. @@ -215,6 +215,7 @@ enum txdone_entry_desc_flags {
  40. TXDONE_FAILURE,
  41. TXDONE_EXCESSIVE_RETRY,
  42. TXDONE_AMPDU,
  43. + TXDONE_NO_ACK_REQ,
  44. };
  45. /**
  46. --
  47. 2.12.1