diff options
Diffstat (limited to 'net/batman-adv/aggregation.h')
-rw-r--r-- | net/batman-adv/aggregation.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/batman-adv/aggregation.h b/net/batman-adv/aggregation.h index 7e6d72fbf54..216337bb841 100644 --- a/net/batman-adv/aggregation.h +++ b/net/batman-adv/aggregation.h | |||
@@ -25,9 +25,11 @@ | |||
25 | #include "main.h" | 25 | #include "main.h" |
26 | 26 | ||
27 | /* is there another aggregated packet here? */ | 27 | /* is there another aggregated packet here? */ |
28 | static inline int aggregated_packet(int buff_pos, int packet_len, int num_tt) | 28 | static inline int aggregated_packet(int buff_pos, int packet_len, |
29 | int tt_num_changes) | ||
29 | { | 30 | { |
30 | int next_buff_pos = buff_pos + BAT_PACKET_LEN + (num_tt * ETH_ALEN); | 31 | int next_buff_pos = buff_pos + BAT_PACKET_LEN + (tt_num_changes * |
32 | sizeof(struct tt_change)); | ||
31 | 33 | ||
32 | return (next_buff_pos <= packet_len) && | 34 | return (next_buff_pos <= packet_len) && |
33 | (next_buff_pos <= MAX_AGGREGATION_BYTES); | 35 | (next_buff_pos <= MAX_AGGREGATION_BYTES); |
@@ -35,9 +37,10 @@ static inline int aggregated_packet(int buff_pos, int packet_len, int num_tt) | |||
35 | 37 | ||
36 | void add_bat_packet_to_list(struct bat_priv *bat_priv, | 38 | void add_bat_packet_to_list(struct bat_priv *bat_priv, |
37 | unsigned char *packet_buff, int packet_len, | 39 | unsigned char *packet_buff, int packet_len, |
38 | struct hard_iface *if_incoming, char own_packet, | 40 | struct hard_iface *if_incoming, int own_packet, |
39 | unsigned long send_time); | 41 | unsigned long send_time); |
40 | void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff, | 42 | void receive_aggr_bat_packet(const struct ethhdr *ethhdr, |
41 | int packet_len, struct hard_iface *if_incoming); | 43 | unsigned char *packet_buff, int packet_len, |
44 | struct hard_iface *if_incoming); | ||
42 | 45 | ||
43 | #endif /* _NET_BATMAN_ADV_AGGREGATION_H_ */ | 46 | #endif /* _NET_BATMAN_ADV_AGGREGATION_H_ */ |