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>
This commit is contained in:

committed by
John W. Linville

parent
18c121d755
commit
933314582e
@@ -449,15 +449,14 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry,
|
||||
struct txentry_desc *txdesc)
|
||||
{
|
||||
struct data_queue *queue = entry->queue;
|
||||
struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
|
||||
|
||||
rt2x00dev->ops->lib->write_tx_desc(rt2x00dev, entry->skb, txdesc);
|
||||
queue->rt2x00dev->ops->lib->write_tx_desc(entry, txdesc);
|
||||
|
||||
/*
|
||||
* All processing on the frame has been completed, this means
|
||||
* it is now ready to be dumped to userspace through debugfs.
|
||||
*/
|
||||
rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TX, entry->skb);
|
||||
rt2x00debug_dump_frame(queue->rt2x00dev, DUMP_FRAME_TX, entry->skb);
|
||||
}
|
||||
|
||||
static void rt2x00queue_kick_tx_queue(struct queue_entry *entry,
|
||||
@@ -477,7 +476,7 @@ static void rt2x00queue_kick_tx_queue(struct queue_entry *entry,
|
||||
*/
|
||||
if (rt2x00queue_threshold(queue) ||
|
||||
!test_bit(ENTRY_TXD_BURST, &txdesc->flags))
|
||||
rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, queue->qid);
|
||||
rt2x00dev->ops->lib->kick_tx_queue(queue);
|
||||
}
|
||||
|
||||
int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
|
||||
@@ -591,7 +590,7 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
|
||||
intf->beacon->skb = NULL;
|
||||
|
||||
if (!enable_beacon) {
|
||||
rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev, QID_BEACON);
|
||||
rt2x00dev->ops->lib->kill_tx_queue(intf->beacon->queue);
|
||||
mutex_unlock(&intf->beacon_skb_mutex);
|
||||
return 0;
|
||||
}
|
||||
@@ -719,7 +718,7 @@ void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev)
|
||||
struct data_queue *queue;
|
||||
|
||||
txall_queue_for_each(rt2x00dev, queue)
|
||||
rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev, queue->qid);
|
||||
rt2x00dev->ops->lib->kill_tx_queue(queue);
|
||||
}
|
||||
|
||||
void rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev)
|
||||
|
Reference in New Issue
Block a user