it may be the case that we want to store some local TT client flags in a global entry, therefore the tt_global_add needs to get a proper argument for this
Signed-off-by: Antonio Quartulli ordex@autistici.org ---
Based on top of the TVLV patches sent by Marek (but they may apply on maser as well)
Cheers,
translation-table.c | 2 +- translation-table.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/translation-table.c b/translation-table.c index 5d99c64..c1a8a10 100644 --- a/translation-table.c +++ b/translation-table.c @@ -786,7 +786,7 @@ out: /* caller must hold orig_node refcount */ int batadv_tt_global_add(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, - const unsigned char *tt_addr, uint8_t flags, + const unsigned char *tt_addr, uint16_t flags, uint8_t ttvn) { struct batadv_tt_global_entry *tt_global_entry; diff --git a/translation-table.h b/translation-table.h index 597a5d6..b4b6dea 100644 --- a/translation-table.h +++ b/translation-table.h @@ -32,7 +32,7 @@ void batadv_tt_global_add_orig(struct batadv_priv *bat_priv, const unsigned char *tt_buff, int tt_buff_len); int batadv_tt_global_add(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, - const unsigned char *addr, uint8_t flags, + const unsigned char *addr, uint16_t flags, uint8_t ttvn); int batadv_tt_global_seq_print_text(struct seq_file *seq, void *offset); void batadv_tt_global_del_orig(struct batadv_priv *bat_priv,
Client flags from bit 0 to 7 are sent over the wire. BATADV_TT_CLIENT_TEMP is not sent therefore it has occupy an higher bit so to avoid wasting positions used by flags sent within packets
Signed-off-by: Antonio Quartulli ordex@autistici.org --- packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packet.h b/packet.h index e24daa6..5856994 100644 --- a/packet.h +++ b/packet.h @@ -106,10 +106,10 @@ enum batadv_tt_client_flags { BATADV_TT_CLIENT_DEL = BIT(0), BATADV_TT_CLIENT_ROAM = BIT(1), BATADV_TT_CLIENT_WIFI = BIT(2), - BATADV_TT_CLIENT_TEMP = BIT(3), BATADV_TT_CLIENT_NOPURGE = BIT(8), BATADV_TT_CLIENT_NEW = BIT(9), BATADV_TT_CLIENT_PENDING = BIT(10), + BATADV_TT_CLIENT_TEMP = BIT(11), };
/* claim frame types for the bridge loop avoidance */
On Wednesday, April 17, 2013 02:22:23 Antonio Quartulli wrote:
Client flags from bit 0 to 7 are sent over the wire. BATADV_TT_CLIENT_TEMP is not sent therefore it has occupy an higher bit so to avoid wasting positions used by flags sent within packets
Signed-off-by: Antonio Quartulli ordex@autistici.org
packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Marek Lindner lindner_marek@yahoo.de
Cheers, Marek
On Wednesday, April 17, 2013 02:22:22 Antonio Quartulli wrote:
@@ -786,7 +786,7 @@ out: /* caller must hold orig_node refcount */ int batadv_tt_global_add(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node,
const unsigned char *tt_addr, uint8_t flags,
const unsigned char *tt_addr, uint16_t flags, uint8_t ttvn)
{ struct batadv_tt_global_entry *tt_global_entry;
If you resubmit the patch with the missing kernel doc I will merge it. :)
Cheers, Marek
b.a.t.m.a.n@lists.open-mesh.org