diff options
author | Sven Eckelmann <sven@narfation.org> | 2017-12-02 19:51:53 +0100 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2017-12-15 17:29:24 +0100 |
commit | ff15c27c97303fbe5abc49c25c73ea299ab72d31 (patch) | |
tree | ec78240c800bdf7a1ef3322175c5648a9ffa6d41 /net/batman-adv/bat_algo.c | |
parent | batman-adv: Add kernel-doc to functions in headers (diff) | |
download | linux-ff15c27c97303fbe5abc49c25c73ea299ab72d31.tar.xz linux-ff15c27c97303fbe5abc49c25c73ea299ab72d31.zip |
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/bat_algo.c')
-rw-r--r-- | net/batman-adv/bat_algo.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net/batman-adv/bat_algo.c b/net/batman-adv/bat_algo.c index aed7ced059df..80c72c7d3cad 100644 --- a/net/batman-adv/bat_algo.c +++ b/net/batman-adv/bat_algo.c @@ -61,6 +61,12 @@ static struct batadv_algo_ops *batadv_algo_get(char *name) return bat_algo_ops; } +/** + * batadv_algo_register() - Register callbacks for a mesh algorithm + * @bat_algo_ops: mesh algorithm callbacks to add + * + * Return: 0 on success or negative error number in case of failure + */ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops) { struct batadv_algo_ops *bat_algo_ops_tmp; @@ -90,6 +96,19 @@ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops) return 0; } +/** + * batadv_algo_select() - Select algorithm of soft interface + * @bat_priv: the bat priv with all the soft interface information + * @name: name of the algorithm to select + * + * The algorithm callbacks for the soft interface will be set when the algorithm + * with the correct name was found. Any previous selected algorithm will not be + * deinitialized and the new selected algorithm will also not be initialized. + * It is therefore not allowed to call batadv_algo_select outside the creation + * function of the soft interface. + * + * Return: 0 on success or negative error number in case of failure + */ int batadv_algo_select(struct batadv_priv *bat_priv, char *name) { struct batadv_algo_ops *bat_algo_ops; @@ -104,6 +123,14 @@ int batadv_algo_select(struct batadv_priv *bat_priv, char *name) } #ifdef CONFIG_BATMAN_ADV_DEBUGFS + +/** + * batadv_algo_seq_print_text() - Print the supported algorithms in a seq file + * @seq: seq file to print on + * @offset: not used + * + * Return: always 0 + */ int batadv_algo_seq_print_text(struct seq_file *seq, void *offset) { struct batadv_algo_ops *bat_algo_ops; |