Skip to content

Commit

Permalink
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-…
Browse files Browse the repository at this point in the history
…merge
  • Loading branch information
David S. Miller committed Jan 31, 2011
2 parents 6b28ff3 + 091b948 commit a5e3c2a
Show file tree
Hide file tree
Showing 40 changed files with 101 additions and 102 deletions.
16 changes: 8 additions & 8 deletions Documentation/networking/batman-adv.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[state: 21-11-2010]
[state: 27-01-2011]

BATMAN-ADV
----------
Expand Down Expand Up @@ -67,15 +67,16 @@ All mesh wide settings can be found in batman's own interface
folder:

# ls /sys/class/net/bat0/mesh/
# aggregated_ogms bonding fragmentation orig_interval
# vis_mode
# aggregated_ogms gw_bandwidth hop_penalty
# bonding gw_mode orig_interval
# fragmentation gw_sel_class vis_mode


There is a special folder for debugging informations:

# ls /sys/kernel/debug/batman_adv/bat0/
# originators socket transtable_global transtable_local
# vis_data
# gateways socket transtable_global vis_data
# originators softif_neigh transtable_local


Some of the files contain all sort of status information regard-
Expand Down Expand Up @@ -230,9 +231,8 @@ CONTACT
Please send us comments, experiences, questions, anything :)

IRC: #batman on irc.freenode.org
Mailing-list: b.a.t.m.a.n@b.a.t.m.a.n@lists.open-mesh.org
(optional subscription at
https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
Mailing-list: b.a.t.m.a.n@open-mesh.org (optional subscription
at https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)

You can also contact the Authors:

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
# Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
#
# Marek Lindner, Simon Wunderlich
#
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/aggregation.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/aggregation.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down
6 changes: 2 additions & 4 deletions net/batman-adv/bat_debugfs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2010-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down Expand Up @@ -52,7 +52,6 @@ static void emit_log_char(struct debug_log *debug_log, char c)

static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)
{
int printed_len;
va_list args;
static char debug_log_buf[256];
char *p;
Expand All @@ -62,8 +61,7 @@ static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)

spin_lock_bh(&debug_log->lock);
va_start(args, fmt);
printed_len = vscnprintf(debug_log_buf, sizeof(debug_log_buf),
fmt, args);
vscnprintf(debug_log_buf, sizeof(debug_log_buf), fmt, args);
va_end(args);

for (p = debug_log_buf; *p != 0; p++)
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bat_debugfs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2010-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bat_sysfs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2010-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bat_sysfs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2010-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bitarray.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2006-2011 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bitarray.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2006-2011 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/gateway_client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2009-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/gateway_client.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2009-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/gateway_common.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2009-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/gateway_common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2009-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
13 changes: 10 additions & 3 deletions net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down Expand Up @@ -34,6 +34,12 @@
/* protect update critical side of if_list - but not the content */
static DEFINE_SPINLOCK(if_list_lock);


static int batman_skb_recv(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *ptype,
struct net_device *orig_dev);

static void hardif_free_rcu(struct rcu_head *rcu)
{
struct batman_if *batman_if;
Expand Down Expand Up @@ -549,8 +555,9 @@ static int hard_if_event(struct notifier_block *this,

/* receive a packet with the batman ethertype coming on a hard
* interface */
int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype, struct net_device *orig_dev)
static int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype,
struct net_device *orig_dev)
{
struct bat_priv *bat_priv;
struct batman_packet *batman_packet;
Expand Down
6 changes: 1 addition & 5 deletions net/batman-adv/hard-interface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down Expand Up @@ -35,10 +35,6 @@ struct batman_if *get_batman_if_by_netdev(struct net_device *net_dev);
int hardif_enable_interface(struct batman_if *batman_if, char *iface_name);
void hardif_disable_interface(struct batman_if *batman_if);
void hardif_remove_interfaces(void);
int batman_skb_recv(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *ptype,
struct net_device *orig_dev);
int hardif_min_mtu(struct net_device *soft_iface);
void update_min_mtu(struct net_device *soft_iface);

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/hash.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2006-2011 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down
7 changes: 1 addition & 6 deletions net/batman-adv/hash.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2006-2011 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down Expand Up @@ -49,11 +49,6 @@ struct hashtable_t {
/* allocates and clears the hash */
struct hashtable_t *hash_new(int size);

/* remove element if you already found the element you want to delete and don't
* need the overhead to find it again with hash_remove(). But usually, you
* don't want to use this function, as it fiddles with hash-internals. */
void *hash_remove_element(struct hashtable_t *hash, struct element_t *elem);

/* free only the hashtable and the hash itself. */
void hash_destroy(struct hashtable_t *hash);

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/icmp_socket.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/icmp_socket.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down
17 changes: 1 addition & 16 deletions net/batman-adv/main.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand All @@ -22,9 +22,6 @@
#ifndef _NET_BATMAN_ADV_MAIN_H_
#define _NET_BATMAN_ADV_MAIN_H_

/* Kernel Programming */
#define LINUX

#define DRIVER_AUTHOR "Marek Lindner <lindner_marek@yahoo.de>, " \
"Simon Wunderlich <siwu@hrz.tu-chemnitz.de>"
#define DRIVER_DESC "B.A.T.M.A.N. advanced"
Expand Down Expand Up @@ -54,7 +51,6 @@

#define NUM_WORDS (TQ_LOCAL_WINDOW_SIZE / WORD_BIT_SIZE)

#define PACKBUFF_SIZE 2000
#define LOG_BUF_LEN 8192 /* has to be a power of 2 */

#define VIS_INTERVAL 5000 /* 5 seconds */
Expand Down Expand Up @@ -96,15 +92,11 @@
#define DBG_ROUTES 2 /* route or hna added / changed / deleted */
#define DBG_ALL 3

#define LOG_BUF_LEN 8192 /* has to be a power of 2 */


/*
* Vis
*/

/* #define VIS_SUBCLUSTERS_DISABLED */

/*
* Kernel headers
*/
Expand Down Expand Up @@ -158,13 +150,6 @@ static inline void bat_dbg(char type __always_unused,
}
#endif

#define bat_warning(net_dev, fmt, arg...) \
do { \
struct net_device *_netdev = (net_dev); \
struct bat_priv *_batpriv = netdev_priv(_netdev); \
bat_dbg(DBG_ALL, _batpriv, fmt, ## arg); \
pr_warning("%s: " fmt, _netdev->name, ## arg); \
} while (0)
#define bat_info(net_dev, fmt, arg...) \
do { \
struct net_device *_netdev = (net_dev); \
Expand Down
4 changes: 2 additions & 2 deletions net/batman-adv/originator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2009-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down Expand Up @@ -247,7 +247,7 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
orig_node->hna_buff_len);
/* update bonding candidates, we could have lost
* some candidates. */
update_bonding_candidates(bat_priv, orig_node);
update_bonding_candidates(orig_node);
}
}

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/originator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down
3 changes: 2 additions & 1 deletion net/batman-adv/packet.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down Expand Up @@ -50,6 +50,7 @@

/* fragmentation defines */
#define UNI_FRAG_HEAD 0x01
#define UNI_FRAG_LARGETAIL 0x02

struct batman_packet {
uint8_t packet_type;
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/ring_buffer.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/ring_buffer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
* Copyright (C) 2007-2011 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
Loading

0 comments on commit a5e3c2a

Please sign in to comment.