aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-08-23 13:53:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-25 14:34:54 -0400
commit933314582ee5db00123683cf4c4d713ec9add306 (patch)
tree6d0be156f19ad0f4b78da5577f56995beb43a15a /drivers/net/wireless/rt2x00/rt2x00usb.c
parent18c121d7558a550e8e48956fbd389759a850ab53 (diff)
rt2x00: Simplify arguments to rt2x00 driver callback functions
write_tx_desc shouldn't pass a rt2x00dev and skb pointer, instead it should use the same format as other TX frame callback functions, which is passing the data_entry pointer which contains all the information which is needed to work on a TX frame. Most callers of the kick_tx_queue and kill_tx_queue already have the data_queue pointer, so rather then sending the QID with the given function, when the driver requests a new pointer to the data_queue, it is more efficient to just send the data_queue pointer directly. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index f76014f732ce..52ed3f44c843 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -249,10 +249,8 @@ static inline void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
249 } 249 }
250} 250}
251 251
252void rt2x00usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 252void rt2x00usb_kick_tx_queue(struct data_queue *queue)
253 const enum data_queue_qid qid)
254{ 253{
255 struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, qid);
256 unsigned long irqflags; 254 unsigned long irqflags;
257 unsigned int index; 255 unsigned int index;
258 unsigned int index_done; 256 unsigned int index_done;
@@ -286,10 +284,8 @@ void rt2x00usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
286} 284}
287EXPORT_SYMBOL_GPL(rt2x00usb_kick_tx_queue); 285EXPORT_SYMBOL_GPL(rt2x00usb_kick_tx_queue);
288 286
289void rt2x00usb_kill_tx_queue(struct rt2x00_dev *rt2x00dev, 287void rt2x00usb_kill_tx_queue(struct data_queue *queue)
290 const enum data_queue_qid qid)
291{ 288{
292 struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, qid);
293 struct queue_entry_priv_usb *entry_priv; 289 struct queue_entry_priv_usb *entry_priv;
294 struct queue_entry_priv_usb_bcn *bcn_priv; 290 struct queue_entry_priv_usb_bcn *bcn_priv;
295 unsigned int i; 291 unsigned int i;
@@ -300,8 +296,8 @@ void rt2x00usb_kill_tx_queue(struct rt2x00_dev *rt2x00dev,
300 * the beacon guard byte. 296 * the beacon guard byte.
301 */ 297 */
302 kill_guard = 298 kill_guard =
303 (qid == QID_BEACON) && 299 (queue->qid == QID_BEACON) &&
304 (test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags)); 300 (test_bit(DRIVER_REQUIRE_BEACON_GUARD, &queue->rt2x00dev->flags));
305 301
306 /* 302 /*
307 * Cancel all entries. 303 * Cancel all entries.
@@ -447,7 +443,7 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
447 * The USB version of kill_tx_queue also works 443 * The USB version of kill_tx_queue also works
448 * on the RX queue. 444 * on the RX queue.
449 */ 445 */
450 rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev, QID_RX); 446 rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev->rx);
451} 447}
452EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio); 448EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio);
453 449