aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-06-25 13:09:12 -0400
committerMarek Lindner <lindner_marek@yahoo.de>2011-07-05 08:28:54 -0400
commit8698529d209c43f6434592caf38733b84ccab5f3 (patch)
tree1ae000c69db75b4b1ce89d71c1b3c93121faab92 /net/batman-adv
parent5fbc1598c28555d2aa44bff0ac56ec3739401aff (diff)
batman-adv: add_bcast_packet_to_list() takes the sending delay as parameter
In order to make possible to use the broadcast list for delayed sendings the "delay" parameter is now provided instead of using 1 as hardcoded value. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/routing.c2
-rw-r--r--net/batman-adv/send.c4
-rw-r--r--net/batman-adv/send.h2
-rw-r--r--net/batman-adv/soft-interface.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 0ce090c9fe8..2cb98bed158 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -1677,7 +1677,7 @@ int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1677 spin_unlock_bh(&orig_node->bcast_seqno_lock); 1677 spin_unlock_bh(&orig_node->bcast_seqno_lock);
1678 1678
1679 /* rebroadcast packet */ 1679 /* rebroadcast packet */
1680 add_bcast_packet_to_list(bat_priv, skb); 1680 add_bcast_packet_to_list(bat_priv, skb, 1);
1681 1681
1682 /* broadcast for me */ 1682 /* broadcast for me */
1683 interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size); 1683 interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size);
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 7a2f0823f1c..2f62b2e4a47 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -455,7 +455,7 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv,
455 * The skb is not consumed, so the caller should make sure that the 455 * The skb is not consumed, so the caller should make sure that the
456 * skb is freed. */ 456 * skb is freed. */
457int add_bcast_packet_to_list(struct bat_priv *bat_priv, 457int add_bcast_packet_to_list(struct bat_priv *bat_priv,
458 const struct sk_buff *skb) 458 const struct sk_buff *skb, unsigned long delay)
459{ 459{
460 struct hard_iface *primary_if = NULL; 460 struct hard_iface *primary_if = NULL;
461 struct forw_packet *forw_packet; 461 struct forw_packet *forw_packet;
@@ -492,7 +492,7 @@ int add_bcast_packet_to_list(struct bat_priv *bat_priv,
492 /* how often did we send the bcast packet ? */ 492 /* how often did we send the bcast packet ? */
493 forw_packet->num_packets = 0; 493 forw_packet->num_packets = 0;
494 494
495 _add_bcast_packet_to_list(bat_priv, forw_packet, 1); 495 _add_bcast_packet_to_list(bat_priv, forw_packet, delay);
496 return NETDEV_TX_OK; 496 return NETDEV_TX_OK;
497 497
498packet_free: 498packet_free:
diff --git a/net/batman-adv/send.h b/net/batman-adv/send.h
index 633224ab028..1f2d1e87766 100644
--- a/net/batman-adv/send.h
+++ b/net/batman-adv/send.h
@@ -31,7 +31,7 @@ void schedule_forward_packet(struct orig_node *orig_node,
31 int directlink, 31 int directlink,
32 struct hard_iface *if_outgoing); 32 struct hard_iface *if_outgoing);
33int add_bcast_packet_to_list(struct bat_priv *bat_priv, 33int add_bcast_packet_to_list(struct bat_priv *bat_priv,
34 const struct sk_buff *skb); 34 const struct sk_buff *skb, unsigned long delay);
35void send_outstanding_bat_packet(struct work_struct *work); 35void send_outstanding_bat_packet(struct work_struct *work);
36void purge_outstanding_packets(struct bat_priv *bat_priv, 36void purge_outstanding_packets(struct bat_priv *bat_priv,
37 const struct hard_iface *hard_iface); 37 const struct hard_iface *hard_iface);
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 2dcdbb7a236..3f20332e1d3 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -634,7 +634,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
634 bcast_packet->seqno = 634 bcast_packet->seqno =
635 htonl(atomic_inc_return(&bat_priv->bcast_seqno)); 635 htonl(atomic_inc_return(&bat_priv->bcast_seqno));
636 636
637 add_bcast_packet_to_list(bat_priv, skb); 637 add_bcast_packet_to_list(bat_priv, skb, 1);
638 638
639 /* a copy is stored in the bcast list, therefore removing 639 /* a copy is stored in the bcast list, therefore removing
640 * the original skb. */ 640 * the original skb. */