2
0

987-rt2x00-do-not-increment-management-frame-sequence-number-while-retry.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From c92df3d93ad09f219e0728b39d40dc0a69d0760f Mon Sep 17 00:00:00 2001
  2. From: Vijayakumar Durai <[email protected]>
  3. Date: Tue Feb 26 19:29:30 2019 +0530
  4. Subject: [PATCH] rt2x00: do not increment sequence number while
  5. re-transmitting
  6. Currently STA+AP re-transmitting the management frames with
  7. incremented sequence number if hardware is assigning the sequence.
  8. Fix is to assign the sequence number for Beacon by hardware
  9. and for other Management frames software will assign the
  10. sequence number
  11. Signed-off-by: Vijayakumar Durai <[email protected]>
  12. ---
  13. .../net/wireless/ralink/rt2x00/rt2x00queue.c | 26 +++++++++----------
  14. 1 file changed, 12 insertions(+), 14 deletions(-)
  15. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
  16. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
  17. @@ -207,22 +207,20 @@ static void rt2x00queue_create_tx_descri
  18. */
  19. if (test_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags))
  20. __clear_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
  21. - else
  22. - /* H/W will generate sequence number */
  23. - return;
  24. + else {
  25. + /*
  26. + * rt2800 has a beacon problem(beacon is sent with same sequence
  27. + * number more than once)with software generated sequence number.
  28. + * So for beacons,hardware will generate sequence number and for
  29. + * other Management frames software will generate sequence number.
  30. + */
  31. + if (ieee80211_is_beacon(hdr->frame_control))
  32. + return;
  33. + else
  34. + __clear_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
  35. + }
  36. }
  37. - /*
  38. - * The hardware is not able to insert a sequence number. Assign a
  39. - * software generated one here.
  40. - *
  41. - * This is wrong because beacons are not getting sequence
  42. - * numbers assigned properly.
  43. - *
  44. - * A secondary problem exists for drivers that cannot toggle
  45. - * sequence counting per-frame, since those will override the
  46. - * sequence counter given by mac80211.
  47. - */
  48. if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags))
  49. seqno = atomic_add_return(0x10, &intf->seqno);
  50. else