aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-06-29 15:43:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-30 15:00:50 -0400
commit9cf4cb05c9634eda4b51db1f55fecdec4a145a57 (patch)
tree1b87ddf70ff7121ac019ecb76d4ec7b46b42dbf3 /drivers/net/wireless/rt2x00/rt2800usb.c
parent76dd5ddf2372c1b2673a79bd077b4afe0bb2828d (diff)
rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.
Align with the way PCI devices are handled, even though it is not strictly necessary. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> 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/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 6d4de6080040..4f85f7b42441 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -430,21 +430,24 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev,
430/* 430/*
431 * TX descriptor initialization 431 * TX descriptor initialization
432 */ 432 */
433static void rt2800usb_write_tx_data(struct queue_entry* entry,
434 struct txentry_desc *txdesc)
435{
436 __le32 *txwi = (__le32 *) (entry->skb->data + TXINFO_DESC_SIZE);
437
438 rt2800_write_txwi(txwi, txdesc);
439}
440
441
433static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, 442static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
434 struct sk_buff *skb, 443 struct sk_buff *skb,
435 struct txentry_desc *txdesc) 444 struct txentry_desc *txdesc)
436{ 445{
437 struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); 446 struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);
438 __le32 *txi = (__le32 *) skb->data; 447 __le32 *txi = (__le32 *) skb->data;
439 __le32 *txwi = (__le32 *) (skb->data + TXINFO_DESC_SIZE);
440 u32 word; 448 u32 word;
441 449
442 /* 450 /*
443 * Initialize TXWI descriptor
444 */
445 rt2800_write_txwi(txwi, txdesc);
446
447 /*
448 * Initialize TXINFO descriptor 451 * Initialize TXINFO descriptor
449 */ 452 */
450 rt2x00_desc_read(txi, 0, &word); 453 rt2x00_desc_read(txi, 0, &word);
@@ -652,6 +655,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
652 .reset_tuner = rt2800_reset_tuner, 655 .reset_tuner = rt2800_reset_tuner,
653 .link_tuner = rt2800_link_tuner, 656 .link_tuner = rt2800_link_tuner,
654 .write_tx_desc = rt2800usb_write_tx_desc, 657 .write_tx_desc = rt2800usb_write_tx_desc,
658 .write_tx_data = rt2800usb_write_tx_data,
655 .write_beacon = rt2800_write_beacon, 659 .write_beacon = rt2800_write_beacon,
656 .get_tx_data_len = rt2800usb_get_tx_data_len, 660 .get_tx_data_len = rt2800usb_get_tx_data_len,
657 .kick_tx_queue = rt2x00usb_kick_tx_queue, 661 .kick_tx_queue = rt2x00usb_kick_tx_queue,