aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r--net/batman-adv/send.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 4425af9dad40..a67cffde37ae 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2012 B.A.T.M.A.N. contributors: 1/* Copyright (C) 2007-2013 B.A.T.M.A.N. contributors:
2 * 2 *
3 * Marek Lindner, Simon Wunderlich 3 * Marek Lindner, Simon Wunderlich
4 * 4 *
@@ -155,8 +155,6 @@ _batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv,
155 spin_unlock_bh(&bat_priv->forw_bcast_list_lock); 155 spin_unlock_bh(&bat_priv->forw_bcast_list_lock);
156 156
157 /* start timer for this packet */ 157 /* start timer for this packet */
158 INIT_DELAYED_WORK(&forw_packet->delayed_work,
159 batadv_send_outstanding_bcast_packet);
160 queue_delayed_work(batadv_event_workqueue, &forw_packet->delayed_work, 158 queue_delayed_work(batadv_event_workqueue, &forw_packet->delayed_work,
161 send_time); 159 send_time);
162} 160}
@@ -210,6 +208,9 @@ int batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv,
210 /* how often did we send the bcast packet ? */ 208 /* how often did we send the bcast packet ? */
211 forw_packet->num_packets = 0; 209 forw_packet->num_packets = 0;
212 210
211 INIT_DELAYED_WORK(&forw_packet->delayed_work,
212 batadv_send_outstanding_bcast_packet);
213
213 _batadv_add_bcast_packet_to_list(bat_priv, forw_packet, delay); 214 _batadv_add_bcast_packet_to_list(bat_priv, forw_packet, delay);
214 return NETDEV_TX_OK; 215 return NETDEV_TX_OK;
215 216
@@ -315,7 +316,7 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
315 const struct batadv_hard_iface *hard_iface) 316 const struct batadv_hard_iface *hard_iface)
316{ 317{
317 struct batadv_forw_packet *forw_packet; 318 struct batadv_forw_packet *forw_packet;
318 struct hlist_node *tmp_node, *safe_tmp_node; 319 struct hlist_node *safe_tmp_node;
319 bool pending; 320 bool pending;
320 321
321 if (hard_iface) 322 if (hard_iface)
@@ -328,9 +329,8 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
328 329
329 /* free bcast list */ 330 /* free bcast list */
330 spin_lock_bh(&bat_priv->forw_bcast_list_lock); 331 spin_lock_bh(&bat_priv->forw_bcast_list_lock);
331 hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, 332 hlist_for_each_entry_safe(forw_packet, safe_tmp_node,
332 &bat_priv->forw_bcast_list, list) { 333 &bat_priv->forw_bcast_list, list) {
333
334 /* if purge_outstanding_packets() was called with an argument 334 /* if purge_outstanding_packets() was called with an argument
335 * we delete only packets belonging to the given interface 335 * we delete only packets belonging to the given interface
336 */ 336 */
@@ -355,9 +355,8 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
355 355
356 /* free batman packet list */ 356 /* free batman packet list */
357 spin_lock_bh(&bat_priv->forw_bat_list_lock); 357 spin_lock_bh(&bat_priv->forw_bat_list_lock);
358 hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, 358 hlist_for_each_entry_safe(forw_packet, safe_tmp_node,
359 &bat_priv->forw_bat_list, list) { 359 &bat_priv->forw_bat_list, list) {
360
361 /* if purge_outstanding_packets() was called with an argument 360 /* if purge_outstanding_packets() was called with an argument
362 * we delete only packets belonging to the given interface 361 * we delete only packets belonging to the given interface
363 */ 362 */