aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500usb.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/rt2500usb.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/rt2500usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 97cf72f8bc1..8722464944f 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1041,12 +1041,11 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev,
1041/* 1041/*
1042 * TX descriptor initialization 1042 * TX descriptor initialization
1043 */ 1043 */
1044static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, 1044static void rt2500usb_write_tx_desc(struct queue_entry *entry,
1045 struct sk_buff *skb,
1046 struct txentry_desc *txdesc) 1045 struct txentry_desc *txdesc)
1047{ 1046{
1048 struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); 1047 struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
1049 __le32 *txd = (__le32 *) skb->data; 1048 __le32 *txd = (__le32 *) entry->skb->data;
1050 u32 word; 1049 u32 word;
1051 1050
1052 /* 1051 /*
@@ -1129,7 +1128,7 @@ static void rt2500usb_write_beacon(struct queue_entry *entry,
1129 /* 1128 /*
1130 * Write the TX descriptor for the beacon. 1129 * Write the TX descriptor for the beacon.
1131 */ 1130 */
1132 rt2500usb_write_tx_desc(rt2x00dev, entry->skb, txdesc); 1131 rt2500usb_write_tx_desc(entry, txdesc);
1133 1132
1134 /* 1133 /*
1135 * Dump beacon to userspace through debugfs. 1134 * Dump beacon to userspace through debugfs.