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