aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00pci.h
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2008-02-05 16:42:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:27 -0500
commit181d6902b6bad978d157e69479c95cc0ff213a76 (patch)
tree7a90b8a949a50bc8db6b7b5b2d76d5671fb9a89e /drivers/net/wireless/rt2x00/rt2x00pci.h
parent811aa9cad1bd927999888ab56ed9592519d2fef6 (diff)
rt2x00: Queue handling overhaul
This introduces a big queue handling overhaul, this also renames "ring" to "queues". Move queue handling into rt2x00queue.c and the matching header, use Kerneldoc to improve rt2x00 library documentation. Access to the queues is now protected under a spinlock, this to prevent race conditions which could corrupt the indexing system of the queue. Each queue entry allocates x bytes for driver/device specific data, this cleans up the queue structure significantly and improves code readability. rt2500usb no longer needs 2 entries in the beacon queue to correctly send out the guardian byte. This is now handled in the entry specific structure. rt61 and rt73 now use the correct descriptor size for beacon frames, since this data is written into the registers not the entire TXD descriptor was used but instead of a subset of it named TXINFO. Finally this also fixes numerous other bugs related to incorrect beacon handling or beacon related code. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.h49
1 files changed, 44 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h
index 9ac560b87b2b..3b1597ffb4f2 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.h
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.h
@@ -97,15 +97,54 @@ int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
97 * TX data handlers. 97 * TX data handlers.
98 */ 98 */
99int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, 99int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
100 struct data_ring *ring, struct sk_buff *skb, 100 struct data_queue *queue, struct sk_buff *skb,
101 struct ieee80211_tx_control *control); 101 struct ieee80211_tx_control *control);
102 102
103/* 103/**
104 * RX/TX data handlers. 104 * struct queue_entry_priv_pci_rx: Per RX entry PCI specific information
105 *
106 * @desc: Pointer to device descriptor.
107 * @data: Pointer to device's entry memory.
108 * @dma: DMA pointer to &data.
109 */
110struct queue_entry_priv_pci_rx {
111 __le32 *desc;
112
113 void *data;
114 dma_addr_t dma;
115};
116
117/**
118 * struct queue_entry_priv_pci_tx: Per TX entry PCI specific information
119 *
120 * @desc: Pointer to device descriptor
121 * @data: Pointer to device's entry memory.
122 * @dma: DMA pointer to &data.
123 * @control: mac80211 control structure used to transmit data.
124 */
125struct queue_entry_priv_pci_tx {
126 __le32 *desc;
127
128 void *data;
129 dma_addr_t dma;
130
131 struct ieee80211_tx_control control;
132};
133
134/**
135 * rt2x00pci_rxdone - Handle RX done events
136 * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
105 */ 137 */
106void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev); 138void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev);
107void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct data_entry *entry, 139
108 const int tx_status, const int retry); 140/**
141 * rt2x00pci_txdone - Handle TX done events
142 * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
143 * @entry: Entry which has completed the transmission of a frame.
144 * @desc: TX done descriptor
145 */
146void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct queue_entry *entry,
147 struct txdone_entry_desc *desc);
109 148
110/* 149/*
111 * Device initialization handlers. 150 * Device initialization handlers.