Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150821
b: refs/heads/master
c: 27004b1
h: refs/heads/master
i:
  150819: 80f35c1
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 10, 2009
1 parent 9f28cc0 commit e44d5a6
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 0bffe40f21e2ddc5215b1faec4e8dbbc215e7d4d
refs/heads/master: 27004b10ce56985d8a010ce966af179f1b34193f
13 changes: 6 additions & 7 deletions trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,8 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
* deal with packet injection down monitor interface
* with Radiotap Header -- only called for monitor mode interface
*/
static ieee80211_tx_result
__ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
struct sk_buff *skb)
static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
struct sk_buff *skb)
{
/*
* this is the moment to interpret and discard the radiotap header that
Expand Down Expand Up @@ -961,7 +960,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
* on transmission
*/
if (skb->len < (iterator.max_length + FCS_LEN))
return TX_DROP;
return false;

skb_trim(skb, skb->len - FCS_LEN);
}
Expand All @@ -983,7 +982,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
}

if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */
return TX_DROP;
return false;

/*
* remove the radiotap header
Expand All @@ -992,7 +991,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
*/
skb_pull(skb, iterator.max_length);

return TX_CONTINUE;
return true;
}

/*
Expand Down Expand Up @@ -1026,7 +1025,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
/* process and remove the injection radiotap header */
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) {
if (__ieee80211_parse_tx_radiotap(tx, skb) == TX_DROP)
if (!__ieee80211_parse_tx_radiotap(tx, skb))
return TX_DROP;

/*
Expand Down

0 comments on commit e44d5a6

Please sign in to comment.