Re: [B.A.T.M.A.N.] [PATCH] batctl: use ETH_ALEN instead of hardcoded numeric constants

2012-02-05 Thread Marek Lindner
On Saturday, February 04, 2012 23:52:12 Antonio Quartulli wrote:
 In tcpdump.h the numeric constants 6 is usedinstead of the more portable
 (and readable) define ETH_ALEN. This patch substitute any hardcoded value
 with such define.

Applied in revision 64ab6b5.

Thanks,
Marek


[B.A.T.M.A.N.] batctl set different bw not the one passed as paramenter

2012-02-05 Thread Gioacchino Mazzurco
as in subject

eigenServer gioacchino # batctl gw server 10MBit/5MBit
eigenServer gioacchino # batctl gw
server (announced bw: 8MBit/5MBit)

why?


Re: [B.A.T.M.A.N.] batctl set different bw not the one passed as paramenter

2012-02-05 Thread Sven Eckelmann
On Sunday 05 February 2012 18:34:39 Gioacchino Mazzurco wrote:
 as in subject
 
 eigenServer gioacchino # batctl gw server 10MBit/5MBit
 eigenServer gioacchino # batctl gw
 server (announced bw: 8MBit/5MBit)
 
 why?

Because it works similar to wifi coverage when you use `iw phy phy0 set 
distance 10`. You ask for a bandwidth and this bandwidth is encoded in a 
binary word not large enough to store (10 * 2**20) or (5 * 2**20). So you end 
up with a information that is only similar to the input you gave.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.


[B.A.T.M.A.N.] Fwd: Re: batctl set different bw not the one passed as paramenter

2012-02-05 Thread Gioacchino Mazzurco
---BeginMessage---
So there is no solution

Thanks anyway ;)

On Sunday 05 February 2012 18:41:38 you wrote:
 On Sunday 05 February 2012 18:34:39 Gioacchino Mazzurco wrote:
  as in subject
  
  eigenServer gioacchino # batctl gw server 10MBit/5MBit
  eigenServer gioacchino # batctl gw
  server (announced bw: 8MBit/5MBit)
  
  why?
 
 Because it works similar to wifi coverage when you use `iw phy phy0 set
 distance 10`. You ask for a bandwidth and this bandwidth is encoded in a
 binary word not large enough to store (10 * 2**20) or (5 * 2**20). So you
 end up with a information that is only similar to the input you gave.
 
 Kind regards,
   Sven---End Message---


[B.A.T.M.A.N.] [PATCH] batman-adv: Remove declaration of only locally used functions

2012-02-05 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org
---
This should help us to find unused code. The test was done with
a script that was inspired by another script from d0tslash.
I would like to add this to the daily tests when this patch
was added to next.

set -e
defined=`nm -g --defined-only *.o|awk '{print $3}'|sort|uniq`
used=`nm -g --undefined-only *.o|awk '{print $2}'|sort|uniq`

for i in $defined; do
found=0
for j in $used; do
[ $i = $j ]  found=1  break
done
[ $found = 0 ]  echo $i
done
---
 translation-table.c |   22 ++
 translation-table.h |8 
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index 9a6f315..c1abf48 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -30,6 +30,8 @@
 
 #include linux/crc16.h
 
+static void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
+ struct orig_node *orig_node);
 static void _tt_global_del(struct bat_priv *bat_priv,
   struct tt_global_entry *tt_global_entry,
   const char *message);
@@ -644,9 +646,10 @@ out:
tt_global_entry_free_ref(tt_global_entry);
 }
 
-void tt_global_del(struct bat_priv *bat_priv,
-  struct orig_node *orig_node, const unsigned char *addr,
-  const char *message, bool roaming)
+static void tt_global_del(struct bat_priv *bat_priv,
+ struct orig_node *orig_node,
+ const unsigned char *addr,
+ const char *message, bool roaming)
 {
struct tt_global_entry *tt_global_entry = NULL;
struct tt_local_entry *tt_local_entry = NULL;
@@ -848,7 +851,8 @@ out:
 }
 
 /* Calculates the checksum of the local table of a given orig_node */
-uint16_t tt_global_crc(struct bat_priv *bat_priv, struct orig_node *orig_node)
+static uint16_t tt_global_crc(struct bat_priv *bat_priv,
+ struct orig_node *orig_node)
 {
uint16_t total = 0, total_one;
struct hashtable_t *hash = bat_priv-tt_global_hash;
@@ -936,8 +940,10 @@ static void tt_req_list_free(struct bat_priv *bat_priv)
spin_unlock_bh(bat_priv-tt_req_list_lock);
 }
 
-void tt_save_orig_buffer(struct bat_priv *bat_priv, struct orig_node 
*orig_node,
-const unsigned char *tt_buff, uint8_t tt_num_changes)
+static void tt_save_orig_buffer(struct bat_priv *bat_priv,
+   struct orig_node *orig_node,
+   const unsigned char *tt_buff,
+   uint8_t tt_num_changes)
 {
uint16_t tt_buff_len = tt_len(tt_num_changes);
 
@@ -1629,8 +1635,8 @@ unlock:
return ret;
 }
 
-void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
-  struct orig_node *orig_node)
+static void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
+ struct orig_node *orig_node)
 {
struct neigh_node *neigh_node = NULL;
struct sk_buff *skb = NULL;
diff --git a/translation-table.h b/translation-table.h
index c753633..bfebe26 100644
--- a/translation-table.h
+++ b/translation-table.h
@@ -39,23 +39,15 @@ int tt_global_add(struct bat_priv *bat_priv, struct 
orig_node *orig_node,
 int tt_global_seq_print_text(struct seq_file *seq, void *offset);
 void tt_global_del_orig(struct bat_priv *bat_priv,
struct orig_node *orig_node, const char *message);
-void tt_global_del(struct bat_priv *bat_priv,
-  struct orig_node *orig_node, const unsigned char *addr,
-  const char *message, bool roaming);
 struct orig_node *transtable_search(struct bat_priv *bat_priv,
const uint8_t *src, const uint8_t *addr);
-void tt_save_orig_buffer(struct bat_priv *bat_priv, struct orig_node 
*orig_node,
-const unsigned char *tt_buff, uint8_t tt_num_changes);
 uint16_t tt_local_crc(struct bat_priv *bat_priv);
-uint16_t tt_global_crc(struct bat_priv *bat_priv, struct orig_node *orig_node);
 void tt_free(struct bat_priv *bat_priv);
 bool send_tt_response(struct bat_priv *bat_priv,
  struct tt_query_packet *tt_request);
 bool is_my_client(struct bat_priv *bat_priv, const uint8_t *addr);
 void handle_tt_response(struct bat_priv *bat_priv,
struct tt_query_packet *tt_response);
-void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
-  struct orig_node *orig_node);
 void tt_commit_changes(struct bat_priv *bat_priv);
 bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst);
 void tt_update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node,
-- 
1.7.8.3



Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use ETH_ALEN instead of hardcoded numeric constants

2012-02-05 Thread Marek Lindner
On Saturday, February 04, 2012 23:33:30 Sven Eckelmann wrote:
 On Monday 30 January 2012 20:59:17 Antonio Quartulli wrote:
  In packet.h the numeric constant 6 is used instead of the more portable
  ETH_ALEN define. This patch substitute any hardcoded value with such
  define.
 
 Acked-by: Sven Eckelmann s...@narfation.org

Applied in revision 24a6289.

Thanks,
Marek


Re: [B.A.T.M.A.N.] [RFCv2] batman-adv: Replace bitarray operations with bitmap

2012-02-05 Thread Marek Lindner
On Sunday, February 05, 2012 00:34:52 Sven Eckelmann wrote:
 bitarray.c consists mostly of functionality that is already available as
 part of the standard kernel API. batman-adv could use architecture
 optimized code and reduce the binary size by switching to the standard
 functions.

Applied in revision a9f0721.

Thanks,
Marek


Re: [B.A.T.M.A.N.] [PATCH] batman-adv: encourage batman to take shorter routes by changing the default hop penalty

2012-02-05 Thread Marek Lindner
On Friday, January 27, 2012 23:11:55 Marek Lindner wrote:
 Signed-off-by: Marek Lindner lindner_ma...@yahoo.de
 ---
  soft-interface.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks for all the feedback and comments. I applied the patch in revision 
6a12de1. Let's see how it goes.

Regards,
Marek