aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-21 20:05:11 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-21 20:05:11 -0500
commit6c0bce37ffc8f000a516fadf6dee84579c4c8f9b (patch)
tree273af34d6f777b1ecb0fce7b2685e868064e6cf9 /drivers/net/wireless/rt2x00/rt2x00queue.c
parente243455d345ef62751723671bc2605a2f6032ceb (diff)
parenta1eb5fe319beb9e181aa52c8adf75ad9aab56a89 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index e9f4261054bc..d7752dbd2023 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -319,8 +319,8 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
319 /* 319 /*
320 * Convert length to microseconds. 320 * Convert length to microseconds.
321 */ 321 */
322 residual = get_duration_res(data_length, hwrate->bitrate); 322 residual = GET_DURATION_RES(data_length, hwrate->bitrate);
323 duration = get_duration(data_length, hwrate->bitrate); 323 duration = GET_DURATION(data_length, hwrate->bitrate);
324 324
325 if (residual != 0) { 325 if (residual != 0) {
326 duration++; 326 duration++;
@@ -589,40 +589,18 @@ static void rt2x00queue_reset(struct data_queue *queue)
589 spin_unlock_irqrestore(&queue->lock, irqflags); 589 spin_unlock_irqrestore(&queue->lock, irqflags);
590} 590}
591 591
592void rt2x00queue_init_rx(struct rt2x00_dev *rt2x00dev) 592void rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev)
593{
594 struct data_queue *queue = rt2x00dev->rx;
595 unsigned int i;
596
597 rt2x00queue_reset(queue);
598
599 if (!rt2x00dev->ops->lib->init_rxentry)
600 return;
601
602 for (i = 0; i < queue->limit; i++) {
603 queue->entries[i].flags = 0;
604
605 rt2x00dev->ops->lib->init_rxentry(rt2x00dev,
606 &queue->entries[i]);
607 }
608}
609
610void rt2x00queue_init_tx(struct rt2x00_dev *rt2x00dev)
611{ 593{
612 struct data_queue *queue; 594 struct data_queue *queue;
613 unsigned int i; 595 unsigned int i;
614 596
615 txall_queue_for_each(rt2x00dev, queue) { 597 queue_for_each(rt2x00dev, queue) {
616 rt2x00queue_reset(queue); 598 rt2x00queue_reset(queue);
617 599
618 if (!rt2x00dev->ops->lib->init_txentry)
619 continue;
620
621 for (i = 0; i < queue->limit; i++) { 600 for (i = 0; i < queue->limit; i++) {
622 queue->entries[i].flags = 0; 601 queue->entries[i].flags = 0;
623 602
624 rt2x00dev->ops->lib->init_txentry(rt2x00dev, 603 rt2x00dev->ops->lib->clear_entry(&queue->entries[i]);
625 &queue->entries[i]);
626 } 604 }
627 } 605 }
628} 606}