From 490bc420f479ddf4d73a303eba26ff768e38213d Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 14 Nov 2011 15:52:12 +0000 Subject: [PATCH] batman-adv: update package to latest release (2011.4.0) Signed-off-by: Marek Lindner SVN-Revision: 29118 --- net/batman-adv/Makefile | 8 +-- net/batman-adv/files/etc/config/batman-adv | 1 + net/batman-adv/files/lib/batman-adv/config.sh | 7 ++- ...ld_position_in_tt_local_global_entry.patch | 41 ------------ ...anity_check_when_removing_global_tts.patch | 23 ------- ...ove_references_for_global_tt_entries.patch | 63 ------------------- 6 files changed, 11 insertions(+), 132 deletions(-) delete mode 100644 net/batman-adv/patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch delete mode 100644 net/batman-adv/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch delete mode 100644 net/batman-adv/patches/0003-batman-adv_remove_references_for_global_tt_entries.patch diff --git a/net/batman-adv/Makefile b/net/batman-adv/Makefile index 93fc391f9a..5154862464 100644 --- a/net/batman-adv/Makefile +++ b/net/batman-adv/Makefile @@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv -PKG_VERSION:=2011.3.1 -BATCTL_VERSION:=2011.3.0 -PKG_MD5SUM:=54a5caff56a8380f3070111ce84bbfc4 -BATCTL_MD5SUM:=8eb197896049bb04a6beef56015a16b6 +PKG_VERSION:=2011.4.0 +BATCTL_VERSION:=2011.4.0 +PKG_MD5SUM:=3987d693bd26d8057506b542c3635910 +BATCTL_MD5SUM:=325b25dbb8261f7fa19c6e1d9bfba6e1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) diff --git a/net/batman-adv/files/etc/config/batman-adv b/net/batman-adv/files/etc/config/batman-adv index 31ef797fbb..414b119663 100644 --- a/net/batman-adv/files/etc/config/batman-adv +++ b/net/batman-adv/files/etc/config/batman-adv @@ -2,6 +2,7 @@ config 'mesh' 'bat0' option 'interfaces' 'mesh' option 'aggregated_ogms' + option 'ap_isolation' option 'bonding' option 'fragmentation' option 'gw_bandwidth' diff --git a/net/batman-adv/files/lib/batman-adv/config.sh b/net/batman-adv/files/lib/batman-adv/config.sh index 347e3076f2..58a01d2bc1 100644 --- a/net/batman-adv/files/lib/batman-adv/config.sh +++ b/net/batman-adv/files/lib/batman-adv/config.sh @@ -13,13 +13,14 @@ is_module_loaded() { start_mesh () { local meshif="$1" - local interfaces aggregated_ogms bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval vis_mode + local interfaces aggregated_ogms ap_isolation bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval vis_mode is_module_loaded [ $? -ne 1 ] && return config_get interfaces "$meshif" interfaces config_get aggregated_ogms "$meshif" aggregated_ogms + config_get ap_isolation "$meshif" ap_isolation config_get bonding "$meshif" bonding config_get fragmentation "$meshif" fragmentation config_get gw_bandwidth "$meshif" gw_bandwidth @@ -57,6 +58,10 @@ start_mesh () { echo $aggregated_ogms > /sys/class/net/$meshif/mesh/aggregated_ogms fi + if [ $ap_isolation ]; then + echo $ap_isolation > /sys/class/net/$meshif/mesh/ap_isolation + fi + if [ $bonding ]; then echo $bonding > /sys/class/net/$meshif/mesh/bonding fi diff --git a/net/batman-adv/patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch b/net/batman-adv/patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch deleted file mode 100644 index 310e2816e6..0000000000 --- a/net/batman-adv/patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch +++ /dev/null @@ -1,41 +0,0 @@ - -Function tt_response_fill_table() actually uses a tt_local_entry pointer to -iterate either over the local or the global table entries (it depends on the -what hash table is passed as argument). To iterate over such entries the -hlist_for_each_entry_rcu() macro has to access their "hash_entry" field which -MUST be at the same position in both the tt_global/local_entry structures. - -Reported-by: Simon Wunderlich -Signed-off-by: Antonio Quartulli ---- - types.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - ---- a/types.h -+++ b/types.h -@@ -224,22 +224,22 @@ struct socket_packet { - - struct tt_local_entry { - uint8_t addr[ETH_ALEN]; -+ struct hlist_node hash_entry; - unsigned long last_seen; - uint16_t flags; - atomic_t refcount; - struct rcu_head rcu; -- struct hlist_node hash_entry; - }; - - struct tt_global_entry { - uint8_t addr[ETH_ALEN]; -+ struct hlist_node hash_entry; /* entry in the global table */ - struct orig_node *orig_node; - uint8_t ttvn; - uint16_t flags; /* only TT_GLOBAL_ROAM is used */ - unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */ - atomic_t refcount; - struct rcu_head rcu; -- struct hlist_node hash_entry; /* entry in the global table */ - }; - - struct tt_change_node { - diff --git a/net/batman-adv/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch b/net/batman-adv/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch deleted file mode 100644 index 9f43083535..0000000000 --- a/net/batman-adv/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch +++ /dev/null @@ -1,23 +0,0 @@ - -After removing the batman-adv module, the hash may be already gone -when tt_global_del_orig() tries to clean the hash. This patch adds -a sanity check to avoid this. - -Signed-off-by: Simon Wunderlich ---- - translation-table.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - ---- a/translation-table.c -+++ b/translation-table.c -@@ -712,6 +712,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv, - struct hlist_head *head; - spinlock_t *list_lock; /* protects write access to the hash lists */ - -+ if (!hash) -+ return; -+ - for (i = 0; i < hash->size; i++) { - head = &hash->table[i]; - list_lock = &hash->list_locks[i]; - diff --git a/net/batman-adv/patches/0003-batman-adv_remove_references_for_global_tt_entries.patch b/net/batman-adv/patches/0003-batman-adv_remove_references_for_global_tt_entries.patch deleted file mode 100644 index e155686aa1..0000000000 --- a/net/batman-adv/patches/0003-batman-adv_remove_references_for_global_tt_entries.patch +++ /dev/null @@ -1,63 +0,0 @@ - -struct tt_global_entry holds a reference to an orig_node which must be -decremented before deallocating the structure. - -Signed-off-by: Simon Wunderlich ---- - compat.c | 8 -------- - compat.h | 1 - - translation-table.c | 14 +++++++++++++- - 3 files changed, 13 insertions(+), 10 deletions(-) - ---- a/compat.c -+++ b/compat.c -@@ -36,12 +36,4 @@ void free_rcu_tt_local_entry(struct rcu_head *rcu) - kfree(tt_local_entry); - } - --void free_rcu_tt_global_entry(struct rcu_head *rcu) --{ -- struct tt_global_entry *tt_global_entry; -- -- tt_global_entry = container_of(rcu, struct tt_global_entry, rcu); -- kfree(tt_global_entry); --} -- - #endif /* < KERNEL_VERSION(3, 0, 0) */ ---- a/compat.h -+++ b/compat.h -@@ -63,7 +63,6 @@ void free_rcu_gw_node(struct rcu_head *rcu); - void free_rcu_neigh_node(struct rcu_head *rcu); - void free_rcu_softif_neigh(struct rcu_head *rcu); - void free_rcu_tt_local_entry(struct rcu_head *rcu); --void free_rcu_tt_global_entry(struct rcu_head *rcu); - - #endif /* < KERNEL_VERSION(3, 0, 0) */ - ---- a/translation-table.c -+++ b/translation-table.c -@@ -137,10 +137,22 @@ static void tt_local_entry_free_ref(struct tt_local_entry *tt_local_entry) - kfree_rcu(tt_local_entry, rcu); - } - -+static void tt_global_entry_free_rcu(struct rcu_head *rcu) -+{ -+ struct tt_global_entry *tt_global_entry; -+ -+ tt_global_entry = container_of(rcu, struct tt_global_entry, rcu); -+ -+ if (tt_global_entry->orig_node) -+ orig_node_free_ref(tt_global_entry->orig_node); -+ -+ kfree(tt_global_entry); -+} -+ - static void tt_global_entry_free_ref(struct tt_global_entry *tt_global_entry) - { - if (atomic_dec_and_test(&tt_global_entry->refcount)) -- kfree_rcu(tt_global_entry, rcu); -+ call_rcu(&tt_global_entry->rcu, tt_global_entry_free_rcu); - } - - static void tt_local_event(struct bat_priv *bat_priv, const uint8_t *addr, - -- 2.30.2