From: kevlo Date: Sat, 13 Aug 2022 14:16:59 +0000 (+0000) Subject: Correct rx data rate for rtl8192eu X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=969fab7dc2b334c290f596bbb983866ad3d0d961;p=openbsd Correct rx data rate for rtl8192eu ok stsp@, jmatthew@ --- diff --git a/sys/dev/ic/r92creg.h b/sys/dev/ic/r92creg.h index 0ef8996a922..780419047e6 100644 --- a/sys/dev/ic/r92creg.h +++ b/sys/dev/ic/r92creg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: r92creg.h,v 1.26 2022/03/14 14:15:33 stsp Exp $ */ +/* $OpenBSD: r92creg.h,v 1.27 2022/08/13 14:16:59 kevlo Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -1523,6 +1523,8 @@ struct r92c_rx_desc_usb { #define R92C_RXDW3_RATE_M 0x0000003f #define R92C_RXDW3_RATE_S 0 +#define R92E_RXDW3_RATE_M 0x0000007f +#define R92E_RXDW3_RATE_S 0 #define R92C_RXDW3_HT 0x00000040 #define R92C_RXDW3_HTC 0x00000400 #define R88E_RXDW3_RPT_M 0x0000c000 diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c index a195c10f65e..6f722e55221 100644 --- a/sys/dev/usb/if_urtwn.c +++ b/sys/dev/usb/if_urtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_urtwn.c,v 1.101 2022/06/26 15:38:11 jmatthew Exp $ */ +/* $OpenBSD: if_urtwn.c,v 1.102 2022/08/13 14:16:59 kevlo Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -1188,7 +1188,8 @@ urtwn_rx_frame(struct urtwn_softc *sc, uint8_t *buf, int pktlen, return; } - rate = MS(rxdw3, R92C_RXDW3_RATE); + rate = (sc->sc_sc.chip & RTWN_CHIP_92E) ? + MS(rxdw3, R92E_RXDW3_RATE) : MS(rxdw3, R92C_RXDW3_RATE); infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; /* Get RSSI from PHY status descriptor if present. */