summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-17 17:32:08 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:22 -0500
commitbaf26a7eae3b05d25dd967b92eb2e09406ed9cf4 (patch)
tree7d49c6960f47c031025d121dd93300cfb812958b /drivers/net/wireless/rt2x00/rt2x00dev.c
parentac1aa7e4f3c73ecb09fddf59c1924530155d9359 (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.c20
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,
struct txdone_entry_desc *txdesc)
{
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
+ struct skb_frame_desc *skbdesc;
struct ieee80211_tx_status tx_status;
int success = !!(txdesc->status == TX_SUCCESS ||
txdesc->status == TX_SUCCESS_RETRY);
@@ -540,12 +541,23 @@ void rt2x00lib_txdone(struct queue_entry *entry,
}
/*
- * Send the tx_status to mac80211 & debugfs.
- * mac80211 will clean up the skb structure.
+ * Send the tx_status to debugfs. Only send the status report
+ * to mac80211 when the frame originated from there. If this was
+ * a extra frame coming through a mac80211 library call (RTS/CTS)
+ * then we should not send the status report back.
+ * If send to mac80211, mac80211 will clean up the skb structure,
+ * otherwise we have to do it ourself.
*/
- get_skb_frame_desc(entry->skb)->frame_type = DUMP_FRAME_TXDONE;
+ skbdesc = get_skb_frame_desc(entry->skb);
+ skbdesc->frame_type = DUMP_FRAME_TXDONE;
+
rt2x00debug_dump_frame(rt2x00dev, entry->skb);
- ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb, &tx_status);
+
+ if (!(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED))
+ ieee80211_tx_status_irqsafe(rt2x00dev->hw,
+ entry->skb, &tx_status);
+ else
+ dev_kfree_skb(entry->skb);
entry->skb = NULL;
}
EXPORT_SYMBOL_GPL(rt2x00lib_txdone);