diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-17 11:32:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:22 -0500 |
commit | baf26a7eae3b05d25dd967b92eb2e09406ed9cf4 (patch) | |
tree | 7d49c6960f47c031025d121dd93300cfb812958b /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | ac1aa7e4f3c73ecb09fddf59c1924530155d9359 (diff) |
rt2x00: Don't report driver generated frames to tx_status()
This adds a new flag for the skb_frame_desc structure which is used to tag
rts/cts frames that are generated by the driver. Through the tag we can
recognize frames we have generated ourselves, so we don't report their tx
status to mac80211.
This patch is based on the original patch by
Mattias Nissler <mattias.nissler@gmx.de>.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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); |