Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193749
b: refs/heads/master
c: eaf5553
h: refs/heads/master
i:
  193747: 51c56a6
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Mar 15, 2010
1 parent 152b6bf commit 47a7127
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 819cf15e7cde0a1b0fa4f831478f792434f55679
refs/heads/master: eaf55530c94cb7adcd320c28ed6c7d463c9a3727
14 changes: 7 additions & 7 deletions trunk/net/mac80211/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
struct net_device *prev_dev = NULL;
struct sta_info *sta, *tmp;
int retry_count = -1, i;
bool injected;
bool send_to_cooked;

for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
/* the HW cannot have attempted that rate */
Expand Down Expand Up @@ -296,11 +296,15 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
/* this was a transmitted frame, but now we want to reuse it */
skb_orphan(skb);

/* Need to make a copy before skb->cb gets cleared */
send_to_cooked = !!(info->flags & IEEE80211_TX_CTL_INJECTED) ||
(type != IEEE80211_FTYPE_DATA);

/*
* This is a bit racy but we can avoid a lot of work
* with this test...
*/
if (!local->monitors && !local->cooked_mntrs) {
if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) {
dev_kfree_skb(skb);
return;
}
Expand Down Expand Up @@ -345,9 +349,6 @@ 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;
Expand All @@ -362,8 +363,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
continue;

if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) &&
!injected &&
(type == IEEE80211_FTYPE_DATA))
!send_to_cooked)
continue;

if (prev_dev) {
Expand Down

0 comments on commit 47a7127

Please sign in to comment.