Commit 27004b10 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: clean up return value of __ieee80211_parse_tx_radiotap

The return type has more than two values, but it can validly
only ever return TX_DROP and TX_CONTINUE, so use a bool
instead of ieee80211_tx_result.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0bffe40f
...@@ -908,8 +908,7 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) ...@@ -908,8 +908,7 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
* deal with packet injection down monitor interface * deal with packet injection down monitor interface
* with Radiotap Header -- only called for monitor mode interface * with Radiotap Header -- only called for monitor mode interface
*/ */
static ieee80211_tx_result static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
__ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
struct sk_buff *skb) struct sk_buff *skb)
{ {
/* /*
...@@ -961,7 +960,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, ...@@ -961,7 +960,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
* on transmission * on transmission
*/ */
if (skb->len < (iterator.max_length + FCS_LEN)) if (skb->len < (iterator.max_length + FCS_LEN))
return TX_DROP; return false;
skb_trim(skb, skb->len - FCS_LEN); skb_trim(skb, skb->len - FCS_LEN);
} }
...@@ -983,7 +982,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, ...@@ -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 */ if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */
return TX_DROP; return false;
/* /*
* remove the radiotap header * remove the radiotap header
...@@ -992,7 +991,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, ...@@ -992,7 +991,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
*/ */
skb_pull(skb, iterator.max_length); skb_pull(skb, iterator.max_length);
return TX_CONTINUE; return true;
} }
/* /*
...@@ -1026,7 +1025,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx, ...@@ -1026,7 +1025,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
/* process and remove the injection radiotap header */ /* process and remove the injection radiotap header */
sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata = IEEE80211_DEV_TO_SUB_IF(dev);
if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) { 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; return TX_DROP;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment