diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-10-17 09:42:17 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 20:06:58 +0200 |
commit | 0bc202b3bbea5106677b8b142a09d3d57a2bb263 (patch) | |
tree | 8f5f64d138fa184c138f1b9ff319d17d8e0386f8 /drivers/net/wireless/rt2x00/rt2800mmio.h | |
parent | rt2x00: rt2800pci: use rt2800mmio prefix for TX descriptor functions (diff) | |
download | linux-0bc202b3bbea5106677b8b142a09d3d57a2bb263.tar.xz linux-0bc202b3bbea5106677b8b142a09d3d57a2bb263.zip |
rt2x00: rt2800pci: move TX descriptor functions to the rt2800mmio module
Move the functions into a separate module, in order
to make those usable from other modules. Also move
the TX descriptor related defines from rt2800pci.h
into rt2800mmio.h.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800mmio.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800mmio.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800mmio.h b/drivers/net/wireless/rt2x00/rt2800mmio.h index 32f9dcde9fad..026664002d01 100644 --- a/drivers/net/wireless/rt2x00/rt2800mmio.h +++ b/drivers/net/wireless/rt2x00/rt2800mmio.h @@ -31,4 +31,51 @@ #ifndef RT2800MMIO_H #define RT2800MMIO_H +/* + * DMA descriptor defines. + */ +#define TXD_DESC_SIZE (4 * sizeof(__le32)) + +/* + * TX descriptor format for TX, PRIO and Beacon Ring. + */ + +/* + * Word0 + */ +#define TXD_W0_SD_PTR0 FIELD32(0xffffffff) + +/* + * Word1 + */ +#define TXD_W1_SD_LEN1 FIELD32(0x00003fff) +#define TXD_W1_LAST_SEC1 FIELD32(0x00004000) +#define TXD_W1_BURST FIELD32(0x00008000) +#define TXD_W1_SD_LEN0 FIELD32(0x3fff0000) +#define TXD_W1_LAST_SEC0 FIELD32(0x40000000) +#define TXD_W1_DMA_DONE FIELD32(0x80000000) + +/* + * Word2 + */ +#define TXD_W2_SD_PTR1 FIELD32(0xffffffff) + +/* + * Word3 + * WIV: Wireless Info Valid. 1: Driver filled WI, 0: DMA needs to copy WI + * QSEL: Select on-chip FIFO ID for 2nd-stage output scheduler. + * 0:MGMT, 1:HCCA 2:EDCA + */ +#define TXD_W3_WIV FIELD32(0x01000000) +#define TXD_W3_QSEL FIELD32(0x06000000) +#define TXD_W3_TCO FIELD32(0x20000000) +#define TXD_W3_UCO FIELD32(0x40000000) +#define TXD_W3_ICO FIELD32(0x80000000) + + +/* TX descriptor initialization */ +__le32 *rt2800mmio_get_txwi(struct queue_entry *entry); +void rt2800mmio_write_tx_desc(struct queue_entry *entry, + struct txentry_desc *txdesc); + #endif /* RT2800MMIO_H */ |