aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-06-09 13:48:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-06-10 13:28:39 -0400
commit27004b10ce56985d8a010ce966af179f1b34193f (patch)
tree4646125665fa26e4ac00014d11c0b12c1a7f0952 /net/mac80211/tx.c
parent0bffe40f21e2ddc5215b1faec4e8dbbc215e7d4d (diff)
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: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index bfaa9ce33146..1aed88d922d8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -908,9 +908,8 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
908 * deal with packet injection down monitor interface 908 * deal with packet injection down monitor interface
909 * with Radiotap Header -- only called for monitor mode interface 909 * with Radiotap Header -- only called for monitor mode interface
910 */ 910 */
911static ieee80211_tx_result 911static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
912__ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, 912 struct sk_buff *skb)
913 struct sk_buff *skb)
914{ 913{
915 /* 914 /*
916 * this is the moment to interpret and discard the radiotap header that 915 * this is the moment to interpret and discard the radiotap header that
@@ -961,7 +960,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
961 * on transmission 960 * on transmission
962 */ 961 */
963 if (skb->len < (iterator.max_length + FCS_LEN)) 962 if (skb->len < (iterator.max_length + FCS_LEN))
964 return TX_DROP; 963 return false;
965 964
966 skb_trim(skb, skb->len - FCS_LEN); 965 skb_trim(skb, skb->len - FCS_LEN);
967 } 966 }
@@ -983,7 +982,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
983 } 982 }
984 983
985 if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */ 984 if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */
986 return TX_DROP; 985 return false;
987 986
988 /* 987 /*
989 * remove the radiotap header 988 * remove the radiotap header
@@ -992,7 +991,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
992 */ 991 */
993 skb_pull(skb, iterator.max_length); 992 skb_pull(skb, iterator.max_length);
994 993
995 return TX_CONTINUE; 994 return true;
996} 995}
997 996
998/* 997/*
@@ -1026,7 +1025,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
1026 /* process and remove the injection radiotap header */ 1025 /* process and remove the injection radiotap header */
1027 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1026 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1028 if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) { 1027 if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) {
1029 if (__ieee80211_parse_tx_radiotap(tx, skb) == TX_DROP) 1028 if (!__ieee80211_parse_tx_radiotap(tx, skb))
1030 return TX_DROP; 1029 return TX_DROP;
1031 1030
1032 /* 1031 /*