aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.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/rt2x00usb.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/rt2x00usb.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h48
1 files changed, 45 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index b5c1d176c481..af606638e227 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -160,16 +160,58 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev);
160 * TX data handlers. 160 * TX data handlers.
161 */ 161 */
162int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, 162int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
163 struct data_ring *ring, struct sk_buff *skb, 163 struct data_queue *queue, struct sk_buff *skb,
164 struct ieee80211_tx_control *control); 164 struct ieee80211_tx_control *control);
165 165
166/**
167 * struct queue_entry_priv_usb_rx: Per RX entry USB specific information
168 *
169 * @urb: Urb structure used for device communication.
170 */
171struct queue_entry_priv_usb_rx {
172 struct urb *urb;
173};
174
175/**
176 * struct queue_entry_priv_usb_tx: Per TX entry USB specific information
177 *
178 * @urb: Urb structure used for device communication.
179 * @control: mac80211 control structure used to transmit data.
180 */
181struct queue_entry_priv_usb_tx {
182 struct urb *urb;
183
184 struct ieee80211_tx_control control;
185};
186
187/**
188 * struct queue_entry_priv_usb_tx: Per TX entry USB specific information
189 *
190 * The first section should match &struct queue_entry_priv_usb_tx exactly.
191 * rt2500usb can use this structure to send a guardian byte when working
192 * with beacons.
193 *
194 * @urb: Urb structure used for device communication.
195 * @control: mac80211 control structure used to transmit data.
196 * @guardian_data: Set to 0, used for sending the guardian data.
197 * @guardian_urb: Urb structure used to send the guardian data.
198 */
199struct queue_entry_priv_usb_bcn {
200 struct urb *urb;
201
202 struct ieee80211_tx_control control;
203
204 unsigned int guardian_data;
205 struct urb *guardian_urb;
206};
207
166/* 208/*
167 * Device initialization handlers. 209 * Device initialization handlers.
168 */ 210 */
169void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev, 211void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev,
170 struct data_entry *entry); 212 struct queue_entry *entry);
171void rt2x00usb_init_txentry(struct rt2x00_dev *rt2x00dev, 213void rt2x00usb_init_txentry(struct rt2x00_dev *rt2x00dev,
172 struct data_entry *entry); 214 struct queue_entry *entry);
173int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev); 215int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev);
174void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev); 216void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev);
175 217