From 8c71ecf7fcb2c598d2a16a841bd30824a29abf63 Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Sun, 7 Feb 2010 11:44:01 +0000 Subject: set tx mixer gain for RT3071 --- sys/dev/usb/if_run.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index 8b267f36ae4..549124adf0b 100644 --- a/sys/dev/usb/if_run.c +++ b/sys/dev/usb/if_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_run.c,v 1.45 2010/02/07 11:42:24 damien Exp $ */ +/* $OpenBSD: if_run.c,v 1.46 2010/02/07 11:44:00 damien Exp $ */ /*- * Copyright (c) 2008,2009 Damien Bergamini @@ -3001,6 +3001,8 @@ run_rt3070_rf_init(struct run_softc *sc) rf &= ~RT3070_TX_LO1; if (sc->mac_rev >= 0x0211 && !sc->ext_2ghz_lna) rf |= 0x20; /* fix for long range Rx issue */ + if (sc->txmixgain_2ghz >= 2) + rf = (rf & ~0x7) | sc->txmixgain_2ghz; run_rt3070_rf_write(sc, 17, rf); run_rt3070_rf_read(sc, 20, &rf); @@ -3009,6 +3011,7 @@ run_rt3070_rf_init(struct run_softc *sc) run_rt3070_rf_read(sc, 21, &rf); run_rt3070_rf_write(sc, 21, rf & ~RT3070_RX_LO2); + /* fix Tx to Rx IQ glitch by raising RF voltage */ run_rt3070_rf_read(sc, 27, &rf); rf &= ~0x77; if (sc->mac_rev < 0x0211) -- cgit v1.2.3