diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-02-07 10:36:26 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-02-07 10:36:26 +0000 |
commit | 025d33e9159969f75bd762f5d8908d655227d3f2 (patch) | |
tree | 40a604e4d8262d3184a2f572aef8f11daece3426 /sys/dev/usb | |
parent | 1301ea1efce46db8ca72f5cbc9387f2bc60e81b5 (diff) |
use new mcu command to select the antenna on RT2020
requires the new firmware
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_run.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index 843804ce936..7035019fa33 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.38 2010/02/07 10:25:21 damien Exp $ */ +/* $OpenBSD: if_run.c,v 1.39 2010/02/07 10:36:25 damien Exp $ */ /*- * Copyright (c) 2008,2009 Damien Bergamini <damien.bergamini@free.fr> @@ -2445,13 +2445,11 @@ run_set_rx_antenna(struct run_softc *sc, int aux) uint32_t tmp; if (aux) { - run_read(sc, RT2860_PCI_EECTRL, &tmp); - run_write(sc, RT2860_PCI_EECTRL, tmp & ~RT2860_C); + run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 0); run_read(sc, RT2860_GPIO_CTRL, &tmp); run_write(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08); } else { - run_read(sc, RT2860_PCI_EECTRL, &tmp); - run_write(sc, RT2860_PCI_EECTRL, tmp | RT2860_C); + run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 1); run_read(sc, RT2860_GPIO_CTRL, &tmp); run_write(sc, RT2860_GPIO_CTRL, tmp & ~0x0808); } |