Re: [B.A.T.M.A.N.] Problem with multi-radio, multi-channel in batman-adv

2012-04-18 Thread puyou.lu
Hi Simon, I have tried again, and I think the problem is caused by the same ESSID, as you said. I used the same ESSID on every wireless cards of every nodes.When I use different ESSIDs in different channel, the problem seems diappeared. Another question, does the two wireless cards(wlan0 and

Re: [B.A.T.M.A.N.] [PATCH 03/11] batman-adv: randomize initial seqno to avoid collision

2012-04-18 Thread Antonio Quartulli
On Tue, Apr 17, 2012 at 10:45:27 -0400, David Miller wrote: From: Antonio Quartulli or...@autistici.org Date: Tue, 17 Apr 2012 13:58:19 +0200 @@ -33,6 +33,11 @@ static void bat_iv_ogm_iface_enable(struct hard_iface *hard_iface) { struct batman_ogm_packet *batman_ogm_packet; +

Re: [B.A.T.M.A.N.] [PATCH 05/11] batman-adv: handle routing code initialization properly

2012-04-18 Thread Antonio Quartulli
On Tue, Apr 17, 2012 at 10:46:30 -0400, David Miller wrote: From: Antonio Quartulli or...@autistici.org Date: Tue, 17 Apr 2012 13:58:21 +0200 @@ -30,10 +30,11 @@ #include send.h #include bat_algo.h -static void bat_iv_ogm_iface_enable(struct hard_iface *hard_iface) +static int

Re: [B.A.T.M.A.N.] [PATCH 10/11] batman-adv: print OGM seq numbers as unsigned long

2012-04-18 Thread Antonio Quartulli
On Tue, Apr 17, 2012 at 10:47:46 -0400, David Miller wrote: From: Antonio Quartulli or...@autistici.org Date: Tue, 17 Apr 2012 13:58:26 +0200 OGM sequence numbers are declared as uint32_t and so they have to printed using %u instead of %d in order to avoid wrong representations.

Re: [B.A.T.M.A.N.] [PATCH 10/11] batman-adv: print OGM seq numbers as unsigned long

2012-04-18 Thread David Miller
From: Antonio Quartulli or...@autistici.org Date: Wed, 18 Apr 2012 09:01:35 +0200 On Wed, Apr 18, 2012 at 08:47:00AM +0200, Antonio Quartulli wrote: On Tue, Apr 17, 2012 at 10:47:46 -0400, David Miller wrote: From: Antonio Quartulli or...@autistici.org Date: Tue, 17 Apr 2012 13:58:26 +0200

[B.A.T.M.A.N.] [PATCH] batman-adv: use uint32_t instead of unsigned long to avoid cast

2012-04-18 Thread Antonio Quartulli
Reported-by: David Miller da...@davemloft.net Signed-off-by: Antonio Quartulli or...@autistici.org --- This patch is for *next*. It solves a problem pointed out by David S. Miller. This patch will be squashed with the one which introduced the issue and will be sent out in the next pull request.

[B.A.T.M.A.N.] [PATCH] batman-adv: use real error codes instead of meaningless -1

2012-04-18 Thread Antonio Quartulli
Reported-by: David Miller da...@davemloft.net Signed-off-by: Antonio Quartulli or...@autistici.org --- This patch is for *next*. This patch fixes a problem pointed out by David S. Miller. Actually the idea is to use real error codes instead of meaningless -1, even if this codes are only used

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: don't delay OGM information announcement

2012-04-18 Thread Martin Hundebøll
Hi Antonio, One minor/trivial change below. On 04/18/2012 12:27 AM, Antonio Quartulli wrote: In the current implementation the OGM is built and filled at the moment it is scheduled (1 originator interval before its sending). In this way, all the TT changes happening between OGM(seqno=X) and

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: don't delay OGM information announcement

2012-04-18 Thread Antonio Quartulli
On Wed, Apr 18, 2012 at 10:12:42AM +0200, Martin Hundebøll wrote: Hi Antonio, One minor/trivial change below. On 04/18/2012 12:27 AM, Antonio Quartulli wrote: + /* if we have too many changes for one packet don't send any +* and wait for the tt table request which will be

Re: [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval

2012-04-18 Thread Martin Hundebøll
Hi Antonio, On 04/18/2012 12:27 AM, Antonio Quartulli wrote: During an OGM-interval (time between two different OGM sendings) the same client could roam away and then roam back to us. In this case the node would add two events to the events list (that is going to be sent appended to the next

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: don't delay OGM information announcement

2012-04-18 Thread Martin Hundebøll
On 04/18/2012 10:31 AM, Antonio Quartulli wrote: On Wed, Apr 18, 2012 at 10:12:42AM +0200, Martin Hundebøll wrote: Hi Antonio, One minor/trivial change below. On 04/18/2012 12:27 AM, Antonio Quartulli wrote: + /* if we have too many changes for one packet don't send any +* and

Re: [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval

2012-04-18 Thread Antonio Quartulli
On Wed, Apr 18, 2012 at 10:33:34AM +0200, Martin Hundebøll wrote: Hi Antonio, On 04/18/2012 12:27 AM, Antonio Quartulli wrote: + /* check for ADD+DEL or DEL+ADD events */ spin_lock_bh(bat_priv-tt_changes_list_lock); + list_for_each_entry_safe(entry, safe,bat_priv-tt_changes_list,

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: don't delay OGM information announcement

2012-04-18 Thread Antonio Quartulli
On Wed, Apr 18, 2012 at 10:35:44AM +0200, Martin Hundebøll wrote: On 04/18/2012 10:31 AM, Antonio Quartulli wrote: On Wed, Apr 18, 2012 at 10:12:42AM +0200, Martin Hundebøll wrote: Hi Antonio, One minor/trivial change below. On 04/18/2012 12:27 AM, Antonio Quartulli wrote: + /* if

Re: [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval

2012-04-18 Thread Martin Hundebøll
On 04/18/2012 10:37 AM, Antonio Quartulli wrote: On Wed, Apr 18, 2012 at 10:33:34AM +0200, Martin Hundebøll wrote: Hi Antonio, On 04/18/2012 12:27 AM, Antonio Quartulli wrote: + /* check for ADD+DEL or DEL+ADD events */ spin_lock_bh(bat_priv-tt_changes_list_lock); +

Re: [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: let tt_global_entry_has_orig() return the orig_entry or NULL instead of 1 or 0 only

2012-04-18 Thread Martin Hundebøll
Hi Antonio, On 04/18/2012 12:27 AM, Antonio Quartulli wrote: Instead of returning only 1 or 0 this function has to return the found orig_entry (if any). In this way, operations that have to to modify the found orig_entry structure will not need to reiterate over the list again to find the

Re: [B.A.T.M.A.N.] [PATCH 4/5] batman-adv: update ttvn in case of client reannouncement

2012-04-18 Thread Martin Hundebøll
Hi, On 04/18/2012 12:27 AM, Antonio Quartulli wrote: in various scenarios it would be possible that a node receives an ADD event for a client it already knows to belong to the advertiser. In this case the node has to update the global entry ttvn with the one carried by the OGM. Signed-off-by:

Re: [B.A.T.M.A.N.] [PATCH 5/5] batman-adv: beautify tt_global_add() argument list

2012-04-18 Thread Martin Hundebøll
Hi, On 04/18/2012 12:27 AM, Antonio Quartulli wrote: Instead of adding a new bool argument each time it is needed, it is better (and simpler) to pass an 8bit flag argument which contains all the needed flags Signed-off-by: Antonio Quartullior...@autistici.org --- routing.c |2

[B.A.T.M.A.N.] [PATCH] batman-adv: avoid characters requiring shell escapes in protocol names

2012-04-18 Thread Marek Lindner
Reported-by: Andrew Lunn and...@lunn.ch Signed-off-by: Marek Lindner lindner_ma...@yahoo.de --- bat_iv_ogm.c |2 +- main.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index ed743a4..19da9d5 100644 --- a/bat_iv_ogm.c +++

[B.A.T.M.A.N.] [PATCH] batman-adv: ignore trailing CR when comparing protocol names

2012-04-18 Thread Marek Lindner
Signed-off-by: Marek Lindner lindner_ma...@yahoo.de --- main.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 1d338a3..fa29234 100644 --- a/main.c +++ b/main.c @@ -378,14 +378,19 @@ int bat_algo_seq_print_text(struct seq_file *seq, void

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use uint32_t instead of unsigned long to avoid cast

2012-04-18 Thread Marek Lindner
On Wednesday, April 18, 2012 15:35:13 Antonio Quartulli wrote: Reported-by: David Miller da...@davemloft.net Signed-off-by: Antonio Quartulli or...@autistici.org --- This patch is for *next*. It solves a problem pointed out by David S. Miller. This patch will be squashed with the one which

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use real error codes instead of meaningless -1

2012-04-18 Thread Marek Lindner
On Wednesday, April 18, 2012 15:40:40 Antonio Quartulli wrote: Reported-by: David Miller da...@davemloft.net Signed-off-by: Antonio Quartulli or...@autistici.org --- This patch is for *next*. This patch fixes a problem pointed out by David S. Miller. Actually the idea is to use real

[B.A.T.M.A.N.] pull request: batman-adv 2012-04-18

2012-04-18 Thread Antonio Quartulli
Hello David, this is the fixed version of my previous pull request (issued on 2012-04-17). In this patchset the issues you reported have been fixed; moreover I'm also including two new patches (1/13 and 2/13) which are respectively: 1/13) a fix for Al Viro's report about the missing htons()

[B.A.T.M.A.N.] [PATCH 01/13] batman-adv: convert the tt_crc to network order

2012-04-18 Thread Antonio Quartulli
Before sending out a TT_Request packet we must convert the tt_crc field value to network order (since it is 16bits long). Reported-by: Al Viro v...@zeniv.linux.org.uk Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/translation-table.c |2 +- 1 file changed, 1

[B.A.T.M.A.N.] [PATCH 02/13] batman-adv: remove duplicated line in comment

2012-04-18 Thread Antonio Quartulli
Remove an accidentally added duplicated line in a function comment Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bridge_loop_avoidance.c |1 - 1 file changed, 1 deletion(-) diff --git a/net/batman-adv/bridge_loop_avoidance.c

[B.A.T.M.A.N.] [PATCH 04/13] batman-adv: refactoring API: find generalized name for bat_ogm_init callback

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bat_iv_ogm.c |4 ++-- net/batman-adv/hard-interface.c |2 +- net/batman-adv/main.c |2 +-

[B.A.T.M.A.N.] [PATCH 05/13] batman-adv: randomize initial seqno to avoid collision

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bat_iv_ogm.c |5 + 1 file changed, 5 insertions(+) diff --git a/net/batman-adv/bat_iv_ogm.c

[B.A.T.M.A.N.] [PATCH 06/13] batman-adv: add iface_disable() callback to routing API

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bat_iv_ogm.c |7 +++ net/batman-adv/hard-interface.c |3 +-- net/batman-adv/main.c |1 +

[B.A.T.M.A.N.] [PATCH 07/13] batman-adv: handle routing code initialization properly

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bat_iv_ogm.c | 11 ++- net/batman-adv/hard-interface.c | 15 ++- net/batman-adv/types.h |

[B.A.T.M.A.N.] [PATCH 08/13] batman-adv: refactoring API: find generalized name for bat_ogm_init_primary callback

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bat_iv_ogm.c |4 ++-- net/batman-adv/hard-interface.c |2 +- net/batman-adv/main.c |2 +-

[B.A.T.M.A.N.] [PATCH 09/13] batman-adv: rename BATMAN_OGM_LEN to BATMAN_OGM_HLEN

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de Using BATMAN_OGM_LEN leaves one with the impression that this is the full packet size which is not the case. Therefore the variable is renamed. Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org ---

[B.A.T.M.A.N.] [PATCH 10/13] batman-adv: mark existing ogm variables as batman iv

2012-04-18 Thread Antonio Quartulli
From: Marek Lindner lindner_ma...@yahoo.de The coming protocol changes also will have a part called OGM. That makes it necessary to introduce a distinction in the code base. Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Antonio Quartulli or...@autistici.org ---

[B.A.T.M.A.N.] [PATCH 13/13] batman-adv: skip the window protection test when the originator has no neighbours

2012-04-18 Thread Antonio Quartulli
When we receive an OGM from from a node for the first time, the last_real_seqno field of the orig_node structure has not been initialised yet. The value of this field is used to compute the current ogm-seqno window and therefore the protection mechanism will probably drop the packet due to an

[B.A.T.M.A.N.] [PATCH 11/13] batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)

2012-04-18 Thread Antonio Quartulli
Instead of using sizeof(struct ethhdr) it is strongly recommended to use the kernel macro ETH_HLEN. This patch substitute each occurrence of the former expressione with the latter one. Signed-off-by: Antonio Quartulli or...@autistici.org --- net/batman-adv/bat_iv_ogm.c|7 +++

Re: [B.A.T.M.A.N.] Problem with multi-radio, multi-channel in batman-adv

2012-04-18 Thread Simon Wunderlich
Hi Puyou, On Wed, Apr 18, 2012 at 02:15:19PM +0800, puyou.lu wrote: Hi Simon, I have tried again, and I think the problem is caused by the same ESSID, as you said. I used the same ESSID on every wireless cards of every nodes.When I use different ESSIDs in different channel, the problem

[B.A.T.M.A.N.] [PATCHv3] batman-adv: Add get_ethtool_stats() support

2012-04-18 Thread Martin Hundebøll
Added additional counters in a bat_stats structure, which are exported through the ethtool api. The counters are specific to batman-adv and includes: forwarded packets management packets (OGMs at this point) translation table packets distributed arp table packets I would like you all to check

Re: [B.A.T.M.A.N.] pull request: batman-adv 2012-04-18

2012-04-18 Thread David Miller
From: Antonio Quartulli or...@autistici.org Date: Wed, 18 Apr 2012 11:59:57 +0200 this is the fixed version of my previous pull request (issued on 2012-04-17). In this patchset the issues you reported have been fixed; moreover I'm also including two new patches (1/13 and 2/13) which are

Re: [B.A.T.M.A.N.] pull request: batman-adv 2012-04-18

2012-04-18 Thread Al Viro
On Wed, Apr 18, 2012 at 11:59:57AM +0200, Antonio Quartulli wrote: Hello David, this is the fixed version of my previous pull request (issued on 2012-04-17). In this patchset the issues you reported have been fixed; moreover I'm also including two new patches (1/13 and 2/13) which are

[B.A.T.M.A.N.] [PATCH 1/4] batman: don't bother flipping -tt_data

2012-04-18 Thread Al Viro
just keep it net-endian all along Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- net/batman-adv/packet.h|2 +- net/batman-adv/routing.c |6 +- net/batman-adv/translation-table.c |8 3 files changed, 6 insertions(+), 10 deletions(-) diff --git

[B.A.T.M.A.N.] [PATCH 2/4] batman: don't bother flipping -tt_crc

2012-04-18 Thread Al Viro
Again, keep -tt_crc in batman_ogv_packet net-endian Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- net/batman-adv/bat_iv_ogm.c |6 ++ net/batman-adv/packet.h |2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/net/batman-adv/bat_iv_ogm.c

[B.A.T.M.A.N.] batman: keep batman_ogm_packet -seqno net-endian all along

2012-04-18 Thread Al Viro
Ditto for its -seqno... Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- net/batman-adv/bat_iv_ogm.c | 25 ++--- net/batman-adv/packet.h |2 +- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/net/batman-adv/bat_iv_ogm.c

[B.A.T.M.A.N.] batman: trivial endianness annotations

2012-04-18 Thread Al Viro
Missing endianness annotations - on-the-wire data and ip addresses. BTW, casting memcpy() arguments to (uint8_t *) is cargo-cult programming - they are void *, which is precisely take any pointer to object... Signed-off-by: Al Viro v...@zeniv.linux.org.uk ---

Re: [B.A.T.M.A.N.] batman: keep batman_ogm_packet -seqno net-endian all along

2012-04-18 Thread Al Viro
grr... this one would be 3/4 and the last (trivial endianness annotations) - 4/4. My apologies...

Re: [B.A.T.M.A.N.] Problem with multi-radio, multi-channel in batman-adv

2012-04-18 Thread Guido Iribarren
Hi! I guess you're planning a two.radio mesh to improve troughput. I recently went trough a similar experience and learnt thanks to this list, turns out, this might sound counterintuitive at first, but in some setups, using just 2 channels, spaced further apart, will avoid interference better than

Re: [B.A.T.M.A.N.] Determining on which node a client is connected to

2012-04-18 Thread Mitar
Hi! Thank you all for all your answers. They really help me a lot! On Tue, Apr 17, 2012 at 2:22 PM, Antonio Quartulli or...@autistici.org wrote: However, I didn't get why you need the node MAC. I think there was some misunderstand. I would just like to know on which node a client is connected

Re: [B.A.T.M.A.N.] [PATCH 2/4] batman: don't bother flipping -tt_crc

2012-04-18 Thread Antonio Quartulli
On Wed, Apr 18, 2012 at 07:10:58 +0100, Al Viro wrote: @@ -722,7 +721,7 @@ update_tt: tt_update_orig(bat_priv, orig_node, tt_buff, batman_ogm_packet-tt_num_changes, batman_ogm_packet-ttvn, -

Re: [B.A.T.M.A.N.] [PATCH 2/4] batman: don't bother flipping -tt_crc

2012-04-18 Thread Antonio Quartulli
On Thu, Apr 19, 2012 at 07:41:14AM +0200, Antonio Quartulli wrote: On Wed, Apr 18, 2012 at 07:10:58 +0100, Al Viro wrote: @@ -722,7 +721,7 @@ update_tt: tt_update_orig(bat_priv, orig_node, tt_buff, batman_ogm_packet-tt_num_changes,