diff options
Diffstat (limited to 'net/batman-adv/unicast.c')
-rw-r--r-- | net/batman-adv/unicast.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index d021055ad262..472436a06d89 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
@@ -29,9 +29,10 @@ | |||
29 | #include "hard-interface.h" | 29 | #include "hard-interface.h" |
30 | 30 | ||
31 | 31 | ||
32 | static struct sk_buff *frag_merge_packet(struct list_head *head, | 32 | static struct sk_buff * |
33 | struct frag_packet_list_entry *tfp, | 33 | batadv_frag_merge_packet(struct list_head *head, |
34 | struct sk_buff *skb) | 34 | struct frag_packet_list_entry *tfp, |
35 | struct sk_buff *skb) | ||
35 | { | 36 | { |
36 | struct unicast_frag_packet *up = | 37 | struct unicast_frag_packet *up = |
37 | (struct unicast_frag_packet *)skb->data; | 38 | (struct unicast_frag_packet *)skb->data; |
@@ -75,7 +76,8 @@ err: | |||
75 | return NULL; | 76 | return NULL; |
76 | } | 77 | } |
77 | 78 | ||
78 | static void frag_create_entry(struct list_head *head, struct sk_buff *skb) | 79 | static void batadv_frag_create_entry(struct list_head *head, |
80 | struct sk_buff *skb) | ||
79 | { | 81 | { |
80 | struct frag_packet_list_entry *tfp; | 82 | struct frag_packet_list_entry *tfp; |
81 | struct unicast_frag_packet *up = | 83 | struct unicast_frag_packet *up = |
@@ -91,7 +93,7 @@ static void frag_create_entry(struct list_head *head, struct sk_buff *skb) | |||
91 | return; | 93 | return; |
92 | } | 94 | } |
93 | 95 | ||
94 | static int frag_create_buffer(struct list_head *head) | 96 | static int batadv_frag_create_buffer(struct list_head *head) |
95 | { | 97 | { |
96 | int i; | 98 | int i; |
97 | struct frag_packet_list_entry *tfp; | 99 | struct frag_packet_list_entry *tfp; |
@@ -111,8 +113,9 @@ static int frag_create_buffer(struct list_head *head) | |||
111 | return 0; | 113 | return 0; |
112 | } | 114 | } |
113 | 115 | ||
114 | static struct frag_packet_list_entry *frag_search_packet(struct list_head *head, | 116 | static struct frag_packet_list_entry * |
115 | const struct unicast_frag_packet *up) | 117 | batadv_frag_search_packet(struct list_head *head, |
118 | const struct unicast_frag_packet *up) | ||
116 | { | 119 | { |
117 | struct frag_packet_list_entry *tfp; | 120 | struct frag_packet_list_entry *tfp; |
118 | struct unicast_frag_packet *tmp_up = NULL; | 121 | struct unicast_frag_packet *tmp_up = NULL; |
@@ -188,22 +191,22 @@ int batadv_frag_reassemble_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | |||
188 | orig_node->last_frag_packet = jiffies; | 191 | orig_node->last_frag_packet = jiffies; |
189 | 192 | ||
190 | if (list_empty(&orig_node->frag_list) && | 193 | if (list_empty(&orig_node->frag_list) && |
191 | frag_create_buffer(&orig_node->frag_list)) { | 194 | batadv_frag_create_buffer(&orig_node->frag_list)) { |
192 | pr_debug("couldn't create frag buffer\n"); | 195 | pr_debug("couldn't create frag buffer\n"); |
193 | goto out; | 196 | goto out; |
194 | } | 197 | } |
195 | 198 | ||
196 | tmp_frag_entry = frag_search_packet(&orig_node->frag_list, | 199 | tmp_frag_entry = batadv_frag_search_packet(&orig_node->frag_list, |
197 | unicast_packet); | 200 | unicast_packet); |
198 | 201 | ||
199 | if (!tmp_frag_entry) { | 202 | if (!tmp_frag_entry) { |
200 | frag_create_entry(&orig_node->frag_list, skb); | 203 | batadv_frag_create_entry(&orig_node->frag_list, skb); |
201 | ret = NET_RX_SUCCESS; | 204 | ret = NET_RX_SUCCESS; |
202 | goto out; | 205 | goto out; |
203 | } | 206 | } |
204 | 207 | ||
205 | *new_skb = frag_merge_packet(&orig_node->frag_list, tmp_frag_entry, | 208 | *new_skb = batadv_frag_merge_packet(&orig_node->frag_list, |
206 | skb); | 209 | tmp_frag_entry, skb); |
207 | /* if not, merge failed */ | 210 | /* if not, merge failed */ |
208 | if (*new_skb) | 211 | if (*new_skb) |
209 | ret = NET_RX_SUCCESS; | 212 | ret = NET_RX_SUCCESS; |