From 1342a1ca91aa9d3871170f58d5d7690e0df285f2 Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 15 Mar 2022 09:22:56 +0000 Subject: [PATCH] Fix Tx rate used by rtwn(4) and urtwn(4) for RTS frames. Using ni_txrate for RTS is a bad choice since it could go up to 54 Mbit/s. The AP needs to receive our RTS frame reliably. Usually, 1 Mbit/s is used for RTS, but this hurts throughput and does not really make sense on today's wifi networks. Use 1 Mbit/s in 11b mode, and otherwise use 24 Mbit/s, as damien@ already hard-coded in urtwn long ago. ok kevlo@ --- sys/dev/pci/if_rtwn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c index 449729c000e..ffd1dbe539f 100644 --- a/sys/dev/pci/if_rtwn.c +++ b/sys/dev/pci/if_rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtwn.c,v 1.38 2021/10/04 01:33:42 kevlo Exp $ */ +/* $OpenBSD: if_rtwn.c,v 1.39 2022/03/15 09:22:56 stsp Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -1095,7 +1095,7 @@ rtwn_tx(void *cookie, struct mbuf *m, struct ieee80211_node *ni) if (ic->ic_curmode == IEEE80211_MODE_11B) txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 0)); else - txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 3)); + txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 8)); txd->txdw5 |= htole32(SM(R92C_TXDW5_RTSRATE_FBLIMIT, 0xf)); /* Use AMMR rate for data. */ -- 2.20.1