aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-18 19:08:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-19 11:08:56 -0500
commit7351c6bd482712e5e3ec9dffc547de0e0863efb0 (patch)
tree1847c0470af79727b58611a69fa82384bd904d60 /drivers/net/wireless/rt2x00/rt2x00dev.c
parentad4bb6f8883a13bb0f65b194dae36c62a02ac779 (diff)
mac80211: request TX status where needed
Right now all frames mac80211 hands to the driver have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set to request TX status. This isn't really necessary, only the injected frames need TX status (the latter for hostapd) so move setting this flag. The rate control algorithms also need TX status, but they don't require it. Also, rt2x00 uses that bit for its own purposes and seems to require it being set for all frames, but that can be fixed in rt2x00. This doesn't really change anything for any drivers but in the future drivers using hw-rate control may opt to not report TX status for frames that don't have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> [rt2x00 bits] 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 6c6d0ac35549..4a4b7e42fe6e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -205,6 +205,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
205 enum data_queue_qid qid = skb_get_queue_mapping(entry->skb); 205 enum data_queue_qid qid = skb_get_queue_mapping(entry->skb);
206 unsigned int header_length = ieee80211_get_hdrlen_from_skb(entry->skb); 206 unsigned int header_length = ieee80211_get_hdrlen_from_skb(entry->skb);
207 u8 rate_idx, rate_flags, retry_rates; 207 u8 rate_idx, rate_flags, retry_rates;
208 u8 skbdesc_flags = skbdesc->flags;
208 unsigned int i; 209 unsigned int i;
209 bool success; 210 bool success;
210 211
@@ -287,12 +288,12 @@ void rt2x00lib_txdone(struct queue_entry *entry,
287 } 288 }
288 289
289 /* 290 /*
290 * Only send the status report to mac80211 when TX status was 291 * Only send the status report to mac80211 when it's a frame
291 * requested by it. If this was a extra frame coming through 292 * that originated in mac80211. If this was a extra frame coming
292 * a mac80211 library call (RTS/CTS) then we should not send the 293 * through a mac80211 library call (RTS/CTS) then we should not
293 * status report back. 294 * send the status report back.
294 */ 295 */
295 if (tx_info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) 296 if (!(skbdesc_flags & SKBDESC_NOT_MAC80211))
296 ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb); 297 ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb);
297 else 298 else
298 dev_kfree_skb_irq(entry->skb); 299 dev_kfree_skb_irq(entry->skb);