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/3d7ea7aa5bf5
branches: netbsd-8
changeset: 435025:3d7ea7aa5bf5
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 4bcc4c09132f -r 3d7ea7aa5bf5 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