diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-08-23 13:53:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:34:54 -0400 |
commit | 933314582ee5db00123683cf4c4d713ec9add306 (patch) | |
tree | 6d0be156f19ad0f4b78da5577f56995beb43a15a /drivers/net/wireless/rt2x00/rt73usb.c | |
parent | 18c121d7558a550e8e48956fbd389759a850ab53 (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/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index c65529678fb..ab9389439d7 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1426,12 +1426,11 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1426 | /* | 1426 | /* |
1427 | * TX descriptor initialization | 1427 | * TX descriptor initialization |
1428 | */ | 1428 | */ |
1429 | static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | 1429 | static void rt73usb_write_tx_desc(struct queue_entry *entry, |
1430 | struct sk_buff *skb, | ||
1431 | struct txentry_desc *txdesc) | 1430 | struct txentry_desc *txdesc) |
1432 | { | 1431 | { |
1433 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 1432 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
1434 | __le32 *txd = (__le32 *) skb->data; | 1433 | __le32 *txd = (__le32 *) entry->skb->data; |
1435 | u32 word; | 1434 | u32 word; |
1436 | 1435 | ||
1437 | /* | 1436 | /* |
@@ -1487,7 +1486,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1487 | 1486 | ||
1488 | rt2x00_desc_read(txd, 5, &word); | 1487 | rt2x00_desc_read(txd, 5, &word); |
1489 | rt2x00_set_field32(&word, TXD_W5_TX_POWER, | 1488 | rt2x00_set_field32(&word, TXD_W5_TX_POWER, |
1490 | TXPOWER_TO_DEV(rt2x00dev->tx_power)); | 1489 | TXPOWER_TO_DEV(entry->queue->rt2x00dev->tx_power)); |
1491 | rt2x00_set_field32(&word, TXD_W5_WAITING_DMA_DONE_INT, 1); | 1490 | rt2x00_set_field32(&word, TXD_W5_WAITING_DMA_DONE_INT, 1); |
1492 | rt2x00_desc_write(txd, 5, word); | 1491 | rt2x00_desc_write(txd, 5, word); |
1493 | 1492 | ||
@@ -1526,7 +1525,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry, | |||
1526 | /* | 1525 | /* |
1527 | * Write the TX descriptor for the beacon. | 1526 | * Write the TX descriptor for the beacon. |
1528 | */ | 1527 | */ |
1529 | rt73usb_write_tx_desc(rt2x00dev, entry->skb, txdesc); | 1528 | rt73usb_write_tx_desc(entry, txdesc); |
1530 | 1529 | ||
1531 | /* | 1530 | /* |
1532 | * Dump beacon to userspace through debugfs. | 1531 | * Dump beacon to userspace through debugfs. |