diff options
-rw-r--r-- | net/mac80211/tx.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 7f2e4cdb8904..588c18a60de4 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -844,6 +844,23 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) | |||
844 | } | 844 | } |
845 | 845 | ||
846 | static ieee80211_tx_result debug_noinline | 846 | static ieee80211_tx_result debug_noinline |
847 | ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) | ||
848 | { | ||
849 | struct sk_buff *skb = tx->skb; | ||
850 | |||
851 | if (!tx->sta) | ||
852 | return TX_CONTINUE; | ||
853 | |||
854 | tx->sta->tx_packets++; | ||
855 | do { | ||
856 | tx->sta->tx_fragments++; | ||
857 | tx->sta->tx_bytes += skb->len; | ||
858 | } while ((skb = skb->next)); | ||
859 | |||
860 | return TX_CONTINUE; | ||
861 | } | ||
862 | |||
863 | static ieee80211_tx_result debug_noinline | ||
847 | ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) | 864 | ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) |
848 | { | 865 | { |
849 | if (!tx->key) | 866 | if (!tx->key) |
@@ -887,23 +904,6 @@ ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx) | |||
887 | return TX_CONTINUE; | 904 | return TX_CONTINUE; |
888 | } | 905 | } |
889 | 906 | ||
890 | static ieee80211_tx_result debug_noinline | ||
891 | ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) | ||
892 | { | ||
893 | struct sk_buff *skb = tx->skb; | ||
894 | |||
895 | if (!tx->sta) | ||
896 | return TX_CONTINUE; | ||
897 | |||
898 | tx->sta->tx_packets++; | ||
899 | do { | ||
900 | tx->sta->tx_fragments++; | ||
901 | tx->sta->tx_bytes += skb->len; | ||
902 | } while ((skb = skb->next)); | ||
903 | |||
904 | return TX_CONTINUE; | ||
905 | } | ||
906 | |||
907 | /* actual transmit path */ | 907 | /* actual transmit path */ |
908 | 908 | ||
909 | /* | 909 | /* |
@@ -1213,9 +1213,9 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
1213 | CALL_TXH(ieee80211_tx_h_sequence) | 1213 | CALL_TXH(ieee80211_tx_h_sequence) |
1214 | CALL_TXH(ieee80211_tx_h_fragment) | 1214 | CALL_TXH(ieee80211_tx_h_fragment) |
1215 | /* handlers after fragment must be aware of tx info fragmentation! */ | 1215 | /* handlers after fragment must be aware of tx info fragmentation! */ |
1216 | CALL_TXH(ieee80211_tx_h_stats) | ||
1216 | CALL_TXH(ieee80211_tx_h_encrypt) | 1217 | CALL_TXH(ieee80211_tx_h_encrypt) |
1217 | CALL_TXH(ieee80211_tx_h_calculate_duration) | 1218 | CALL_TXH(ieee80211_tx_h_calculate_duration) |
1218 | CALL_TXH(ieee80211_tx_h_stats) | ||
1219 | #undef CALL_TXH | 1219 | #undef CALL_TXH |
1220 | 1220 | ||
1221 | txh_done: | 1221 | txh_done: |