From 2b978456b9e794b343b86fa08385ec18698d9a5c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 29 Nov 2009 14:29:42 +0200 Subject: [PATCH] --- yaml --- r: 172240 b: refs/heads/master c: 914828fad09269292be1bfa3dfbe78d064f76068 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/mac80211/status.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 99a5ac35902d..d504690a61a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9a29ce674ac62e7bfcb6c1404ca86cda4782988 +refs/heads/master: 914828fad09269292be1bfa3dfbe78d064f76068 diff --git a/trunk/net/mac80211/status.c b/trunk/net/mac80211/status.c index 9f91fd8e6efb..d78f36c64c7b 100644 --- a/trunk/net/mac80211/status.c +++ b/trunk/net/mac80211/status.c @@ -148,6 +148,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) struct net_device *prev_dev = NULL; struct sta_info *sta; int retry_count = -1, i; + bool injected; for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { /* the HW cannot have attempted that rate */ @@ -297,6 +298,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) /* for now report the total retry_count */ rthdr->data_retries = retry_count; + /* Need to make a copy before skb->cb gets cleared */ + injected = !!(info->flags & IEEE80211_TX_CTL_INJECTED); + /* XXX: is this sufficient for BPF? */ skb_set_mac_header(skb, 0); skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -311,7 +315,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) continue; if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) && - !(info->flags & IEEE80211_TX_CTL_INJECTED) && + !injected && (type == IEEE80211_FTYPE_DATA)) continue;