summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-05-19 10:53:34 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-05-19 10:53:34 +0000
commit0ba85a9c19a0fb2be753fce73f6c775ee94437d7 (patch)
tree919a28efe394c26353cb28a64aa7cd84a5313b52 /sys
parenta2731d7a9bf1289db7fc5752cbafa55fa2fa4d8a (diff)
Make rtwn(4) support fixed transmit rates set with ifconfig(8).
Useful for development and testing but not recommended for regular usage.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_rtwn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c
index 7cb3630586b..38708a34c77 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.26 2017/02/01 12:46:40 stsp Exp $ */
+/* $OpenBSD: if_rtwn.c,v 1.27 2017/05/19 10:53:33 stsp Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1023,7 +1023,12 @@ rtwn_tx(void *cookie, struct mbuf *m, struct ieee80211_node *ni)
/* Use AMMR rate for data. */
txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE);
- txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, ni->ni_txrate));
+ if (ic->ic_fixed_rate != -1)
+ txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE,
+ ic->ic_fixed_rate));
+ else
+ txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE,
+ ni->ni_txrate));
txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE_FBLIMIT, 0x1f));
} else {
txd->txdw1 |= htole32(