diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index e22029fcf411..089a12c7b90f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
| @@ -429,20 +429,23 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry, | |||
| 429 | * it is now ready to be dumped to userspace through debugfs. | 429 | * it is now ready to be dumped to userspace through debugfs. |
| 430 | */ | 430 | */ |
| 431 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TX, entry->skb); | 431 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TX, entry->skb); |
| 432 | } | ||
| 433 | |||
| 434 | static void rt2x00queue_kick_tx_queue(struct queue_entry *entry, | ||
| 435 | struct txentry_desc *txdesc) | ||
| 436 | { | ||
| 437 | struct data_queue *queue = entry->queue; | ||
| 438 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
| 432 | 439 | ||
| 433 | /* | 440 | /* |
| 434 | * Check if we need to kick the queue, there are however a few rules | 441 | * Check if we need to kick the queue, there are however a few rules |
| 435 | * 1) Don't kick beacon queue | 442 | * 1) Don't kick unless this is the last in frame in a burst. |
| 436 | * 2) Don't kick unless this is the last in frame in a burst. | ||
| 437 | * When the burst flag is set, this frame is always followed | 443 | * When the burst flag is set, this frame is always followed |
| 438 | * by another frame which in some way are related to eachother. | 444 | * by another frame which in some way are related to eachother. |
| 439 | * This is true for fragments, RTS or CTS-to-self frames. | 445 | * This is true for fragments, RTS or CTS-to-self frames. |
| 440 | * 3) Rule 2 can be broken when the available entries | 446 | * 2) Rule 1 can be broken when the available entries |
| 441 | * in the queue are less then a certain threshold. | 447 | * in the queue are less then a certain threshold. |
| 442 | */ | 448 | */ |
| 443 | if (entry->queue->qid == QID_BEACON) | ||
| 444 | return; | ||
| 445 | |||
| 446 | if (rt2x00queue_threshold(queue) || | 449 | if (rt2x00queue_threshold(queue) || |
| 447 | !test_bit(ENTRY_TXD_BURST, &txdesc->flags)) | 450 | !test_bit(ENTRY_TXD_BURST, &txdesc->flags)) |
| 448 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, queue->qid); | 451 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, queue->qid); |
| @@ -538,6 +541,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, | |||
| 538 | 541 | ||
| 539 | rt2x00queue_index_inc(queue, Q_INDEX); | 542 | rt2x00queue_index_inc(queue, Q_INDEX); |
| 540 | rt2x00queue_write_tx_descriptor(entry, &txdesc); | 543 | rt2x00queue_write_tx_descriptor(entry, &txdesc); |
| 544 | rt2x00queue_kick_tx_queue(entry, &txdesc); | ||
| 541 | 545 | ||
| 542 | return 0; | 546 | return 0; |
| 543 | } | 547 | } |
| @@ -603,12 +607,9 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev, | |||
| 603 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); | 607 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); |
| 604 | 608 | ||
| 605 | /* | 609 | /* |
| 606 | * Send beacon to hardware. | 610 | * Send beacon to hardware and enable beacon genaration.. |
| 607 | * Also enable beacon generation, which might have been disabled | ||
| 608 | * by the driver during the config_beacon() callback function. | ||
| 609 | */ | 611 | */ |
| 610 | rt2x00dev->ops->lib->write_beacon(intf->beacon); | 612 | rt2x00dev->ops->lib->write_beacon(intf->beacon, &txdesc); |
| 611 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON); | ||
| 612 | 613 | ||
| 613 | mutex_unlock(&intf->beacon_skb_mutex); | 614 | mutex_unlock(&intf->beacon_skb_mutex); |
| 614 | 615 | ||
