Skip to content

Commit 746ba11

Browse files
vijayakumar-durai1Kalle Valo
authored andcommitted
rt2x00: do not increment sequence number while re-transmitting
Currently rt2x00 devices retransmit the management frames with incremented sequence number if hardware is assigning the sequence. This is HW bug fixed already for non-QOS data frames, but it should be fixed for management frames except beacon. Without fix retransmitted frames have wrong SN: AlphaNet_e8:fb:36 Vivotek_52:31:51 Authentication, SN=1648, FN=0, Flags=........C Frame is not being retransmitted 1648 1 AlphaNet_e8:fb:36 Vivotek_52:31:51 Authentication, SN=1649, FN=0, Flags=....R...C Frame is being retransmitted 1649 1 AlphaNet_e8:fb:36 Vivotek_52:31:51 Authentication, SN=1650, FN=0, Flags=....R...C Frame is being retransmitted 1650 1 With the fix SN stays correctly the same: 88:6a:e3:e8:f9:a2 8c:f5:a3:88:76:87 Authentication, SN=1450, FN=0, Flags=........C 88:6a:e3:e8:f9:a2 8c:f5:a3:88:76:87 Authentication, SN=1450, FN=0, Flags=....R...C 88:6a:e3:e8:f9:a2 8c:f5:a3:88:76:87 Authentication, SN=1450, FN=0, Flags=....R...C Cc: [email protected] Signed-off-by: Vijayakumar Durai <[email protected]> [sgruszka: simplify code, change comments and changelog] Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 9dc27bc commit 746ba11

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

drivers/net/wireless/ralink/rt2x00/rt2x00.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ enum rt2x00_state_flags {
673673
CONFIG_CHANNEL_HT40,
674674
CONFIG_POWERSAVING,
675675
CONFIG_HT_DISABLED,
676-
CONFIG_QOS_DISABLED,
677676
CONFIG_MONITORING,
678677

679678
/*

drivers/net/wireless/ralink/rt2x00/rt2x00mac.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -642,18 +642,8 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
642642
rt2x00dev->intf_associated--;
643643

644644
rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
645-
646-
clear_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags);
647645
}
648646

649-
/*
650-
* Check for access point which do not support 802.11e . We have to
651-
* generate data frames sequence number in S/W for such AP, because
652-
* of H/W bug.
653-
*/
654-
if (changes & BSS_CHANGED_QOS && !bss_conf->qos)
655-
set_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags);
656-
657647
/*
658648
* When the erp information has changed, we should perform
659649
* additional configuration steps. For all other changes we are done.

drivers/net/wireless/ralink/rt2x00/rt2x00queue.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,18 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
201201
if (!rt2x00_has_cap_flag(rt2x00dev, REQUIRE_SW_SEQNO)) {
202202
/*
203203
* rt2800 has a H/W (or F/W) bug, device incorrectly increase
204-
* seqno on retransmited data (non-QOS) frames. To workaround
205-
* the problem let's generate seqno in software if QOS is
206-
* disabled.
204+
* seqno on retransmitted data (non-QOS) and management frames.
205+
* To workaround the problem let's generate seqno in software.
206+
* Except for beacons which are transmitted periodically by H/W
207+
* hence hardware has to assign seqno for them.
207208
*/
208-
if (test_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags))
209-
__clear_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
210-
else
209+
if (ieee80211_is_beacon(hdr->frame_control)) {
210+
__set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
211211
/* H/W will generate sequence number */
212212
return;
213+
}
214+
215+
__clear_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
213216
}
214217

215218
/*

0 commit comments

Comments
 (0)