summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-04-06 19:40:52 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-04-06 19:40:52 +0000
commit82289922c532d67b5593b04881bc3e2fd0002e3f (patch)
tree0167466f9cf3b498674966c6f6175044dbdd6bdb /sys/dev/usb
parent799fbceb78a875c5ffd043b5650151a13adcc034 (diff)
always enable both 2GHz and 5GHz LNAs regardless of the band
we're using. fixes operation on some 5GHz channels (e.g 153). great thanks to Yao Zhao (dragonlinux at gmail dot com) for identifying the issue on run(4).
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_run.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index f0752f9e67b..135e30e2606 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.65 2010/04/06 08:58:51 halex Exp $ */
+/* $OpenBSD: if_run.c,v 1.66 2010/04/06 19:40:51 damien Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2386,19 +2386,17 @@ run_select_chan_group(struct run_softc *sc, int group)
run_write(sc, RT2860_TX_BAND_CFG, tmp);
/* enable appropriate Power Amplifiers and Low Noise Amplifiers */
- tmp = RT2860_RFTR_EN | RT2860_TRSW_EN;
+ tmp = RT2860_RFTR_EN | RT2860_TRSW_EN | RT2860_LNA_PE0_EN;
+ if (sc->nrxchains > 1)
+ tmp |= RT2860_LNA_PE1_EN;
if (group == 0) { /* 2GHz */
- tmp |= RT2860_PA_PE_G0_EN | RT2860_LNA_PE_G0_EN;
+ tmp |= RT2860_PA_PE_G0_EN;
if (sc->ntxchains > 1)
tmp |= RT2860_PA_PE_G1_EN;
- if (sc->nrxchains > 1)
- tmp |= RT2860_LNA_PE_G1_EN;
} else { /* 5GHz */
- tmp |= RT2860_PA_PE_A0_EN | RT2860_LNA_PE_A0_EN;
+ tmp |= RT2860_PA_PE_A0_EN;
if (sc->ntxchains > 1)
tmp |= RT2860_PA_PE_A1_EN;
- if (sc->nrxchains > 1)
- tmp |= RT2860_LNA_PE_A1_EN;
}
if (sc->mac_ver == 0x3572) {
run_rt3070_rf_write(sc, 8, 0x00);