aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-12 00:20:27 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-12 00:20:27 -0500
commitab889e6607f6e3d52a76c5a43c8c4ad1d354da36 (patch)
treebb98f2977e03bd2d4812ec5442e6cfb0e7678721
parentdcf96f1ff66f328fecf1e14437ac73db71b08c03 (diff)
parent3878f1f075470990d9c2418b53f31694e774f743 (diff)
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge
-rw-r--r--net/batman-adv/icmp_socket.c1
-rw-r--r--net/batman-adv/icmp_socket.h2
-rw-r--r--net/batman-adv/main.c1
-rw-r--r--net/batman-adv/routing.c1
-rw-r--r--net/batman-adv/routing.h2
-rw-r--r--net/batman-adv/send.c1
-rw-r--r--net/batman-adv/send.h2
-rw-r--r--net/batman-adv/soft-interface.c1
-rw-r--r--net/batman-adv/translation-table.c1
-rw-r--r--net/batman-adv/translation-table.h2
-rw-r--r--net/batman-adv/unicast.c19
11 files changed, 7 insertions, 26 deletions
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
index 5e86d6f0c0fb..319a7ccf6efa 100644
--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -24,7 +24,6 @@
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include "icmp_socket.h" 25#include "icmp_socket.h"
26#include "send.h" 26#include "send.h"
27#include "types.h"
28#include "hash.h" 27#include "hash.h"
29#include "originator.h" 28#include "originator.h"
30#include "hard-interface.h" 29#include "hard-interface.h"
diff --git a/net/batman-adv/icmp_socket.h b/net/batman-adv/icmp_socket.h
index 08b185959501..462b190fa101 100644
--- a/net/batman-adv/icmp_socket.h
+++ b/net/batman-adv/icmp_socket.h
@@ -22,8 +22,6 @@
22#ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_ 22#ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_
23#define _NET_BATMAN_ADV_ICMP_SOCKET_H_ 23#define _NET_BATMAN_ADV_ICMP_SOCKET_H_
24 24
25#include "types.h"
26
27#define ICMP_SOCKET "socket" 25#define ICMP_SOCKET "socket"
28 26
29void bat_socket_init(void); 27void bat_socket_init(void);
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index dc9248d9ea5f..06d956c91c27 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -30,7 +30,6 @@
30#include "translation-table.h" 30#include "translation-table.h"
31#include "hard-interface.h" 31#include "hard-interface.h"
32#include "gateway_client.h" 32#include "gateway_client.h"
33#include "types.h"
34#include "vis.h" 33#include "vis.h"
35#include "hash.h" 34#include "hash.h"
36 35
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 028f73967b00..827414067e46 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -28,7 +28,6 @@
28#include "icmp_socket.h" 28#include "icmp_socket.h"
29#include "translation-table.h" 29#include "translation-table.h"
30#include "originator.h" 30#include "originator.h"
31#include "types.h"
32#include "ring_buffer.h" 31#include "ring_buffer.h"
33#include "vis.h" 32#include "vis.h"
34#include "aggregation.h" 33#include "aggregation.h"
diff --git a/net/batman-adv/routing.h b/net/batman-adv/routing.h
index ceeca6f6ad16..a09d16f0c3ab 100644
--- a/net/batman-adv/routing.h
+++ b/net/batman-adv/routing.h
@@ -22,8 +22,6 @@
22#ifndef _NET_BATMAN_ADV_ROUTING_H_ 22#ifndef _NET_BATMAN_ADV_ROUTING_H_
23#define _NET_BATMAN_ADV_ROUTING_H_ 23#define _NET_BATMAN_ADV_ROUTING_H_
24 24
25#include "types.h"
26
27void slide_own_bcast_window(struct batman_if *batman_if); 25void slide_own_bcast_window(struct batman_if *batman_if);
28void receive_bat_packet(struct ethhdr *ethhdr, 26void receive_bat_packet(struct ethhdr *ethhdr,
29 struct batman_packet *batman_packet, 27 struct batman_packet *batman_packet,
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 7cc620e8aa1e..831427694fc2 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -25,7 +25,6 @@
25#include "translation-table.h" 25#include "translation-table.h"
26#include "soft-interface.h" 26#include "soft-interface.h"
27#include "hard-interface.h" 27#include "hard-interface.h"
28#include "types.h"
29#include "vis.h" 28#include "vis.h"
30#include "aggregation.h" 29#include "aggregation.h"
31#include "gateway_common.h" 30#include "gateway_common.h"
diff --git a/net/batman-adv/send.h b/net/batman-adv/send.h
index bc53adede58d..b68c272cb84f 100644
--- a/net/batman-adv/send.h
+++ b/net/batman-adv/send.h
@@ -22,8 +22,6 @@
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#include "types.h"
26
27int send_skb_packet(struct sk_buff *skb, 25int send_skb_packet(struct sk_buff *skb,
28 struct batman_if *batman_if, 26 struct batman_if *batman_if,
29 uint8_t *dst_addr); 27 uint8_t *dst_addr);
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 145e0f782923..bd088f877e38 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -26,7 +26,6 @@
26#include "send.h" 26#include "send.h"
27#include "bat_debugfs.h" 27#include "bat_debugfs.h"
28#include "translation-table.h" 28#include "translation-table.h"
29#include "types.h"
30#include "hash.h" 29#include "hash.h"
31#include "gateway_common.h" 30#include "gateway_common.h"
32#include "gateway_client.h" 31#include "gateway_client.h"
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index f6917dde42ce..7fb6726ccbdd 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -22,7 +22,6 @@
22#include "main.h" 22#include "main.h"
23#include "translation-table.h" 23#include "translation-table.h"
24#include "soft-interface.h" 24#include "soft-interface.h"
25#include "types.h"
26#include "hash.h" 25#include "hash.h"
27#include "originator.h" 26#include "originator.h"
28 27
diff --git a/net/batman-adv/translation-table.h b/net/batman-adv/translation-table.h
index a4f3a37fd6ed..f19931ca1457 100644
--- a/net/batman-adv/translation-table.h
+++ b/net/batman-adv/translation-table.h
@@ -22,8 +22,6 @@
22#ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ 22#ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
23#define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ 23#define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
24 24
25#include "types.h"
26
27int hna_local_init(struct bat_priv *bat_priv); 25int hna_local_init(struct bat_priv *bat_priv);
28void hna_local_add(struct net_device *soft_iface, uint8_t *addr); 26void hna_local_add(struct net_device *soft_iface, uint8_t *addr);
29void hna_local_remove(struct bat_priv *bat_priv, 27void hna_local_remove(struct bat_priv *bat_priv,
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index bedf29425775..121b11d2a23d 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -39,8 +39,8 @@ static struct sk_buff *frag_merge_packet(struct list_head *head,
39 (struct unicast_frag_packet *)skb->data; 39 (struct unicast_frag_packet *)skb->data;
40 struct sk_buff *tmp_skb; 40 struct sk_buff *tmp_skb;
41 struct unicast_packet *unicast_packet; 41 struct unicast_packet *unicast_packet;
42 int hdr_len = sizeof(struct unicast_packet), 42 int hdr_len = sizeof(struct unicast_packet);
43 uni_diff = sizeof(struct unicast_frag_packet) - hdr_len; 43 int uni_diff = sizeof(struct unicast_frag_packet) - hdr_len;
44 44
45 /* set skb to the first part and tmp_skb to the second part */ 45 /* set skb to the first part and tmp_skb to the second part */
46 if (up->flags & UNI_FRAG_HEAD) { 46 if (up->flags & UNI_FRAG_HEAD) {
@@ -231,6 +231,7 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
231 int ucf_hdr_len = sizeof(struct unicast_frag_packet); 231 int ucf_hdr_len = sizeof(struct unicast_frag_packet);
232 int data_len = skb->len - uc_hdr_len; 232 int data_len = skb->len - uc_hdr_len;
233 int large_tail = 0; 233 int large_tail = 0;
234 uint16_t seqno;
234 235
235 if (!bat_priv->primary_if) 236 if (!bat_priv->primary_if)
236 goto dropped; 237 goto dropped;
@@ -266,10 +267,9 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
266 frag1->flags = UNI_FRAG_HEAD | large_tail; 267 frag1->flags = UNI_FRAG_HEAD | large_tail;
267 frag2->flags = large_tail; 268 frag2->flags = large_tail;
268 269
269 frag1->seqno = htons((uint16_t)atomic_inc_return( 270 seqno = atomic_add_return(2, &batman_if->frag_seqno);
270 &batman_if->frag_seqno)); 271 frag1->seqno = htons(seqno - 1);
271 frag2->seqno = htons((uint16_t)atomic_inc_return( 272 frag2->seqno = htons(seqno);
272 &batman_if->frag_seqno));
273 273
274 send_skb_packet(skb, batman_if, dstaddr); 274 send_skb_packet(skb, batman_if, dstaddr);
275 send_skb_packet(frag_skb, batman_if, dstaddr); 275 send_skb_packet(frag_skb, batman_if, dstaddr);
@@ -286,7 +286,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
286{ 286{
287 struct ethhdr *ethhdr = (struct ethhdr *)skb->data; 287 struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
288 struct unicast_packet *unicast_packet; 288 struct unicast_packet *unicast_packet;
289 struct orig_node *orig_node; 289 struct orig_node *orig_node = NULL;
290 struct batman_if *batman_if; 290 struct batman_if *batman_if;
291 struct neigh_node *router; 291 struct neigh_node *router;
292 int data_len = skb->len; 292 int data_len = skb->len;
@@ -297,11 +297,6 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
297 /* get routing information */ 297 /* get routing information */
298 if (is_multicast_ether_addr(ethhdr->h_dest)) 298 if (is_multicast_ether_addr(ethhdr->h_dest))
299 orig_node = (struct orig_node *)gw_get_selected(bat_priv); 299 orig_node = (struct orig_node *)gw_get_selected(bat_priv);
300 else
301 orig_node = ((struct orig_node *)hash_find(bat_priv->orig_hash,
302 compare_orig,
303 choose_orig,
304 ethhdr->h_dest));
305 300
306 /* check for hna host */ 301 /* check for hna host */
307 if (!orig_node) 302 if (!orig_node)