diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-29 03:43:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-02 15:39:41 -0500 |
commit | 9aa4aee30f4d155fc91abbaecfef9b3bb759699e (patch) | |
tree | 219f55843fdc548e8def51daa8ffbdb3ae4dc180 /net/mac80211/tx.c | |
parent | 86c34fe89e9cad9e1ba4d1a8bbf98259035f4caf (diff) |
mac80211: make CALL_TXH a statement
The multi-line code in this macro wasn't wrapped
in do {} while (0) so we cannot use it in an if()
branch safely in the future -- fix that.
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.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 844609c23268..c7dc8ccff5b2 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1200,23 +1200,25 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
1200 | struct sk_buff *skb = tx->skb; | 1200 | struct sk_buff *skb = tx->skb; |
1201 | ieee80211_tx_result res = TX_DROP; | 1201 | ieee80211_tx_result res = TX_DROP; |
1202 | 1202 | ||
1203 | #define CALL_TXH(txh) \ | 1203 | #define CALL_TXH(txh) \ |
1204 | res = txh(tx); \ | 1204 | do { \ |
1205 | if (res != TX_CONTINUE) \ | 1205 | res = txh(tx); \ |
1206 | goto txh_done; | 1206 | if (res != TX_CONTINUE) \ |
1207 | 1207 | goto txh_done; \ | |
1208 | CALL_TXH(ieee80211_tx_h_check_assoc) | 1208 | } while (0) |
1209 | CALL_TXH(ieee80211_tx_h_ps_buf) | 1209 | |
1210 | CALL_TXH(ieee80211_tx_h_select_key) | 1210 | CALL_TXH(ieee80211_tx_h_check_assoc); |
1211 | CALL_TXH(ieee80211_tx_h_michael_mic_add) | 1211 | CALL_TXH(ieee80211_tx_h_ps_buf); |
1212 | CALL_TXH(ieee80211_tx_h_rate_ctrl) | 1212 | CALL_TXH(ieee80211_tx_h_select_key); |
1213 | CALL_TXH(ieee80211_tx_h_misc) | 1213 | CALL_TXH(ieee80211_tx_h_michael_mic_add); |
1214 | CALL_TXH(ieee80211_tx_h_sequence) | 1214 | CALL_TXH(ieee80211_tx_h_rate_ctrl); |
1215 | CALL_TXH(ieee80211_tx_h_fragment) | 1215 | CALL_TXH(ieee80211_tx_h_misc); |
1216 | CALL_TXH(ieee80211_tx_h_sequence); | ||
1217 | CALL_TXH(ieee80211_tx_h_fragment); | ||
1216 | /* handlers after fragment must be aware of tx info fragmentation! */ | 1218 | /* handlers after fragment must be aware of tx info fragmentation! */ |
1217 | CALL_TXH(ieee80211_tx_h_stats) | 1219 | CALL_TXH(ieee80211_tx_h_stats); |
1218 | CALL_TXH(ieee80211_tx_h_encrypt) | 1220 | CALL_TXH(ieee80211_tx_h_encrypt); |
1219 | CALL_TXH(ieee80211_tx_h_calculate_duration) | 1221 | CALL_TXH(ieee80211_tx_h_calculate_duration); |
1220 | #undef CALL_TXH | 1222 | #undef CALL_TXH |
1221 | 1223 | ||
1222 | txh_done: | 1224 | txh_done: |