Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Correct rx packet count for 8192EU. Tested OK.



details:   https://anonhg.NetBSD.org/src/rev/b9dead779c0c
branches:  trunk
changeset: 1009209:b9dead779c0c
user:      nat <nat%NetBSD.org@localhost>
date:      Thu Apr 16 17:18:27 2020 +0000

description:
Correct rx packet count for 8192EU.  Tested OK.

diffstat:

 sys/dev/ic/rtwnreg.h   |  4 +++-
 sys/dev/usb/if_urtwn.c |  9 ++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r cb52ad195c91 -r b9dead779c0c sys/dev/ic/rtwnreg.h
--- a/sys/dev/ic/rtwnreg.h      Thu Apr 16 16:38:43 2020 +0000
+++ b/sys/dev/ic/rtwnreg.h      Thu Apr 16 17:18:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtwnreg.h,v 1.2 2019/07/25 14:31:35 msaitoh Exp $      */
+/*     $NetBSD: rtwnreg.h,v 1.3 2020/04/16 17:18:27 nat Exp $  */
 /*     $OpenBSD: r92creg.h,v 1.16 2017/09/22 13:41:56 kevlo Exp $      */
 
 /*-
@@ -1341,6 +1341,8 @@
 
 #define R92C_RXDW2_PKTCNT_M    0x00ff0000
 #define R92C_RXDW2_PKTCNT_S    16
+#define R92E_RXDW2_PKTCNT_M    0x3fc00000
+#define R92E_RXDW2_PKTCNT_S    22
 
 #define R92C_RXDW3_RATE_M      0x0000003f
 #define R92C_RXDW3_RATE_S      0
diff -r cb52ad195c91 -r b9dead779c0c sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Thu Apr 16 16:38:43 2020 +0000
+++ b/sys/dev/usb/if_urtwn.c    Thu Apr 16 17:18:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_urtwn.c,v 1.85 2020/04/04 08:46:01 skrll Exp $      */
+/*     $NetBSD: if_urtwn.c,v 1.86 2020/04/16 17:18:27 nat Exp $        */
 /*     $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $       */
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.85 2020/04/04 08:46:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.86 2020/04/16 17:18:27 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2527,7 +2527,10 @@
 
        /* Get the number of encapsulated frames. */
        stat = (struct r92c_rx_desc_usb *)buf;
-       npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT);
+       if (ISSET(sc->chip, URTWN_CHIP_92EU))
+               npkts = MS(le32toh(stat->rxdw2), R92E_RXDW2_PKTCNT);
+       else
+               npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT);
        DPRINTFN(DBG_RX, "Rx %jd frames in one chunk", npkts, 0, 0, 0);
 
        if (npkts != 0)



Home | Main Index | Thread Index | Old Index