diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-10-17 09:42:23 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 14:06:59 -0400 |
commit | d5580ade2fec2a0d50ceee7a9ce44a35a4de133b (patch) | |
tree | 9b4e3ef9ad7ceac901174c27deb0b359b13d6238 /drivers/net/wireless/rt2x00/rt2800mmio.h | |
parent | 51e62469eac296d39d57fb75f182e4ef8066f82f (diff) | |
download | blackbird-op-linux-d5580ade2fec2a0d50ceee7a9ce44a35a4de133b.tar.gz blackbird-op-linux-d5580ade2fec2a0d50ceee7a9ce44a35a4de133b.zip |
rt2x00: rt2800pci: move queue functions to the rt2800mmio module
Move the functions into a separate module, in order
to make those usable from other modules. Also move
the queue register offset macros 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 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800mmio.h b/drivers/net/wireless/rt2x00/rt2800mmio.h index 30e66ab9af37..676df2e62d45 100644 --- a/drivers/net/wireless/rt2x00/rt2800mmio.h +++ b/drivers/net/wireless/rt2x00/rt2800mmio.h @@ -32,6 +32,15 @@ #define RT2800MMIO_H /* + * Queue register offset macros + */ +#define TX_QUEUE_REG_OFFSET 0x10 +#define TX_BASE_PTR(__x) (TX_BASE_PTR0 + ((__x) * TX_QUEUE_REG_OFFSET)) +#define TX_MAX_CNT(__x) (TX_MAX_CNT0 + ((__x) * TX_QUEUE_REG_OFFSET)) +#define TX_CTX_IDX(__x) (TX_CTX_IDX0 + ((__x) * TX_QUEUE_REG_OFFSET)) +#define TX_DTX_IDX(__x) (TX_DTX_IDX0 + ((__x) * TX_QUEUE_REG_OFFSET)) + +/* * DMA descriptor defines. */ #define TXD_DESC_SIZE (4 * sizeof(__le32)) @@ -138,4 +147,10 @@ irqreturn_t rt2800mmio_interrupt(int irq, void *dev_instance); void rt2800mmio_toggle_irq(struct rt2x00_dev *rt2x00dev, enum dev_state state); +/* Queue handlers */ +void rt2800mmio_start_queue(struct data_queue *queue); +void rt2800mmio_kick_queue(struct data_queue *queue); +void rt2800mmio_stop_queue(struct data_queue *queue); +void rt2800mmio_queue_init(struct data_queue *queue); + #endif /* RT2800MMIO_H */ |