Do not use ShortGI and STBC with management frames; Atheros cards have problems with...
[ralink_drivers/rt2870_fbsd72.git] / rt2870_io.h
blob6a740c5fafedc2437adcc0074ec32ed920bc4a05
2 /*-
3 * Copyright (c) 2009-2010 Alexander Egorenkov <egorenar@gmail.com>
4 * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef _RT2870_IO_H_
20 #define _RT2870_IO_H_
22 #include "rt2870_softc.h"
24 #define RT2870_IO_MCU_CMD_SLEEP 0x30
25 #define RT2870_IO_MCU_CMD_WAKEUP 0x31
26 #define RT2870_IO_MCU_CMD_LEDS 0x50
27 #define RT2870_IO_MCU_CMD_LED_BRIGHTNESS 0x51
28 #define RT2870_IO_MCU_CMD_LED1 0x52
29 #define RT2870_IO_MCU_CMD_LED2 0x53
30 #define RT2870_IO_MCU_CMD_LED3 0x54
31 #define RT2870_IO_MCU_CMD_BOOT 0x72
33 uint32_t rt2870_io_mac_read(struct rt2870_softc *sc, uint16_t reg);
35 void rt2870_io_mac_read_multi(struct rt2870_softc *sc,
36 uint16_t reg, void *buf, size_t len);
38 void rt2870_io_mac_write(struct rt2870_softc *sc,
39 uint16_t reg, uint32_t val);
41 void rt2870_io_mac_write_multi(struct rt2870_softc *sc,
42 uint16_t reg, const void *buf, size_t len);
44 void rt2870_io_mac_set_region_4(struct rt2870_softc *sc,
45 uint16_t reg, uint32_t val, size_t len);
47 uint16_t rt2870_io_eeprom_read(struct rt2870_softc *sc, uint16_t addr);
49 void rt2870_io_eeprom_read_multi(struct rt2870_softc *sc,
50 uint16_t addr, void *buf, size_t len);
52 uint8_t rt2870_io_bbp_read(struct rt2870_softc *sc, uint8_t reg);
54 void rt2870_io_bbp_write(struct rt2870_softc *sc, uint8_t reg, uint8_t val);
56 void rt2870_io_rf_write(struct rt2870_softc *sc, uint8_t reg, uint32_t val);
58 void rt2870_io_mcu_cmd(struct rt2870_softc *sc, uint8_t cmd,
59 uint8_t token, uint16_t arg);
61 int rt2870_io_mcu_load_ucode(struct rt2870_softc *sc,
62 const uint8_t *ucode, size_t len);
64 int rt2870_io_mcu_reset(struct rt2870_softc *sc);
66 #endif /* #ifndef _RT2870_IO_H_ */