diff options
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 9 | ||||
-rw-r--r-- | net/batman-adv/hard-interface.c | 4 | ||||
-rw-r--r-- | net/batman-adv/icmp_socket.c | 2 | ||||
-rw-r--r-- | net/batman-adv/main.c | 2 | ||||
-rw-r--r-- | net/batman-adv/routing.c | 10 | ||||
-rw-r--r-- | net/batman-adv/send.c | 22 | ||||
-rw-r--r-- | net/batman-adv/send.h | 17 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 2 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 8 | ||||
-rw-r--r-- | net/batman-adv/unicast.c | 6 | ||||
-rw-r--r-- | net/batman-adv/vis.c | 5 |
11 files changed, 46 insertions, 41 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index f48467ff6713..1566eac02d4c 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -201,7 +201,7 @@ static void bat_iv_ogm_send_to_if(struct forw_packet *forw_packet, | |||
201 | batadv_inc_counter(bat_priv, BAT_CNT_MGMT_TX); | 201 | batadv_inc_counter(bat_priv, BAT_CNT_MGMT_TX); |
202 | batadv_add_counter(bat_priv, BAT_CNT_MGMT_TX_BYTES, | 202 | batadv_add_counter(bat_priv, BAT_CNT_MGMT_TX_BYTES, |
203 | skb->len + ETH_HLEN); | 203 | skb->len + ETH_HLEN); |
204 | send_skb_packet(skb, hard_iface, broadcast_addr); | 204 | batadv_send_skb_packet(skb, hard_iface, broadcast_addr); |
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
@@ -250,8 +250,9 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet) | |||
250 | forw_packet->if_incoming->net_dev->dev_addr); | 250 | forw_packet->if_incoming->net_dev->dev_addr); |
251 | 251 | ||
252 | /* skb is only used once and than forw_packet is free'd */ | 252 | /* skb is only used once and than forw_packet is free'd */ |
253 | send_skb_packet(forw_packet->skb, forw_packet->if_incoming, | 253 | batadv_send_skb_packet(forw_packet->skb, |
254 | broadcast_addr); | 254 | forw_packet->if_incoming, |
255 | broadcast_addr); | ||
255 | forw_packet->skb = NULL; | 256 | forw_packet->skb = NULL; |
256 | 257 | ||
257 | goto out; | 258 | goto out; |
@@ -420,7 +421,7 @@ static void bat_iv_ogm_aggregate_new(const unsigned char *packet_buff, | |||
420 | 421 | ||
421 | /* start timer for this packet */ | 422 | /* start timer for this packet */ |
422 | INIT_DELAYED_WORK(&forw_packet_aggr->delayed_work, | 423 | INIT_DELAYED_WORK(&forw_packet_aggr->delayed_work, |
423 | send_outstanding_bat_ogm_packet); | 424 | batadv_send_outstanding_bat_ogm_packet); |
424 | queue_delayed_work(bat_event_workqueue, | 425 | queue_delayed_work(bat_event_workqueue, |
425 | &forw_packet_aggr->delayed_work, | 426 | &forw_packet_aggr->delayed_work, |
426 | send_time - jiffies); | 427 | send_time - jiffies); |
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index 1f126cbd2c79..7392ae28114d 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c | |||
@@ -345,7 +345,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface, | |||
345 | hard_iface->net_dev->name); | 345 | hard_iface->net_dev->name); |
346 | 346 | ||
347 | /* begin scheduling originator messages on that interface */ | 347 | /* begin scheduling originator messages on that interface */ |
348 | schedule_bat_ogm(hard_iface); | 348 | batadv_schedule_bat_ogm(hard_iface); |
349 | 349 | ||
350 | out: | 350 | out: |
351 | return 0; | 351 | return 0; |
@@ -391,7 +391,7 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface) | |||
391 | 391 | ||
392 | /* delete all references to this hard_iface */ | 392 | /* delete all references to this hard_iface */ |
393 | batadv_purge_orig_ref(bat_priv); | 393 | batadv_purge_orig_ref(bat_priv); |
394 | purge_outstanding_packets(bat_priv, hard_iface); | 394 | batadv_purge_outstanding_packets(bat_priv, hard_iface); |
395 | dev_put(hard_iface->soft_iface); | 395 | dev_put(hard_iface->soft_iface); |
396 | 396 | ||
397 | /* nobody uses this interface anymore */ | 397 | /* nobody uses this interface anymore */ |
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index 44cbee58720b..21c001074ebe 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c | |||
@@ -236,7 +236,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, | |||
236 | memcpy(icmp_packet->rr, | 236 | memcpy(icmp_packet->rr, |
237 | neigh_node->if_incoming->net_dev->dev_addr, ETH_ALEN); | 237 | neigh_node->if_incoming->net_dev->dev_addr, ETH_ALEN); |
238 | 238 | ||
239 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 239 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
240 | goto out; | 240 | goto out; |
241 | 241 | ||
242 | dst_unreach: | 242 | dst_unreach: |
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 92f39b50de6c..b9531a11b7bf 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -145,7 +145,7 @@ void mesh_free(struct net_device *soft_iface) | |||
145 | 145 | ||
146 | atomic_set(&bat_priv->mesh_state, MESH_DEACTIVATING); | 146 | atomic_set(&bat_priv->mesh_state, MESH_DEACTIVATING); |
147 | 147 | ||
148 | purge_outstanding_packets(bat_priv, NULL); | 148 | batadv_purge_outstanding_packets(bat_priv, NULL); |
149 | 149 | ||
150 | vis_quit(bat_priv); | 150 | vis_quit(bat_priv); |
151 | 151 | ||
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 631b40b65451..d7d05b22cc0d 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -319,7 +319,7 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv, | |||
319 | icmp_packet->msg_type = ECHO_REPLY; | 319 | icmp_packet->msg_type = ECHO_REPLY; |
320 | icmp_packet->header.ttl = TTL; | 320 | icmp_packet->header.ttl = TTL; |
321 | 321 | ||
322 | send_skb_packet(skb, router->if_incoming, router->addr); | 322 | batadv_send_skb_packet(skb, router->if_incoming, router->addr); |
323 | ret = NET_RX_SUCCESS; | 323 | ret = NET_RX_SUCCESS; |
324 | 324 | ||
325 | out: | 325 | out: |
@@ -374,7 +374,7 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv, | |||
374 | icmp_packet->msg_type = TTL_EXCEEDED; | 374 | icmp_packet->msg_type = TTL_EXCEEDED; |
375 | icmp_packet->header.ttl = TTL; | 375 | icmp_packet->header.ttl = TTL; |
376 | 376 | ||
377 | send_skb_packet(skb, router->if_incoming, router->addr); | 377 | batadv_send_skb_packet(skb, router->if_incoming, router->addr); |
378 | ret = NET_RX_SUCCESS; | 378 | ret = NET_RX_SUCCESS; |
379 | 379 | ||
380 | out: | 380 | out: |
@@ -459,7 +459,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
459 | icmp_packet->header.ttl--; | 459 | icmp_packet->header.ttl--; |
460 | 460 | ||
461 | /* route it */ | 461 | /* route it */ |
462 | send_skb_packet(skb, router->if_incoming, router->addr); | 462 | batadv_send_skb_packet(skb, router->if_incoming, router->addr); |
463 | ret = NET_RX_SUCCESS; | 463 | ret = NET_RX_SUCCESS; |
464 | 464 | ||
465 | out: | 465 | out: |
@@ -881,7 +881,7 @@ static int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
881 | skb->len + ETH_HLEN); | 881 | skb->len + ETH_HLEN); |
882 | 882 | ||
883 | /* route it */ | 883 | /* route it */ |
884 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 884 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
885 | ret = NET_RX_SUCCESS; | 885 | ret = NET_RX_SUCCESS; |
886 | 886 | ||
887 | out: | 887 | out: |
@@ -1095,7 +1095,7 @@ int batadv_recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
1095 | goto out; | 1095 | goto out; |
1096 | 1096 | ||
1097 | /* rebroadcast packet */ | 1097 | /* rebroadcast packet */ |
1098 | add_bcast_packet_to_list(bat_priv, skb, 1); | 1098 | batadv_add_bcast_packet_to_list(bat_priv, skb, 1); |
1099 | 1099 | ||
1100 | /* don't hand the broadcast up if it is from an originator | 1100 | /* don't hand the broadcast up if it is from an originator |
1101 | * from the same backbone. | 1101 | * from the same backbone. |
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 79f8973810c0..bceb3d72e5c3 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -33,8 +33,8 @@ static void send_outstanding_bcast_packet(struct work_struct *work); | |||
33 | 33 | ||
34 | /* send out an already prepared packet to the given address via the | 34 | /* send out an already prepared packet to the given address via the |
35 | * specified batman interface */ | 35 | * specified batman interface */ |
36 | int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, | 36 | int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, |
37 | const uint8_t *dst_addr) | 37 | const uint8_t *dst_addr) |
38 | { | 38 | { |
39 | struct ethhdr *ethhdr; | 39 | struct ethhdr *ethhdr; |
40 | 40 | ||
@@ -77,7 +77,7 @@ send_skb_err: | |||
77 | return NET_XMIT_DROP; | 77 | return NET_XMIT_DROP; |
78 | } | 78 | } |
79 | 79 | ||
80 | void schedule_bat_ogm(struct hard_iface *hard_iface) | 80 | void batadv_schedule_bat_ogm(struct hard_iface *hard_iface) |
81 | { | 81 | { |
82 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 82 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
83 | 83 | ||
@@ -133,8 +133,9 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv, | |||
133 | * | 133 | * |
134 | * The skb is not consumed, so the caller should make sure that the | 134 | * The skb is not consumed, so the caller should make sure that the |
135 | * skb is freed. */ | 135 | * skb is freed. */ |
136 | int add_bcast_packet_to_list(struct bat_priv *bat_priv, | 136 | int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv, |
137 | const struct sk_buff *skb, unsigned long delay) | 137 | const struct sk_buff *skb, |
138 | unsigned long delay) | ||
138 | { | 139 | { |
139 | struct hard_iface *primary_if = NULL; | 140 | struct hard_iface *primary_if = NULL; |
140 | struct forw_packet *forw_packet; | 141 | struct forw_packet *forw_packet; |
@@ -211,7 +212,8 @@ static void send_outstanding_bcast_packet(struct work_struct *work) | |||
211 | /* send a copy of the saved skb */ | 212 | /* send a copy of the saved skb */ |
212 | skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC); | 213 | skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC); |
213 | if (skb1) | 214 | if (skb1) |
214 | send_skb_packet(skb1, hard_iface, broadcast_addr); | 215 | batadv_send_skb_packet(skb1, hard_iface, |
216 | broadcast_addr); | ||
215 | } | 217 | } |
216 | rcu_read_unlock(); | 218 | rcu_read_unlock(); |
217 | 219 | ||
@@ -229,7 +231,7 @@ out: | |||
229 | atomic_inc(&bat_priv->bcast_queue_left); | 231 | atomic_inc(&bat_priv->bcast_queue_left); |
230 | } | 232 | } |
231 | 233 | ||
232 | void send_outstanding_bat_ogm_packet(struct work_struct *work) | 234 | void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work) |
233 | { | 235 | { |
234 | struct delayed_work *delayed_work = | 236 | struct delayed_work *delayed_work = |
235 | container_of(work, struct delayed_work, work); | 237 | container_of(work, struct delayed_work, work); |
@@ -253,7 +255,7 @@ void send_outstanding_bat_ogm_packet(struct work_struct *work) | |||
253 | * shutting down | 255 | * shutting down |
254 | */ | 256 | */ |
255 | if (forw_packet->own) | 257 | if (forw_packet->own) |
256 | schedule_bat_ogm(forw_packet->if_incoming); | 258 | batadv_schedule_bat_ogm(forw_packet->if_incoming); |
257 | 259 | ||
258 | out: | 260 | out: |
259 | /* don't count own packet */ | 261 | /* don't count own packet */ |
@@ -263,8 +265,8 @@ out: | |||
263 | forw_packet_free(forw_packet); | 265 | forw_packet_free(forw_packet); |
264 | } | 266 | } |
265 | 267 | ||
266 | void purge_outstanding_packets(struct bat_priv *bat_priv, | 268 | void batadv_purge_outstanding_packets(struct bat_priv *bat_priv, |
267 | const struct hard_iface *hard_iface) | 269 | const struct hard_iface *hard_iface) |
268 | { | 270 | { |
269 | struct forw_packet *forw_packet; | 271 | struct forw_packet *forw_packet; |
270 | struct hlist_node *tmp_node, *safe_tmp_node; | 272 | struct hlist_node *tmp_node, *safe_tmp_node; |
diff --git a/net/batman-adv/send.h b/net/batman-adv/send.h index 824ef06f9b01..452e8df5abb8 100644 --- a/net/batman-adv/send.h +++ b/net/batman-adv/send.h | |||
@@ -22,13 +22,14 @@ | |||
22 | #ifndef _NET_BATMAN_ADV_SEND_H_ | 22 | #ifndef _NET_BATMAN_ADV_SEND_H_ |
23 | #define _NET_BATMAN_ADV_SEND_H_ | 23 | #define _NET_BATMAN_ADV_SEND_H_ |
24 | 24 | ||
25 | int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, | 25 | int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, |
26 | const uint8_t *dst_addr); | 26 | const uint8_t *dst_addr); |
27 | void schedule_bat_ogm(struct hard_iface *hard_iface); | 27 | void batadv_schedule_bat_ogm(struct hard_iface *hard_iface); |
28 | int add_bcast_packet_to_list(struct bat_priv *bat_priv, | 28 | int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv, |
29 | const struct sk_buff *skb, unsigned long delay); | 29 | const struct sk_buff *skb, |
30 | void send_outstanding_bat_ogm_packet(struct work_struct *work); | 30 | unsigned long delay); |
31 | void purge_outstanding_packets(struct bat_priv *bat_priv, | 31 | void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work); |
32 | const struct hard_iface *hard_iface); | 32 | void batadv_purge_outstanding_packets(struct bat_priv *bat_priv, |
33 | const struct hard_iface *hard_iface); | ||
33 | 34 | ||
34 | #endif /* _NET_BATMAN_ADV_SEND_H_ */ | 35 | #endif /* _NET_BATMAN_ADV_SEND_H_ */ |
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 5bf9a73ae799..e15d474bd0b0 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -223,7 +223,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) | |||
223 | bcast_packet->seqno = | 223 | bcast_packet->seqno = |
224 | htonl(atomic_inc_return(&bat_priv->bcast_seqno)); | 224 | htonl(atomic_inc_return(&bat_priv->bcast_seqno)); |
225 | 225 | ||
226 | add_bcast_packet_to_list(bat_priv, skb, 1); | 226 | batadv_add_bcast_packet_to_list(bat_priv, skb, 1); |
227 | 227 | ||
228 | /* a copy is stored in the bcast list, therefore removing | 228 | /* a copy is stored in the bcast list, therefore removing |
229 | * the original skb. */ | 229 | * the original skb. */ |
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 3d2c3b142cf1..445dc25ceba1 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -1406,7 +1406,7 @@ static int send_tt_request(struct bat_priv *bat_priv, | |||
1406 | 1406 | ||
1407 | batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_TX); | 1407 | batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_TX); |
1408 | 1408 | ||
1409 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1409 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1410 | ret = 0; | 1410 | ret = 0; |
1411 | 1411 | ||
1412 | out: | 1412 | out: |
@@ -1532,7 +1532,7 @@ static bool send_other_tt_response(struct bat_priv *bat_priv, | |||
1532 | 1532 | ||
1533 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX); | 1533 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX); |
1534 | 1534 | ||
1535 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1535 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1536 | ret = true; | 1536 | ret = true; |
1537 | goto out; | 1537 | goto out; |
1538 | 1538 | ||
@@ -1650,7 +1650,7 @@ static bool send_my_tt_response(struct bat_priv *bat_priv, | |||
1650 | 1650 | ||
1651 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX); | 1651 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX); |
1652 | 1652 | ||
1653 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1653 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1654 | ret = true; | 1654 | ret = true; |
1655 | goto out; | 1655 | goto out; |
1656 | 1656 | ||
@@ -1957,7 +1957,7 @@ static void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client, | |||
1957 | 1957 | ||
1958 | batadv_inc_counter(bat_priv, BAT_CNT_TT_ROAM_ADV_TX); | 1958 | batadv_inc_counter(bat_priv, BAT_CNT_TT_ROAM_ADV_TX); |
1959 | 1959 | ||
1960 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1960 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1961 | ret = 0; | 1961 | ret = 0; |
1962 | 1962 | ||
1963 | out: | 1963 | out: |
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 894c6a416dac..6bb3bb9f843f 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
@@ -268,8 +268,8 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | |||
268 | frag1->seqno = htons(seqno - 1); | 268 | frag1->seqno = htons(seqno - 1); |
269 | frag2->seqno = htons(seqno); | 269 | frag2->seqno = htons(seqno); |
270 | 270 | ||
271 | send_skb_packet(skb, hard_iface, dstaddr); | 271 | batadv_send_skb_packet(skb, hard_iface, dstaddr); |
272 | send_skb_packet(frag_skb, hard_iface, dstaddr); | 272 | batadv_send_skb_packet(frag_skb, hard_iface, dstaddr); |
273 | ret = NET_RX_SUCCESS; | 273 | ret = NET_RX_SUCCESS; |
274 | goto out; | 274 | goto out; |
275 | 275 | ||
@@ -348,7 +348,7 @@ find_router: | |||
348 | goto out; | 348 | goto out; |
349 | } | 349 | } |
350 | 350 | ||
351 | send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 351 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
352 | ret = 0; | 352 | ret = 0; |
353 | goto out; | 353 | goto out; |
354 | 354 | ||
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 1972a11aace1..c56737cba0e2 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -777,7 +777,8 @@ static void broadcast_vis_packet(struct bat_priv *bat_priv, | |||
777 | 777 | ||
778 | skb = skb_clone(info->skb_packet, GFP_ATOMIC); | 778 | skb = skb_clone(info->skb_packet, GFP_ATOMIC); |
779 | if (skb) | 779 | if (skb) |
780 | send_skb_packet(skb, hard_iface, dstaddr); | 780 | batadv_send_skb_packet(skb, hard_iface, |
781 | dstaddr); | ||
781 | 782 | ||
782 | } | 783 | } |
783 | rcu_read_unlock(); | 784 | rcu_read_unlock(); |
@@ -804,7 +805,7 @@ static void unicast_vis_packet(struct bat_priv *bat_priv, | |||
804 | 805 | ||
805 | skb = skb_clone(info->skb_packet, GFP_ATOMIC); | 806 | skb = skb_clone(info->skb_packet, GFP_ATOMIC); |
806 | if (skb) | 807 | if (skb) |
807 | send_skb_packet(skb, router->if_incoming, router->addr); | 808 | batadv_send_skb_packet(skb, router->if_incoming, router->addr); |
808 | 809 | ||
809 | out: | 810 | out: |
810 | if (router) | 811 | if (router) |