All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] rtl8xxxu: Improve the A-MPDU retransmission rate with RTS/CTS protection
@ 2021-12-15  8:58 Chris Chiu
  2021-12-20 19:04 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Chiu @ 2021-12-15  8:58 UTC (permalink / raw)
  To: Jes.Sorensen, kvalo, davem, kuba
  Cc: code, linux-wireless, netdev, linux-kernel, Chris Chiu

The A-MPDU TX retransmission rate is always high (> 20%) even in a very
clean environment. However, the vendor driver retransimission rate is
< 10% in the same test bed. The difference is the vendor driver starts
the A-MPDU TXOP with initial RTS/CTS handshake which is observed in the
air capture and the TX descriptor. Since the driver does not know how
many frames will be aggregated and the estimated duration, forcing the
RTS/CTS protection for A-MPDU helps to lower the retransmission rate
from > 20% to ~12% in the same test setup with the vendor driver.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
---

v2: revise the commit message to be more explicit.

 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index a42e2081b75f..06d59ffb7444 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -4859,7 +4859,7 @@ rtl8xxxu_fill_txdesc_v1(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 	 * rts_rate is zero if RTS/CTS or CTS to SELF are not enabled
 	 */
 	tx_desc->txdw4 |= cpu_to_le32(rts_rate << TXDESC32_RTS_RATE_SHIFT);
-	if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
+	if (ampdu_enable || (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS)) {
 		tx_desc->txdw4 |= cpu_to_le32(TXDESC32_RTS_CTS_ENABLE);
 		tx_desc->txdw4 |= cpu_to_le32(TXDESC32_HW_RTS_ENABLE);
 	} else if (rate_flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
@@ -4930,7 +4930,7 @@ rtl8xxxu_fill_txdesc_v2(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 	/*
 	 * rts_rate is zero if RTS/CTS or CTS to SELF are not enabled
 	 */
-	if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
+	if (ampdu_enable || (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS)) {
 		tx_desc40->txdw3 |= cpu_to_le32(TXDESC40_RTS_CTS_ENABLE);
 		tx_desc40->txdw3 |= cpu_to_le32(TXDESC40_HW_RTS_ENABLE);
 	} else if (rate_flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] rtl8xxxu: Improve the A-MPDU retransmission rate with RTS/CTS protection
  2021-12-15  8:58 [PATCH v2] rtl8xxxu: Improve the A-MPDU retransmission rate with RTS/CTS protection Chris Chiu
@ 2021-12-20 19:04 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-12-20 19:04 UTC (permalink / raw)
  To: Chris Chiu
  Cc: Jes.Sorensen, kvalo, davem, kuba, code, linux-wireless, netdev,
	linux-kernel, Chris Chiu

Chris Chiu <chris.chiu@canonical.com> wrote:

> The A-MPDU TX retransmission rate is always high (> 20%) even in a very
> clean environment. However, the vendor driver retransimission rate is
> < 10% in the same test bed. The difference is the vendor driver starts
> the A-MPDU TXOP with initial RTS/CTS handshake which is observed in the
> air capture and the TX descriptor. Since the driver does not know how
> many frames will be aggregated and the estimated duration, forcing the
> RTS/CTS protection for A-MPDU helps to lower the retransmission rate
> from > 20% to ~12% in the same test setup with the vendor driver.
> 
> Signed-off-by: Chris Chiu <chris.chiu@canonical.com>

Patch applied to wireless-drivers-next.git, thanks.

b250200e2ee4 rtl8xxxu: Improve the A-MPDU retransmission rate with RTS/CTS protection

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211215085819.729345-1-chris.chiu@canonical.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-20 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  8:58 [PATCH v2] rtl8xxxu: Improve the A-MPDU retransmission rate with RTS/CTS protection Chris Chiu
2021-12-20 19:04 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.