Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev/usb Pull up following revision(s) (requested by n...



details:   https://anonhg.NetBSD.org/src/rev/adb4bd00bfb1
branches:  netbsd-8
changeset: 851761:adb4bd00bfb1
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jun 07 18:16:43 2018 +0000

description:
Pull up following revision(s) (requested by nat in ticket #847):

        sys/dev/usb/if_urtwn.c: revision 1.58

Fix support for 8192eu, notably TPLINK TL-WN823NV2, by using the right
registers when setting receiver gain.

Ok christos@.

diffstat:

 sys/dev/usb/if_urtwn.c |  23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diffs (44 lines):

diff -r 9cdd3c42acee -r adb4bd00bfb1 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Thu Jun 07 18:13:38 2018 +0000
+++ b/sys/dev/usb/if_urtwn.c    Thu Jun 07 18:16:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_urtwn.c,v 1.53.2.2 2018/01/31 18:01:54 martin Exp $ */
+/*     $NetBSD: if_urtwn.c,v 1.53.2.3 2018/06/07 18:16:43 martin 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.53.2.2 2018/01/31 18:01:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.53.2.3 2018/06/07 18:16:43 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3799,12 +3799,19 @@
                DELAY(1);
                urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), 0x69553420);
                DELAY(1);
-
-               if (ISSET(sc->chip, URTWN_CHIP_92EU)) {
-                       urtwn_write_2(sc, R92C_AFE_CTRL3, urtwn_read_2(sc,
-                           R92C_AFE_CTRL3));
-               }
-
+       }
+
+       if (ISSET(sc->chip, URTWN_CHIP_92EU)) {
+               crystalcap = sc->r88e_rom[0xb9];
+               if (crystalcap == 0x00)
+                       crystalcap = 0x20;
+               crystalcap &= 0x3f;
+               reg = urtwn_bb_read(sc, R92C_AFE_CTRL3);
+               urtwn_bb_write(sc, R92C_AFE_CTRL3,
+                   RW(reg, R92C_AFE_XTAL_CTRL_ADDR,
+                   crystalcap | crystalcap << 6));
+               urtwn_write_4(sc, R92C_AFE_XTAL_CTRL, 0xf81fb);
+       } else if (ISSET(sc->chip, URTWN_CHIP_88E)) {
                crystalcap = sc->r88e_rom[0xb9];
                if (crystalcap == 0xff)
                        crystalcap = 0x20;



Home | Main Index | Thread Index | Old Index