diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/status.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 9f91fd8e6efb..d78f36c64c7b 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -148,6 +148,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
148 | struct net_device *prev_dev = NULL; | 148 | struct net_device *prev_dev = NULL; |
149 | struct sta_info *sta; | 149 | struct sta_info *sta; |
150 | int retry_count = -1, i; | 150 | int retry_count = -1, i; |
151 | bool injected; | ||
151 | 152 | ||
152 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { | 153 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { |
153 | /* the HW cannot have attempted that rate */ | 154 | /* the HW cannot have attempted that rate */ |
@@ -297,6 +298,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
297 | /* for now report the total retry_count */ | 298 | /* for now report the total retry_count */ |
298 | rthdr->data_retries = retry_count; | 299 | rthdr->data_retries = retry_count; |
299 | 300 | ||
301 | /* Need to make a copy before skb->cb gets cleared */ | ||
302 | injected = !!(info->flags & IEEE80211_TX_CTL_INJECTED); | ||
303 | |||
300 | /* XXX: is this sufficient for BPF? */ | 304 | /* XXX: is this sufficient for BPF? */ |
301 | skb_set_mac_header(skb, 0); | 305 | skb_set_mac_header(skb, 0); |
302 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 306 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -311,7 +315,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
311 | continue; | 315 | continue; |
312 | 316 | ||
313 | if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) && | 317 | if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) && |
314 | !(info->flags & IEEE80211_TX_CTL_INJECTED) && | 318 | !injected && |
315 | (type == IEEE80211_FTYPE_DATA)) | 319 | (type == IEEE80211_FTYPE_DATA)) |
316 | continue; | 320 | continue; |
317 | 321 | ||