diff options
Diffstat (limited to 'net/batman-adv/unicast.h')
-rw-r--r-- | net/batman-adv/unicast.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/unicast.h b/net/batman-adv/unicast.h index 16ad7a9242b..62f54b95462 100644 --- a/net/batman-adv/unicast.h +++ b/net/batman-adv/unicast.h | |||
@@ -32,11 +32,11 @@ int frag_reassemble_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | |||
32 | void frag_list_free(struct list_head *head); | 32 | void frag_list_free(struct list_head *head); |
33 | int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv); | 33 | int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv); |
34 | int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | 34 | int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, |
35 | struct hard_iface *hard_iface, uint8_t dstaddr[]); | 35 | struct hard_iface *hard_iface, const uint8_t dstaddr[]); |
36 | 36 | ||
37 | static inline int frag_can_reassemble(struct sk_buff *skb, int mtu) | 37 | static inline int frag_can_reassemble(const struct sk_buff *skb, int mtu) |
38 | { | 38 | { |
39 | struct unicast_frag_packet *unicast_packet; | 39 | const struct unicast_frag_packet *unicast_packet; |
40 | int uneven_correction = 0; | 40 | int uneven_correction = 0; |
41 | unsigned int merged_size; | 41 | unsigned int merged_size; |
42 | 42 | ||
@@ -49,7 +49,7 @@ static inline int frag_can_reassemble(struct sk_buff *skb, int mtu) | |||
49 | uneven_correction = -1; | 49 | uneven_correction = -1; |
50 | } | 50 | } |
51 | 51 | ||
52 | merged_size = (skb->len - sizeof(struct unicast_frag_packet)) * 2; | 52 | merged_size = (skb->len - sizeof(*unicast_packet)) * 2; |
53 | merged_size += sizeof(struct unicast_packet) + uneven_correction; | 53 | merged_size += sizeof(struct unicast_packet) + uneven_correction; |
54 | 54 | ||
55 | return merged_size <= mtu; | 55 | return merged_size <= mtu; |