Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314549
b: refs/heads/master
c: 9455e34
h: refs/heads/master
i:
  314547: 2e7b98a
v: v3
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Jun 20, 2012
1 parent be0469e commit 6f6343a
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30d3c5113f9a3f162d65d01b771b122afac0ce79
refs/heads/master: 9455e34cb2ded22e01abb6daa65ba1caeed8d7fe
9 changes: 5 additions & 4 deletions trunk/net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static void bat_iv_ogm_send_to_if(struct forw_packet *forw_packet,
batadv_inc_counter(bat_priv, BAT_CNT_MGMT_TX);
batadv_add_counter(bat_priv, BAT_CNT_MGMT_TX_BYTES,
skb->len + ETH_HLEN);
send_skb_packet(skb, hard_iface, broadcast_addr);
batadv_send_skb_packet(skb, hard_iface, broadcast_addr);
}
}

Expand Down Expand Up @@ -250,8 +250,9 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)
forw_packet->if_incoming->net_dev->dev_addr);

/* skb is only used once and than forw_packet is free'd */
send_skb_packet(forw_packet->skb, forw_packet->if_incoming,
broadcast_addr);
batadv_send_skb_packet(forw_packet->skb,
forw_packet->if_incoming,
broadcast_addr);
forw_packet->skb = NULL;

goto out;
Expand Down Expand Up @@ -420,7 +421,7 @@ static void bat_iv_ogm_aggregate_new(const unsigned char *packet_buff,

/* start timer for this packet */
INIT_DELAYED_WORK(&forw_packet_aggr->delayed_work,
send_outstanding_bat_ogm_packet);
batadv_send_outstanding_bat_ogm_packet);
queue_delayed_work(bat_event_workqueue,
&forw_packet_aggr->delayed_work,
send_time - jiffies);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
hard_iface->net_dev->name);

/* begin scheduling originator messages on that interface */
schedule_bat_ogm(hard_iface);
batadv_schedule_bat_ogm(hard_iface);

out:
return 0;
Expand Down Expand Up @@ -391,7 +391,7 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface)

/* delete all references to this hard_iface */
batadv_purge_orig_ref(bat_priv);
purge_outstanding_packets(bat_priv, hard_iface);
batadv_purge_outstanding_packets(bat_priv, hard_iface);
dev_put(hard_iface->soft_iface);

/* nobody uses this interface anymore */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/icmp_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
memcpy(icmp_packet->rr,
neigh_node->if_incoming->net_dev->dev_addr, ETH_ALEN);

send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
goto out;

dst_unreach:
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void mesh_free(struct net_device *soft_iface)

atomic_set(&bat_priv->mesh_state, MESH_DEACTIVATING);

purge_outstanding_packets(bat_priv, NULL);
batadv_purge_outstanding_packets(bat_priv, NULL);

vis_quit(bat_priv);

Expand Down
10 changes: 5 additions & 5 deletions trunk/net/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
icmp_packet->msg_type = ECHO_REPLY;
icmp_packet->header.ttl = TTL;

send_skb_packet(skb, router->if_incoming, router->addr);
batadv_send_skb_packet(skb, router->if_incoming, router->addr);
ret = NET_RX_SUCCESS;

out:
Expand Down Expand Up @@ -374,7 +374,7 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
icmp_packet->msg_type = TTL_EXCEEDED;
icmp_packet->header.ttl = TTL;

send_skb_packet(skb, router->if_incoming, router->addr);
batadv_send_skb_packet(skb, router->if_incoming, router->addr);
ret = NET_RX_SUCCESS;

out:
Expand Down Expand Up @@ -459,7 +459,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if)
icmp_packet->header.ttl--;

/* route it */
send_skb_packet(skb, router->if_incoming, router->addr);
batadv_send_skb_packet(skb, router->if_incoming, router->addr);
ret = NET_RX_SUCCESS;

out:
Expand Down Expand Up @@ -881,7 +881,7 @@ static int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
skb->len + ETH_HLEN);

/* route it */
send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
ret = NET_RX_SUCCESS;

out:
Expand Down Expand Up @@ -1095,7 +1095,7 @@ int batadv_recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
goto out;

/* rebroadcast packet */
add_bcast_packet_to_list(bat_priv, skb, 1);
batadv_add_bcast_packet_to_list(bat_priv, skb, 1);

/* don't hand the broadcast up if it is from an originator
* from the same backbone.
Expand Down
22 changes: 12 additions & 10 deletions trunk/net/batman-adv/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ static void send_outstanding_bcast_packet(struct work_struct *work);

/* send out an already prepared packet to the given address via the
* specified batman interface */
int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
const uint8_t *dst_addr)
int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
const uint8_t *dst_addr)
{
struct ethhdr *ethhdr;

Expand Down Expand Up @@ -77,7 +77,7 @@ int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
return NET_XMIT_DROP;
}

void schedule_bat_ogm(struct hard_iface *hard_iface)
void batadv_schedule_bat_ogm(struct hard_iface *hard_iface)
{
struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface);

Expand Down Expand Up @@ -133,8 +133,9 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv,
*
* The skb is not consumed, so the caller should make sure that the
* skb is freed. */
int add_bcast_packet_to_list(struct bat_priv *bat_priv,
const struct sk_buff *skb, unsigned long delay)
int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv,
const struct sk_buff *skb,
unsigned long delay)
{
struct hard_iface *primary_if = NULL;
struct forw_packet *forw_packet;
Expand Down Expand Up @@ -211,7 +212,8 @@ static void send_outstanding_bcast_packet(struct work_struct *work)
/* send a copy of the saved skb */
skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
if (skb1)
send_skb_packet(skb1, hard_iface, broadcast_addr);
batadv_send_skb_packet(skb1, hard_iface,
broadcast_addr);
}
rcu_read_unlock();

Expand All @@ -229,7 +231,7 @@ static void send_outstanding_bcast_packet(struct work_struct *work)
atomic_inc(&bat_priv->bcast_queue_left);
}

void send_outstanding_bat_ogm_packet(struct work_struct *work)
void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
{
struct delayed_work *delayed_work =
container_of(work, struct delayed_work, work);
Expand All @@ -253,7 +255,7 @@ void send_outstanding_bat_ogm_packet(struct work_struct *work)
* shutting down
*/
if (forw_packet->own)
schedule_bat_ogm(forw_packet->if_incoming);
batadv_schedule_bat_ogm(forw_packet->if_incoming);

out:
/* don't count own packet */
Expand All @@ -263,8 +265,8 @@ void send_outstanding_bat_ogm_packet(struct work_struct *work)
forw_packet_free(forw_packet);
}

void purge_outstanding_packets(struct bat_priv *bat_priv,
const struct hard_iface *hard_iface)
void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
const struct hard_iface *hard_iface)
{
struct forw_packet *forw_packet;
struct hlist_node *tmp_node, *safe_tmp_node;
Expand Down
17 changes: 9 additions & 8 deletions trunk/net/batman-adv/send.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
#ifndef _NET_BATMAN_ADV_SEND_H_
#define _NET_BATMAN_ADV_SEND_H_

int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
const uint8_t *dst_addr);
void schedule_bat_ogm(struct hard_iface *hard_iface);
int add_bcast_packet_to_list(struct bat_priv *bat_priv,
const struct sk_buff *skb, unsigned long delay);
void send_outstanding_bat_ogm_packet(struct work_struct *work);
void purge_outstanding_packets(struct bat_priv *bat_priv,
const struct hard_iface *hard_iface);
int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
const uint8_t *dst_addr);
void batadv_schedule_bat_ogm(struct hard_iface *hard_iface);
int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv,
const struct sk_buff *skb,
unsigned long delay);
void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work);
void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
const struct hard_iface *hard_iface);

#endif /* _NET_BATMAN_ADV_SEND_H_ */
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
bcast_packet->seqno =
htonl(atomic_inc_return(&bat_priv->bcast_seqno));

add_bcast_packet_to_list(bat_priv, skb, 1);
batadv_add_bcast_packet_to_list(bat_priv, skb, 1);

/* a copy is stored in the bcast list, therefore removing
* the original skb. */
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ static int send_tt_request(struct bat_priv *bat_priv,

batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_TX);

send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
ret = 0;

out:
Expand Down Expand Up @@ -1532,7 +1532,7 @@ static bool send_other_tt_response(struct bat_priv *bat_priv,

batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX);

send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
ret = true;
goto out;

Expand Down Expand Up @@ -1650,7 +1650,7 @@ static bool send_my_tt_response(struct bat_priv *bat_priv,

batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX);

send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
ret = true;
goto out;

Expand Down Expand Up @@ -1957,7 +1957,7 @@ static void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,

batadv_inc_counter(bat_priv, BAT_CNT_TT_ROAM_ADV_TX);

send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
ret = 0;

out:
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/batman-adv/unicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
frag1->seqno = htons(seqno - 1);
frag2->seqno = htons(seqno);

send_skb_packet(skb, hard_iface, dstaddr);
send_skb_packet(frag_skb, hard_iface, dstaddr);
batadv_send_skb_packet(skb, hard_iface, dstaddr);
batadv_send_skb_packet(frag_skb, hard_iface, dstaddr);
ret = NET_RX_SUCCESS;
goto out;

Expand Down Expand Up @@ -348,7 +348,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
goto out;
}

send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
ret = 0;
goto out;

Expand Down
5 changes: 3 additions & 2 deletions trunk/net/batman-adv/vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@ static void broadcast_vis_packet(struct bat_priv *bat_priv,

skb = skb_clone(info->skb_packet, GFP_ATOMIC);
if (skb)
send_skb_packet(skb, hard_iface, dstaddr);
batadv_send_skb_packet(skb, hard_iface,
dstaddr);

}
rcu_read_unlock();
Expand All @@ -804,7 +805,7 @@ static void unicast_vis_packet(struct bat_priv *bat_priv,

skb = skb_clone(info->skb_packet, GFP_ATOMIC);
if (skb)
send_skb_packet(skb, router->if_incoming, router->addr);
batadv_send_skb_packet(skb, router->if_incoming, router->addr);

out:
if (router)
Expand Down

0 comments on commit 6f6343a

Please sign in to comment.