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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From ec80ad70d778af7665992672896633ebd3b02ac8 Mon Sep 17 00:00:00 2001
  2. From: Stanislaw Gruszka <[email protected]>
  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 <[email protected]>
  8. Signed-off-by: Kalle Valo <[email protected]>
  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. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  14. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  15. @@ -357,6 +357,9 @@ static void rt2x00lib_fill_tx_status(str
  16. if (i < (IEEE80211_TX_MAX_RATES - 1))
  17. tx_info->status.rates[i].idx = -1; /* terminate */
  18. + if (test_bit(TXDONE_NO_ACK_REQ, &txdesc->flags))
  19. + tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
  20. +
  21. if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {
  22. if (success)
  23. tx_info->flags |= IEEE80211_TX_STAT_ACK;
  24. @@ -375,7 +378,8 @@ static void rt2x00lib_fill_tx_status(str
  25. */
  26. if (test_bit(TXDONE_AMPDU, &txdesc->flags) ||
  27. tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
  28. - tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
  29. + tx_info->flags |= IEEE80211_TX_STAT_AMPDU |
  30. + IEEE80211_TX_CTL_AMPDU;
  31. tx_info->status.ampdu_len = 1;
  32. tx_info->status.ampdu_ack_len = success ? 1 : 0;
  33. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
  34. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
  35. @@ -215,6 +215,7 @@ enum txdone_entry_desc_flags {
  36. TXDONE_FAILURE,
  37. TXDONE_EXCESSIVE_RETRY,
  38. TXDONE_AMPDU,
  39. + TXDONE_NO_ACK_REQ,
  40. };
  41. /**