diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 99b14ba99d97..2a63a7b911b4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -504,6 +504,12 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
504 | { | 504 | { |
505 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 505 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
506 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); | 506 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); |
507 | enum data_queue_qid qid = skb_get_queue_mapping(entry->skb); | ||
508 | |||
509 | /* | ||
510 | * Unmap the skb. | ||
511 | */ | ||
512 | rt2x00queue_unmap_skb(rt2x00dev, entry->skb); | ||
507 | 513 | ||
508 | /* | 514 | /* |
509 | * Send frame to debugfs immediately, after this call is completed | 515 | * Send frame to debugfs immediately, after this call is completed |
@@ -552,7 +558,25 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
552 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb); | 558 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb); |
553 | else | 559 | else |
554 | dev_kfree_skb_irq(entry->skb); | 560 | dev_kfree_skb_irq(entry->skb); |
561 | |||
562 | /* | ||
563 | * Make this entry available for reuse. | ||
564 | */ | ||
555 | entry->skb = NULL; | 565 | entry->skb = NULL; |
566 | entry->flags = 0; | ||
567 | |||
568 | rt2x00dev->ops->lib->init_txentry(rt2x00dev, entry); | ||
569 | |||
570 | __clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags); | ||
571 | rt2x00queue_index_inc(entry->queue, Q_INDEX_DONE); | ||
572 | |||
573 | /* | ||
574 | * If the data queue was below the threshold before the txdone | ||
575 | * handler we must make sure the packet queue in the mac80211 stack | ||
576 | * is reenabled when the txdone handler has finished. | ||
577 | */ | ||
578 | if (!rt2x00queue_threshold(entry->queue)) | ||
579 | ieee80211_wake_queue(rt2x00dev->hw, qid); | ||
556 | } | 580 | } |
557 | EXPORT_SYMBOL_GPL(rt2x00lib_txdone); | 581 | EXPORT_SYMBOL_GPL(rt2x00lib_txdone); |
558 | 582 | ||
@@ -657,6 +681,11 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev, | |||
657 | * Replace the skb with the freshly allocated one. | 681 | * Replace the skb with the freshly allocated one. |
658 | */ | 682 | */ |
659 | entry->skb = skb; | 683 | entry->skb = skb; |
684 | entry->flags = 0; | ||
685 | |||
686 | rt2x00dev->ops->lib->init_rxentry(rt2x00dev, entry); | ||
687 | |||
688 | rt2x00queue_index_inc(entry->queue, Q_INDEX); | ||
660 | } | 689 | } |
661 | EXPORT_SYMBOL_GPL(rt2x00lib_rxdone); | 690 | EXPORT_SYMBOL_GPL(rt2x00lib_rxdone); |
662 | 691 | ||