From 951a06e78d5af9ffda9f00139fef1186c202f8ae Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 26 May 2018 11:40:32 +0200 Subject: batman-adv: Drop "experimental" from BATMAN_V Kconfig The Kconfig option BATMAN_ADV_BATMAN_V is now enabled by default when the BATMAN_ADV is enabled. A feature which is enabled by default for a module should not be considered experimental. Reported-by: Joe Perches Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig index de8034d80623..98c7f3820d53 100644 --- a/net/batman-adv/Kconfig +++ b/net/batman-adv/Kconfig @@ -33,7 +33,7 @@ config BATMAN_ADV tools. config BATMAN_ADV_BATMAN_V - bool "B.A.T.M.A.N. V protocol (experimental)" + bool "B.A.T.M.A.N. V protocol" depends on BATMAN_ADV && !(CFG80211=m && BATMAN_ADV=y) default y help -- cgit v1.2.3 From ab4e58534dee7f273badfe21fa29cbe24553682f Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Sun, 3 Jun 2018 18:52:03 +0800 Subject: batman-adv: enable DAT by default at compile time DAT (Distributed ARP Table) has been enabled by default in the out-of-tree batman-adv kernel module for several years already. It can now be enabled in the kernel too. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig index 98c7f3820d53..ff38df8bab91 100644 --- a/net/batman-adv/Kconfig +++ b/net/batman-adv/Kconfig @@ -60,7 +60,7 @@ config BATMAN_ADV_BLA config BATMAN_ADV_DAT bool "Distributed ARP Table" depends on BATMAN_ADV && INET - default n + default y help This option enables DAT (Distributed ARP Table), a DHT based mechanism that increases ARP reliability on sparse wireless -- cgit v1.2.3 From 55f949c4fa6cefb199fd6208c275a3457e39e4bc Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 26 May 2018 11:40:31 +0200 Subject: batman-adv: Remove "default n" in Kconfig The "default n" is the default value for any bool or tristate Kconfig setting. It is therefore not necessary to add it to a config entry. Reported-by: Sergei Shtylyov Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/Kconfig | 4 ---- 1 file changed, 4 deletions(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig index ff38df8bab91..361116f77cb9 100644 --- a/net/batman-adv/Kconfig +++ b/net/batman-adv/Kconfig @@ -24,7 +24,6 @@ config BATMAN_ADV depends on NET select CRC16 select LIBCRC32C - default n help B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing protocol for multi-hop ad-hoc mesh networks. The @@ -70,7 +69,6 @@ config BATMAN_ADV_DAT config BATMAN_ADV_NC bool "Network Coding" depends on BATMAN_ADV - default n help This option enables network coding, a mechanism that aims to increase the overall network throughput by fusing multiple @@ -84,7 +82,6 @@ config BATMAN_ADV_NC config BATMAN_ADV_MCAST bool "Multicast optimisation" depends on BATMAN_ADV && INET && !(BRIDGE=m && BATMAN_ADV=y) - default n help This option enables the multicast optimisation which aims to reduce the air overhead while improving the reliability of @@ -94,7 +91,6 @@ config BATMAN_ADV_DEBUGFS bool "batman-adv debugfs entries" depends on BATMAN_ADV depends on DEBUG_FS - default n help Enable this to export routing related debug tables via debugfs. The information for each soft-interface and used hard-interface can be -- cgit v1.2.3 From be01dc33b7b36fd974275ed91b85fcf2c6ae62aa Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Thu, 5 Jul 2018 14:42:49 +0200 Subject: batman-adv: fix checkpatch warning about misspelled "cache" commit a2d4df9b673c ("spelling.txt: add more spellings to spelling.txt") introduced the spellcheck of "cache" for checkpatch.pl. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c index 4229b01ac7b5..95a94160baf8 100644 --- a/net/batman-adv/debugfs.c +++ b/net/batman-adv/debugfs.c @@ -117,7 +117,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode, #ifdef CONFIG_BATMAN_ADV_DAT /** - * batadv_dat_cache_open() - Prepare file handler for reads from dat_chache + * batadv_dat_cache_open() - Prepare file handler for reads from dat_cache * @inode: inode which was opened * @file: file handle to be initialized * -- cgit v1.2.3 From 94f01eed49b569a14f02fcfecfd6401a95008049 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 7 Jul 2018 21:36:24 +0200 Subject: batman-adv: Unify include guards style All other include guards in batman-adv use the style: * _NET_BATMAN_ADV_$(FILENAME)_ * uppercase only * "." & "-" replaced with "_" Use this also in the B.A.T.M.A.N. IV/V OGM implementation headers. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/bat_iv_ogm.h | 6 +++--- net/batman-adv/bat_v_ogm.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/bat_iv_ogm.h b/net/batman-adv/bat_iv_ogm.h index 317cafd302cf..3dc6a7a43eb7 100644 --- a/net/batman-adv/bat_iv_ogm.h +++ b/net/batman-adv/bat_iv_ogm.h @@ -16,11 +16,11 @@ * along with this program; if not, see . */ -#ifndef _BATMAN_ADV_BATADV_IV_OGM_H_ -#define _BATMAN_ADV_BATADV_IV_OGM_H_ +#ifndef _NET_BATMAN_ADV_BAT_IV_OGM_H_ +#define _NET_BATMAN_ADV_BAT_IV_OGM_H_ #include "main.h" int batadv_iv_init(void); -#endif /* _BATMAN_ADV_BATADV_IV_OGM_H_ */ +#endif /* _NET_BATMAN_ADV_BAT_IV_OGM_H_ */ diff --git a/net/batman-adv/bat_v_ogm.h b/net/batman-adv/bat_v_ogm.h index ed36c5e79fde..e5be14c908c6 100644 --- a/net/batman-adv/bat_v_ogm.h +++ b/net/batman-adv/bat_v_ogm.h @@ -16,8 +16,8 @@ * along with this program; if not, see . */ -#ifndef _BATMAN_ADV_BATADV_V_OGM_H_ -#define _BATMAN_ADV_BATADV_V_OGM_H_ +#ifndef _NET_BATMAN_ADV_BAT_V_OGM_H_ +#define _NET_BATMAN_ADV_BAT_V_OGM_H_ #include "main.h" @@ -34,4 +34,4 @@ void batadv_v_ogm_primary_iface_set(struct batadv_hard_iface *primary_iface); int batadv_v_ogm_packet_recv(struct sk_buff *skb, struct batadv_hard_iface *if_incoming); -#endif /* _BATMAN_ADV_BATADV_V_OGM_H_ */ +#endif /* _NET_BATMAN_ADV_BAT_V_OGM_H_ */ -- cgit v1.2.3 From 3b1709de64bcc54284812fa43808da07089008ca Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 7 Jul 2018 21:46:11 +0200 Subject: batman-adv: Join batadv_purge_orig_ref and _batadv_purge_orig The single line function batadv_purge_orig_ref has no function beside providing the name used by other source files. This can also be done simpler by just renaming _batadv_purge_orig to batadv_purge_orig_ref. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/originator.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 716e5b43acfa..1d295da3e342 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -1339,7 +1339,11 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, return false; } -static void _batadv_purge_orig(struct batadv_priv *bat_priv) +/** + * batadv_purge_orig_ref() - Purge all outdated originators + * @bat_priv: the bat priv with all the soft interface information + */ +void batadv_purge_orig_ref(struct batadv_priv *bat_priv) { struct batadv_hashtable *hash = bat_priv->orig_hash; struct hlist_node *node_tmp; @@ -1385,21 +1389,12 @@ static void batadv_purge_orig(struct work_struct *work) delayed_work = to_delayed_work(work); bat_priv = container_of(delayed_work, struct batadv_priv, orig_work); - _batadv_purge_orig(bat_priv); + batadv_purge_orig_ref(bat_priv); queue_delayed_work(batadv_event_workqueue, &bat_priv->orig_work, msecs_to_jiffies(BATADV_ORIG_WORK_PERIOD)); } -/** - * batadv_purge_orig_ref() - Purge all outdated originators - * @bat_priv: the bat priv with all the soft interface information - */ -void batadv_purge_orig_ref(struct batadv_priv *bat_priv) -{ - _batadv_purge_orig(bat_priv); -} - #ifdef CONFIG_BATMAN_ADV_DEBUGFS /** -- cgit v1.2.3 From 993a4a5f7cd3aef53be3953d11f86b2d3630ebb8 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 7 Jul 2018 21:50:18 +0200 Subject: batman-adv: Convert batadv_dat_addr_t to proper type The #define for batadv_dat_addr_t is doing nothing else than giving u16 a new typename. But C already has the special keyword "typedef" which is also better supported by kernel-doc. Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich --- net/batman-adv/types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'net/batman-adv') diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 360357f83f20..343d304851a5 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -43,12 +43,13 @@ struct seq_file; #ifdef CONFIG_BATMAN_ADV_DAT /** - * batadv_dat_addr_t - it is the type used for all DHT addresses. If it is - * changed, BATADV_DAT_ADDR_MAX is changed as well. + * typedef batadv_dat_addr_t - type used for all DHT addresses + * + * If it is changed, BATADV_DAT_ADDR_MAX is changed as well. * * *Please be careful: batadv_dat_addr_t must be UNSIGNED* */ -#define batadv_dat_addr_t u16 +typedef u16 batadv_dat_addr_t; #endif /* CONFIG_BATMAN_ADV_DAT */ -- cgit v1.2.3