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 | |
parent | 1301ea1efce46db8ca72f5cbc9387f2bc60e81b5 (diff) |
use new mcu command to select the antenna on RT2020
requires the new firmware
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/rt2860reg.h | 3 | ||||
-rw-r--r-- | sys/dev/usb/if_run.c | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/ic/rt2860reg.h b/sys/dev/ic/rt2860reg.h index 0168dfea2a0..0d2eb4c0a43 100644 --- a/sys/dev/ic/rt2860reg.h +++ b/sys/dev/ic/rt2860reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860reg.h,v 1.21 2010/02/07 10:10:51 damien Exp $ */ +/* $OpenBSD: rt2860reg.h,v 1.22 2010/02/07 10:36:25 damien Exp $ */ /*- * Copyright (c) 2007 @@ -303,6 +303,7 @@ #define RT2860_MCU_CMD_LED2 0x53 #define RT2860_MCU_CMD_LED3 0x54 #define RT2860_MCU_CMD_BOOT 0x72 +#define RT2860_MCU_CMD_ANTSEL 0x73 #define RT2860_MCU_CMD_BBP 0x80 #define RT2860_MCU_CMD_PSLEVEL 0x83 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); } |