diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-08 05:48:28 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-08 05:48:28 +0000 |
commit | 21de15f773be76ce845907d8c4e8e82753cc4b0e (patch) | |
tree | 9c2bcaeeb4da7720ce7e357df65f8143fb344557 /sys/dev/ic/rtwn.c | |
parent | 886be2b2bf09a8be00fb57a1aba46d42308ff89e (diff) |
Make urtwn(4) use AMRR instead of letting the firmware handle rate scaling.
For now this only affects RTL8188EU chips, perhaps because the author of this
patch does not own any devices containing any of the other chips (hint hint).
Patch by misha aka Mikhail / mp39590 at gmail
ok mpi@
Diffstat (limited to 'sys/dev/ic/rtwn.c')
-rw-r--r-- | sys/dev/ic/rtwn.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ic/rtwn.c b/sys/dev/ic/rtwn.c index ee4e5b37f46..9cc98451bda 100644 --- a/sys/dev/ic/rtwn.c +++ b/sys/dev/ic/rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtwn.c,v 1.10 2016/07/26 13:00:28 stsp Exp $ */ +/* $OpenBSD: rtwn.c,v 1.11 2017/01/08 05:48:27 stsp Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -692,15 +692,17 @@ rtwn_ra_init(struct rtwn_softc *sc) rtwn_write_4(sc, R92C_ARFR(0), rates & 0x0ff5); } - if (sc->chip & RTWN_CHIP_88E) + if (sc->chip & RTWN_CHIP_88E) { error = rtwn_r88e_ra_init(sc, mode, rates, maxrate, basicrates, maxbasicrate); - else + /* We use AMRR with this chip. Start with the lowest rate. */ + ni->ni_txrate = 0; + } else { error = rtwn_r92c_ra_init(sc, mode, rates, maxrate, basicrates, maxbasicrate); - - /* Indicate highest supported rate. */ - ni->ni_txrate = rs->rs_nrates - 1; + /* No AMRR support yet. Indicate highest supported rate. */ + ni->ni_txrate = rs->rs_nrates - 1; + } return (error); } |