aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/gateway_client.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2017-12-02 13:51:53 -0500
committerSimon Wunderlich <sw@simonwunderlich.de>2017-12-15 11:29:24 -0500
commitff15c27c97303fbe5abc49c25c73ea299ab72d31 (patch)
treeec78240c800bdf7a1ef3322175c5648a9ffa6d41 /net/batman-adv/gateway_client.c
parente57acf8e93fb65715af7595066d99d4c0c3f0235 (diff)
batman-adv: Add kernel-doc to externally visible functions
According to the kernel-doc documentation, externally visible functions should be documented. This refers to all all non-static function which can (and will) be used by functions in other sources files. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/gateway_client.c')
-rw-r--r--net/batman-adv/gateway_client.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 6731f7dabeb9..2488e25d0eef 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -93,6 +93,12 @@ void batadv_gw_node_put(struct batadv_gw_node *gw_node)
93 kref_put(&gw_node->refcount, batadv_gw_node_release); 93 kref_put(&gw_node->refcount, batadv_gw_node_release);
94} 94}
95 95
96/**
97 * batadv_gw_get_selected_gw_node() - Get currently selected gateway
98 * @bat_priv: the bat priv with all the soft interface information
99 *
100 * Return: selected gateway (with increased refcnt), NULL on errors
101 */
96struct batadv_gw_node * 102struct batadv_gw_node *
97batadv_gw_get_selected_gw_node(struct batadv_priv *bat_priv) 103batadv_gw_get_selected_gw_node(struct batadv_priv *bat_priv)
98{ 104{
@@ -111,6 +117,12 @@ out:
111 return gw_node; 117 return gw_node;
112} 118}
113 119
120/**
121 * batadv_gw_get_selected_orig() - Get originator of currently selected gateway
122 * @bat_priv: the bat priv with all the soft interface information
123 *
124 * Return: orig_node of selected gateway (with increased refcnt), NULL on errors
125 */
114struct batadv_orig_node * 126struct batadv_orig_node *
115batadv_gw_get_selected_orig(struct batadv_priv *bat_priv) 127batadv_gw_get_selected_orig(struct batadv_priv *bat_priv)
116{ 128{
@@ -204,6 +216,10 @@ void batadv_gw_check_client_stop(struct batadv_priv *bat_priv)
204 batadv_gw_node_put(curr_gw); 216 batadv_gw_node_put(curr_gw);
205} 217}
206 218
219/**
220 * batadv_gw_election() - Elect the best gateway
221 * @bat_priv: the bat priv with all the soft interface information
222 */
207void batadv_gw_election(struct batadv_priv *bat_priv) 223void batadv_gw_election(struct batadv_priv *bat_priv)
208{ 224{
209 struct batadv_gw_node *curr_gw = NULL; 225 struct batadv_gw_node *curr_gw = NULL;
@@ -292,6 +308,11 @@ out:
292 batadv_neigh_ifinfo_put(router_ifinfo); 308 batadv_neigh_ifinfo_put(router_ifinfo);
293} 309}
294 310
311/**
312 * batadv_gw_check_election() - Elect orig node as best gateway when eligible
313 * @bat_priv: the bat priv with all the soft interface information
314 * @orig_node: orig node which is to be checked
315 */
295void batadv_gw_check_election(struct batadv_priv *bat_priv, 316void batadv_gw_check_election(struct batadv_priv *bat_priv,
296 struct batadv_orig_node *orig_node) 317 struct batadv_orig_node *orig_node)
297{ 318{
@@ -460,6 +481,11 @@ out:
460 batadv_gw_node_put(gw_node); 481 batadv_gw_node_put(gw_node);
461} 482}
462 483
484/**
485 * batadv_gw_node_delete() - Remove orig_node from gateway list
486 * @bat_priv: the bat priv with all the soft interface information
487 * @orig_node: orig node which is currently in process of being removed
488 */
463void batadv_gw_node_delete(struct batadv_priv *bat_priv, 489void batadv_gw_node_delete(struct batadv_priv *bat_priv,
464 struct batadv_orig_node *orig_node) 490 struct batadv_orig_node *orig_node)
465{ 491{
@@ -471,6 +497,10 @@ void batadv_gw_node_delete(struct batadv_priv *bat_priv,
471 batadv_gw_node_update(bat_priv, orig_node, &gateway); 497 batadv_gw_node_update(bat_priv, orig_node, &gateway);
472} 498}
473 499
500/**
501 * batadv_gw_node_free() - Free gateway information from soft interface
502 * @bat_priv: the bat priv with all the soft interface information
503 */
474void batadv_gw_node_free(struct batadv_priv *bat_priv) 504void batadv_gw_node_free(struct batadv_priv *bat_priv)
475{ 505{
476 struct batadv_gw_node *gw_node; 506 struct batadv_gw_node *gw_node;
@@ -486,6 +516,14 @@ void batadv_gw_node_free(struct batadv_priv *bat_priv)
486} 516}
487 517
488#ifdef CONFIG_BATMAN_ADV_DEBUGFS 518#ifdef CONFIG_BATMAN_ADV_DEBUGFS
519
520/**
521 * batadv_gw_client_seq_print_text() - Print the gateway table in a seq file
522 * @seq: seq file to print on
523 * @offset: not used
524 *
525 * Return: always 0
526 */
489int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset) 527int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset)
490{ 528{
491 struct net_device *net_dev = (struct net_device *)seq->private; 529 struct net_device *net_dev = (struct net_device *)seq->private;