summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:43 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:33 -0400
commit9cfc7bd608b97463993b4f3e4775d99022253f8d (patch)
treefcfcf1e714a91943a740dcaa2744ee66448f9f73 /net/batman-adv/send.c
parent3193e8fdfa355289892661d206d1954114a7be95 (diff)
batman-adv: Reformat multiline comments to consistent style
batman-adv doesn't follow the style for multiline comments that David S. Miller prefers. All comments should be reformatted to follow this consistent style to make the code slightly more readable. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r--net/batman-adv/send.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 1a0f7c364ea0..2c92a32ec6c6 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -1,5 +1,4 @@
1/* 1/* Copyright (C) 2007-2012 B.A.T.M.A.N. contributors:
2 * Copyright (C) 2007-2012 B.A.T.M.A.N. contributors:
3 * 2 *
4 * Marek Lindner, Simon Wunderlich 3 * Marek Lindner, Simon Wunderlich
5 * 4 *
@@ -16,7 +15,6 @@
16 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA 17 * 02110-1301, USA
19 *
20 */ 18 */
21 19
22#include "main.h" 20#include "main.h"
@@ -32,7 +30,8 @@
32static void send_outstanding_bcast_packet(struct work_struct *work); 30static void send_outstanding_bcast_packet(struct work_struct *work);
33 31
34/* send out an already prepared packet to the given address via the 32/* send out an already prepared packet to the given address via the
35 * specified batman interface */ 33 * specified batman interface
34 */
36int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, 35int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
37 const uint8_t *dst_addr) 36 const uint8_t *dst_addr)
38{ 37{
@@ -69,8 +68,8 @@ int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
69 68
70 /* dev_queue_xmit() returns a negative result on error. However on 69 /* dev_queue_xmit() returns a negative result on error. However on
71 * congestion and traffic shaping, it drops and returns NET_XMIT_DROP 70 * congestion and traffic shaping, it drops and returns NET_XMIT_DROP
72 * (which is > 0). This will not be treated as an error. */ 71 * (which is > 0). This will not be treated as an error.
73 72 */
74 return dev_queue_xmit(skb); 73 return dev_queue_xmit(skb);
75send_skb_err: 74send_skb_err:
76 kfree_skb(skb); 75 kfree_skb(skb);
@@ -85,8 +84,7 @@ void batadv_schedule_bat_ogm(struct hard_iface *hard_iface)
85 (hard_iface->if_status == IF_TO_BE_REMOVED)) 84 (hard_iface->if_status == IF_TO_BE_REMOVED))
86 return; 85 return;
87 86
88 /** 87 /* the interface gets activated here to avoid race conditions between
89 * the interface gets activated here to avoid race conditions between
90 * the moment of activating the interface in 88 * the moment of activating the interface in
91 * hardif_activate_interface() where the originator mac is set and 89 * hardif_activate_interface() where the originator mac is set and
92 * outdated packets (especially uninitialized mac addresses) in the 90 * outdated packets (especially uninitialized mac addresses) in the
@@ -132,7 +130,8 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv,
132 * errors. 130 * errors.
133 * 131 *
134 * The skb is not consumed, so the caller should make sure that the 132 * The skb is not consumed, so the caller should make sure that the
135 * skb is freed. */ 133 * skb is freed.
134 */
136int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv, 135int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv,
137 const struct sk_buff *skb, 136 const struct sk_buff *skb,
138 unsigned long delay) 137 unsigned long delay)
@@ -249,8 +248,7 @@ void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
249 248
250 bat_priv->bat_algo_ops->bat_ogm_emit(forw_packet); 249 bat_priv->bat_algo_ops->bat_ogm_emit(forw_packet);
251 250
252 /** 251 /* we have to have at least one packet in the queue
253 * we have to have at least one packet in the queue
254 * to determine the queues wake up time unless we are 252 * to determine the queues wake up time unless we are
255 * shutting down 253 * shutting down
256 */ 254 */
@@ -285,8 +283,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
285 hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, 283 hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node,
286 &bat_priv->forw_bcast_list, list) { 284 &bat_priv->forw_bcast_list, list) {
287 285
288 /** 286 /* if purge_outstanding_packets() was called with an argument
289 * if purge_outstanding_packets() was called with an argument
290 * we delete only packets belonging to the given interface 287 * we delete only packets belonging to the given interface
291 */ 288 */
292 if ((hard_iface) && 289 if ((hard_iface) &&
@@ -295,8 +292,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
295 292
296 spin_unlock_bh(&bat_priv->forw_bcast_list_lock); 293 spin_unlock_bh(&bat_priv->forw_bcast_list_lock);
297 294
298 /** 295 /* send_outstanding_bcast_packet() will lock the list to
299 * send_outstanding_bcast_packet() will lock the list to
300 * delete the item from the list 296 * delete the item from the list
301 */ 297 */
302 pending = cancel_delayed_work_sync(&forw_packet->delayed_work); 298 pending = cancel_delayed_work_sync(&forw_packet->delayed_work);
@@ -314,8 +310,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
314 hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, 310 hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node,
315 &bat_priv->forw_bat_list, list) { 311 &bat_priv->forw_bat_list, list) {
316 312
317 /** 313 /* if purge_outstanding_packets() was called with an argument
318 * if purge_outstanding_packets() was called with an argument
319 * we delete only packets belonging to the given interface 314 * we delete only packets belonging to the given interface
320 */ 315 */
321 if ((hard_iface) && 316 if ((hard_iface) &&
@@ -324,8 +319,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
324 319
325 spin_unlock_bh(&bat_priv->forw_bat_list_lock); 320 spin_unlock_bh(&bat_priv->forw_bat_list_lock);
326 321
327 /** 322 /* send_outstanding_bat_packet() will lock the list to
328 * send_outstanding_bat_packet() will lock the list to
329 * delete the item from the list 323 * delete the item from the list
330 */ 324 */
331 pending = cancel_delayed_work_sync(&forw_packet->delayed_work); 325 pending = cancel_delayed_work_sync(&forw_packet->delayed_work);