diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index d69f7407b972..6ccbfc7cbf91 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -500,6 +500,7 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
500 | struct txdone_entry_desc *txdesc) | 500 | struct txdone_entry_desc *txdesc) |
501 | { | 501 | { |
502 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 502 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
503 | struct skb_frame_desc *skbdesc; | ||
503 | struct ieee80211_tx_status tx_status; | 504 | struct ieee80211_tx_status tx_status; |
504 | int success = !!(txdesc->status == TX_SUCCESS || | 505 | int success = !!(txdesc->status == TX_SUCCESS || |
505 | txdesc->status == TX_SUCCESS_RETRY); | 506 | txdesc->status == TX_SUCCESS_RETRY); |
@@ -540,12 +541,23 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
540 | } | 541 | } |
541 | 542 | ||
542 | /* | 543 | /* |
543 | * Send the tx_status to mac80211 & debugfs. | 544 | * Send the tx_status to debugfs. Only send the status report |
544 | * mac80211 will clean up the skb structure. | 545 | * to mac80211 when the frame originated from there. If this was |
546 | * a extra frame coming through a mac80211 library call (RTS/CTS) | ||
547 | * then we should not send the status report back. | ||
548 | * If send to mac80211, mac80211 will clean up the skb structure, | ||
549 | * otherwise we have to do it ourself. | ||
545 | */ | 550 | */ |
546 | get_skb_frame_desc(entry->skb)->frame_type = DUMP_FRAME_TXDONE; | 551 | skbdesc = get_skb_frame_desc(entry->skb); |
552 | skbdesc->frame_type = DUMP_FRAME_TXDONE; | ||
553 | |||
547 | rt2x00debug_dump_frame(rt2x00dev, entry->skb); | 554 | rt2x00debug_dump_frame(rt2x00dev, entry->skb); |
548 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb, &tx_status); | 555 | |
556 | if (!(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED)) | ||
557 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, | ||
558 | entry->skb, &tx_status); | ||
559 | else | ||
560 | dev_kfree_skb(entry->skb); | ||
549 | entry->skb = NULL; | 561 | entry->skb = NULL; |
550 | } | 562 | } |
551 | EXPORT_SYMBOL_GPL(rt2x00lib_txdone); | 563 | EXPORT_SYMBOL_GPL(rt2x00lib_txdone); |