aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.h67
1 files changed, 51 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h
index 2d1eb8144da4..9d1cdb99431c 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.h
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.h
@@ -1,5 +1,5 @@
1/* 1/*
2 Copyright (C) 2004 - 2007 rt2x00 SourceForge Project 2 Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
3 <http://rt2x00.serialmonkey.com> 3 <http://rt2x00.serialmonkey.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
@@ -61,7 +61,7 @@ static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev,
61 const unsigned long offset, 61 const unsigned long offset,
62 u32 *value) 62 u32 *value)
63{ 63{
64 *value = readl(rt2x00dev->csr_addr + offset); 64 *value = readl(rt2x00dev->csr.base + offset);
65} 65}
66 66
67static inline void 67static inline void
@@ -69,14 +69,14 @@ rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev,
69 const unsigned long offset, 69 const unsigned long offset,
70 void *value, const u16 length) 70 void *value, const u16 length)
71{ 71{
72 memcpy_fromio(value, rt2x00dev->csr_addr + offset, length); 72 memcpy_fromio(value, rt2x00dev->csr.base + offset, length);
73} 73}
74 74
75static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev, 75static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev,
76 const unsigned long offset, 76 const unsigned long offset,
77 u32 value) 77 u32 value)
78{ 78{
79 writel(value, rt2x00dev->csr_addr + offset); 79 writel(value, rt2x00dev->csr.base + offset);
80} 80}
81 81
82static inline void 82static inline void
@@ -84,28 +84,63 @@ rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev,
84 const unsigned long offset, 84 const unsigned long offset,
85 void *value, const u16 length) 85 void *value, const u16 length)
86{ 86{
87 memcpy_toio(rt2x00dev->csr_addr + offset, value, length); 87 memcpy_toio(rt2x00dev->csr.base + offset, value, length);
88} 88}
89 89
90/* 90/*
91 * Beacon handlers.
92 */
93int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
94 struct ieee80211_tx_control *control);
95
96/*
97 * TX data handlers. 91 * TX data handlers.
98 */ 92 */
99int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, 93int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
100 struct data_ring *ring, struct sk_buff *skb, 94 struct data_queue *queue, struct sk_buff *skb,
101 struct ieee80211_tx_control *control); 95 struct ieee80211_tx_control *control);
102 96
103/* 97/**
104 * RX/TX data handlers. 98 * struct queue_entry_priv_pci_rx: Per RX entry PCI specific information
99 *
100 * @desc: Pointer to device descriptor.
101 * @data: Pointer to device's entry memory.
102 * @dma: DMA pointer to &data.
103 */
104struct queue_entry_priv_pci_rx {
105 __le32 *desc;
106 dma_addr_t desc_dma;
107
108 void *data;
109 dma_addr_t data_dma;
110};
111
112/**
113 * struct queue_entry_priv_pci_tx: Per TX entry PCI specific information
114 *
115 * @desc: Pointer to device descriptor
116 * @data: Pointer to device's entry memory.
117 * @dma: DMA pointer to &data.
118 * @control: mac80211 control structure used to transmit data.
119 */
120struct queue_entry_priv_pci_tx {
121 __le32 *desc;
122 dma_addr_t desc_dma;
123
124 void *data;
125 dma_addr_t data_dma;
126
127 struct ieee80211_tx_control control;
128};
129
130/**
131 * rt2x00pci_rxdone - Handle RX done events
132 * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
105 */ 133 */
106void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev); 134void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev);
107void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct data_entry *entry, 135
108 const int tx_status, const int retry); 136/**
137 * rt2x00pci_txdone - Handle TX done events
138 * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
139 * @entry: Entry which has completed the transmission of a frame.
140 * @desc: TX done descriptor
141 */
142void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct queue_entry *entry,
143 struct txdone_entry_desc *desc);
109 144
110/* 145/*
111 * Device initialization handlers. 146 * Device initialization handlers.