diff options
author | Sven Eckelmann <sven@narfation.org> | 2017-12-02 13:51:47 -0500 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2017-12-15 11:29:20 -0500 |
commit | 7e9a8c2ce7c5f8745c003e2ba4758c21c38a0419 (patch) | |
tree | a32a07bc993013e2a88a75322ae4bb89e93a3049 /net/batman-adv/network-coding.c | |
parent | 6a3038f07c59152fb640a3cd274afdf909640e4b (diff) |
batman-adv: Use parentheses in function kernel-doc
The documentation describing kernel-doc comments for functions ("How to
format kernel-doc comments") uses parentheses at the end of the function
name. Using this format allows to use a consistent style when adding
documentation to a function and when referencing this function in a
different kernel-doc section.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/network-coding.c')
-rw-r--r-- | net/batman-adv/network-coding.c | 120 |
1 files changed, 61 insertions, 59 deletions
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c index bd421408d9e7..3758be7fd881 100644 --- a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c | |||
@@ -67,7 +67,7 @@ static int batadv_nc_recv_coded_packet(struct sk_buff *skb, | |||
67 | struct batadv_hard_iface *recv_if); | 67 | struct batadv_hard_iface *recv_if); |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * batadv_nc_init - one-time initialization for network coding | 70 | * batadv_nc_init() - one-time initialization for network coding |
71 | * | 71 | * |
72 | * Return: 0 on success or negative error number in case of failure | 72 | * Return: 0 on success or negative error number in case of failure |
73 | */ | 73 | */ |
@@ -83,7 +83,7 @@ int __init batadv_nc_init(void) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * batadv_nc_start_timer - initialise the nc periodic worker | 86 | * batadv_nc_start_timer() - initialise the nc periodic worker |
87 | * @bat_priv: the bat priv with all the soft interface information | 87 | * @bat_priv: the bat priv with all the soft interface information |
88 | */ | 88 | */ |
89 | static void batadv_nc_start_timer(struct batadv_priv *bat_priv) | 89 | static void batadv_nc_start_timer(struct batadv_priv *bat_priv) |
@@ -93,7 +93,7 @@ static void batadv_nc_start_timer(struct batadv_priv *bat_priv) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * batadv_nc_tvlv_container_update - update the network coding tvlv container | 96 | * batadv_nc_tvlv_container_update() - update the network coding tvlv container |
97 | * after network coding setting change | 97 | * after network coding setting change |
98 | * @bat_priv: the bat priv with all the soft interface information | 98 | * @bat_priv: the bat priv with all the soft interface information |
99 | */ | 99 | */ |
@@ -115,7 +115,7 @@ static void batadv_nc_tvlv_container_update(struct batadv_priv *bat_priv) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * batadv_nc_status_update - update the network coding tvlv container after | 118 | * batadv_nc_status_update() - update the network coding tvlv container after |
119 | * network coding setting change | 119 | * network coding setting change |
120 | * @net_dev: the soft interface net device | 120 | * @net_dev: the soft interface net device |
121 | */ | 121 | */ |
@@ -127,7 +127,7 @@ void batadv_nc_status_update(struct net_device *net_dev) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * batadv_nc_tvlv_ogm_handler_v1 - process incoming nc tvlv container | 130 | * batadv_nc_tvlv_ogm_handler_v1() - process incoming nc tvlv container |
131 | * @bat_priv: the bat priv with all the soft interface information | 131 | * @bat_priv: the bat priv with all the soft interface information |
132 | * @orig: the orig_node of the ogm | 132 | * @orig: the orig_node of the ogm |
133 | * @flags: flags indicating the tvlv state (see batadv_tvlv_handler_flags) | 133 | * @flags: flags indicating the tvlv state (see batadv_tvlv_handler_flags) |
@@ -146,7 +146,7 @@ static void batadv_nc_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, | |||
146 | } | 146 | } |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * batadv_nc_mesh_init - initialise coding hash table and start house keeping | 149 | * batadv_nc_mesh_init() - initialise coding hash table and start house keeping |
150 | * @bat_priv: the bat priv with all the soft interface information | 150 | * @bat_priv: the bat priv with all the soft interface information |
151 | * | 151 | * |
152 | * Return: 0 on success or negative error number in case of failure | 152 | * Return: 0 on success or negative error number in case of failure |
@@ -187,7 +187,7 @@ err: | |||
187 | } | 187 | } |
188 | 188 | ||
189 | /** | 189 | /** |
190 | * batadv_nc_init_bat_priv - initialise the nc specific bat_priv variables | 190 | * batadv_nc_init_bat_priv() - initialise the nc specific bat_priv variables |
191 | * @bat_priv: the bat priv with all the soft interface information | 191 | * @bat_priv: the bat priv with all the soft interface information |
192 | */ | 192 | */ |
193 | void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv) | 193 | void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv) |
@@ -199,7 +199,7 @@ void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv) | |||
199 | } | 199 | } |
200 | 200 | ||
201 | /** | 201 | /** |
202 | * batadv_nc_init_orig - initialise the nc fields of an orig_node | 202 | * batadv_nc_init_orig() - initialise the nc fields of an orig_node |
203 | * @orig_node: the orig_node which is going to be initialised | 203 | * @orig_node: the orig_node which is going to be initialised |
204 | */ | 204 | */ |
205 | void batadv_nc_init_orig(struct batadv_orig_node *orig_node) | 205 | void batadv_nc_init_orig(struct batadv_orig_node *orig_node) |
@@ -211,8 +211,8 @@ void batadv_nc_init_orig(struct batadv_orig_node *orig_node) | |||
211 | } | 211 | } |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * batadv_nc_node_release - release nc_node from lists and queue for free after | 214 | * batadv_nc_node_release() - release nc_node from lists and queue for free |
215 | * rcu grace period | 215 | * after rcu grace period |
216 | * @ref: kref pointer of the nc_node | 216 | * @ref: kref pointer of the nc_node |
217 | */ | 217 | */ |
218 | static void batadv_nc_node_release(struct kref *ref) | 218 | static void batadv_nc_node_release(struct kref *ref) |
@@ -226,7 +226,7 @@ static void batadv_nc_node_release(struct kref *ref) | |||
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * batadv_nc_node_put - decrement the nc_node refcounter and possibly | 229 | * batadv_nc_node_put() - decrement the nc_node refcounter and possibly |
230 | * release it | 230 | * release it |
231 | * @nc_node: nc_node to be free'd | 231 | * @nc_node: nc_node to be free'd |
232 | */ | 232 | */ |
@@ -236,8 +236,8 @@ static void batadv_nc_node_put(struct batadv_nc_node *nc_node) | |||
236 | } | 236 | } |
237 | 237 | ||
238 | /** | 238 | /** |
239 | * batadv_nc_path_release - release nc_path from lists and queue for free after | 239 | * batadv_nc_path_release() - release nc_path from lists and queue for free |
240 | * rcu grace period | 240 | * after rcu grace period |
241 | * @ref: kref pointer of the nc_path | 241 | * @ref: kref pointer of the nc_path |
242 | */ | 242 | */ |
243 | static void batadv_nc_path_release(struct kref *ref) | 243 | static void batadv_nc_path_release(struct kref *ref) |
@@ -250,7 +250,7 @@ static void batadv_nc_path_release(struct kref *ref) | |||
250 | } | 250 | } |
251 | 251 | ||
252 | /** | 252 | /** |
253 | * batadv_nc_path_put - decrement the nc_path refcounter and possibly | 253 | * batadv_nc_path_put() - decrement the nc_path refcounter and possibly |
254 | * release it | 254 | * release it |
255 | * @nc_path: nc_path to be free'd | 255 | * @nc_path: nc_path to be free'd |
256 | */ | 256 | */ |
@@ -260,7 +260,7 @@ static void batadv_nc_path_put(struct batadv_nc_path *nc_path) | |||
260 | } | 260 | } |
261 | 261 | ||
262 | /** | 262 | /** |
263 | * batadv_nc_packet_free - frees nc packet | 263 | * batadv_nc_packet_free() - frees nc packet |
264 | * @nc_packet: the nc packet to free | 264 | * @nc_packet: the nc packet to free |
265 | * @dropped: whether the packet is freed because is is dropped | 265 | * @dropped: whether the packet is freed because is is dropped |
266 | */ | 266 | */ |
@@ -277,7 +277,7 @@ static void batadv_nc_packet_free(struct batadv_nc_packet *nc_packet, | |||
277 | } | 277 | } |
278 | 278 | ||
279 | /** | 279 | /** |
280 | * batadv_nc_to_purge_nc_node - checks whether an nc node has to be purged | 280 | * batadv_nc_to_purge_nc_node() - checks whether an nc node has to be purged |
281 | * @bat_priv: the bat priv with all the soft interface information | 281 | * @bat_priv: the bat priv with all the soft interface information |
282 | * @nc_node: the nc node to check | 282 | * @nc_node: the nc node to check |
283 | * | 283 | * |
@@ -293,7 +293,7 @@ static bool batadv_nc_to_purge_nc_node(struct batadv_priv *bat_priv, | |||
293 | } | 293 | } |
294 | 294 | ||
295 | /** | 295 | /** |
296 | * batadv_nc_to_purge_nc_path_coding - checks whether an nc path has timed out | 296 | * batadv_nc_to_purge_nc_path_coding() - checks whether an nc path has timed out |
297 | * @bat_priv: the bat priv with all the soft interface information | 297 | * @bat_priv: the bat priv with all the soft interface information |
298 | * @nc_path: the nc path to check | 298 | * @nc_path: the nc path to check |
299 | * | 299 | * |
@@ -313,7 +313,8 @@ static bool batadv_nc_to_purge_nc_path_coding(struct batadv_priv *bat_priv, | |||
313 | } | 313 | } |
314 | 314 | ||
315 | /** | 315 | /** |
316 | * batadv_nc_to_purge_nc_path_decoding - checks whether an nc path has timed out | 316 | * batadv_nc_to_purge_nc_path_decoding() - checks whether an nc path has timed |
317 | * out | ||
317 | * @bat_priv: the bat priv with all the soft interface information | 318 | * @bat_priv: the bat priv with all the soft interface information |
318 | * @nc_path: the nc path to check | 319 | * @nc_path: the nc path to check |
319 | * | 320 | * |
@@ -333,7 +334,7 @@ static bool batadv_nc_to_purge_nc_path_decoding(struct batadv_priv *bat_priv, | |||
333 | } | 334 | } |
334 | 335 | ||
335 | /** | 336 | /** |
336 | * batadv_nc_purge_orig_nc_nodes - go through list of nc nodes and purge stale | 337 | * batadv_nc_purge_orig_nc_nodes() - go through list of nc nodes and purge stale |
337 | * entries | 338 | * entries |
338 | * @bat_priv: the bat priv with all the soft interface information | 339 | * @bat_priv: the bat priv with all the soft interface information |
339 | * @list: list of nc nodes | 340 | * @list: list of nc nodes |
@@ -371,7 +372,7 @@ batadv_nc_purge_orig_nc_nodes(struct batadv_priv *bat_priv, | |||
371 | } | 372 | } |
372 | 373 | ||
373 | /** | 374 | /** |
374 | * batadv_nc_purge_orig - purges all nc node data attached of the given | 375 | * batadv_nc_purge_orig() - purges all nc node data attached of the given |
375 | * originator | 376 | * originator |
376 | * @bat_priv: the bat priv with all the soft interface information | 377 | * @bat_priv: the bat priv with all the soft interface information |
377 | * @orig_node: orig_node with the nc node entries to be purged | 378 | * @orig_node: orig_node with the nc node entries to be purged |
@@ -397,8 +398,8 @@ void batadv_nc_purge_orig(struct batadv_priv *bat_priv, | |||
397 | } | 398 | } |
398 | 399 | ||
399 | /** | 400 | /** |
400 | * batadv_nc_purge_orig_hash - traverse entire originator hash to check if they | 401 | * batadv_nc_purge_orig_hash() - traverse entire originator hash to check if |
401 | * have timed out nc nodes | 402 | * they have timed out nc nodes |
402 | * @bat_priv: the bat priv with all the soft interface information | 403 | * @bat_priv: the bat priv with all the soft interface information |
403 | */ | 404 | */ |
404 | static void batadv_nc_purge_orig_hash(struct batadv_priv *bat_priv) | 405 | static void batadv_nc_purge_orig_hash(struct batadv_priv *bat_priv) |
@@ -424,7 +425,7 @@ static void batadv_nc_purge_orig_hash(struct batadv_priv *bat_priv) | |||
424 | } | 425 | } |
425 | 426 | ||
426 | /** | 427 | /** |
427 | * batadv_nc_purge_paths - traverse all nc paths part of the hash and remove | 428 | * batadv_nc_purge_paths() - traverse all nc paths part of the hash and remove |
428 | * unused ones | 429 | * unused ones |
429 | * @bat_priv: the bat priv with all the soft interface information | 430 | * @bat_priv: the bat priv with all the soft interface information |
430 | * @hash: hash table containing the nc paths to check | 431 | * @hash: hash table containing the nc paths to check |
@@ -483,7 +484,7 @@ static void batadv_nc_purge_paths(struct batadv_priv *bat_priv, | |||
483 | } | 484 | } |
484 | 485 | ||
485 | /** | 486 | /** |
486 | * batadv_nc_hash_key_gen - computes the nc_path hash key | 487 | * batadv_nc_hash_key_gen() - computes the nc_path hash key |
487 | * @key: buffer to hold the final hash key | 488 | * @key: buffer to hold the final hash key |
488 | * @src: source ethernet mac address going into the hash key | 489 | * @src: source ethernet mac address going into the hash key |
489 | * @dst: destination ethernet mac address going into the hash key | 490 | * @dst: destination ethernet mac address going into the hash key |
@@ -496,7 +497,7 @@ static void batadv_nc_hash_key_gen(struct batadv_nc_path *key, const char *src, | |||
496 | } | 497 | } |
497 | 498 | ||
498 | /** | 499 | /** |
499 | * batadv_nc_hash_choose - compute the hash value for an nc path | 500 | * batadv_nc_hash_choose() - compute the hash value for an nc path |
500 | * @data: data to hash | 501 | * @data: data to hash |
501 | * @size: size of the hash table | 502 | * @size: size of the hash table |
502 | * | 503 | * |
@@ -514,7 +515,7 @@ static u32 batadv_nc_hash_choose(const void *data, u32 size) | |||
514 | } | 515 | } |
515 | 516 | ||
516 | /** | 517 | /** |
517 | * batadv_nc_hash_compare - comparing function used in the network coding hash | 518 | * batadv_nc_hash_compare() - comparing function used in the network coding hash |
518 | * tables | 519 | * tables |
519 | * @node: node in the local table | 520 | * @node: node in the local table |
520 | * @data2: second object to compare the node to | 521 | * @data2: second object to compare the node to |
@@ -540,7 +541,7 @@ static bool batadv_nc_hash_compare(const struct hlist_node *node, | |||
540 | } | 541 | } |
541 | 542 | ||
542 | /** | 543 | /** |
543 | * batadv_nc_hash_find - search for an existing nc path and return it | 544 | * batadv_nc_hash_find() - search for an existing nc path and return it |
544 | * @hash: hash table containing the nc path | 545 | * @hash: hash table containing the nc path |
545 | * @data: search key | 546 | * @data: search key |
546 | * | 547 | * |
@@ -577,7 +578,7 @@ batadv_nc_hash_find(struct batadv_hashtable *hash, | |||
577 | } | 578 | } |
578 | 579 | ||
579 | /** | 580 | /** |
580 | * batadv_nc_send_packet - send non-coded packet and free nc_packet struct | 581 | * batadv_nc_send_packet() - send non-coded packet and free nc_packet struct |
581 | * @nc_packet: the nc packet to send | 582 | * @nc_packet: the nc packet to send |
582 | */ | 583 | */ |
583 | static void batadv_nc_send_packet(struct batadv_nc_packet *nc_packet) | 584 | static void batadv_nc_send_packet(struct batadv_nc_packet *nc_packet) |
@@ -588,7 +589,7 @@ static void batadv_nc_send_packet(struct batadv_nc_packet *nc_packet) | |||
588 | } | 589 | } |
589 | 590 | ||
590 | /** | 591 | /** |
591 | * batadv_nc_sniffed_purge - Checks timestamp of given sniffed nc_packet. | 592 | * batadv_nc_sniffed_purge() - Checks timestamp of given sniffed nc_packet. |
592 | * @bat_priv: the bat priv with all the soft interface information | 593 | * @bat_priv: the bat priv with all the soft interface information |
593 | * @nc_path: the nc path the packet belongs to | 594 | * @nc_path: the nc path the packet belongs to |
594 | * @nc_packet: the nc packet to be checked | 595 | * @nc_packet: the nc packet to be checked |
@@ -627,7 +628,7 @@ out: | |||
627 | } | 628 | } |
628 | 629 | ||
629 | /** | 630 | /** |
630 | * batadv_nc_fwd_flush - Checks the timestamp of the given nc packet. | 631 | * batadv_nc_fwd_flush() - Checks the timestamp of the given nc packet. |
631 | * @bat_priv: the bat priv with all the soft interface information | 632 | * @bat_priv: the bat priv with all the soft interface information |
632 | * @nc_path: the nc path the packet belongs to | 633 | * @nc_path: the nc path the packet belongs to |
633 | * @nc_packet: the nc packet to be checked | 634 | * @nc_packet: the nc packet to be checked |
@@ -665,8 +666,8 @@ static bool batadv_nc_fwd_flush(struct batadv_priv *bat_priv, | |||
665 | } | 666 | } |
666 | 667 | ||
667 | /** | 668 | /** |
668 | * batadv_nc_process_nc_paths - traverse given nc packet pool and free timed out | 669 | * batadv_nc_process_nc_paths() - traverse given nc packet pool and free timed |
669 | * nc packets | 670 | * out nc packets |
670 | * @bat_priv: the bat priv with all the soft interface information | 671 | * @bat_priv: the bat priv with all the soft interface information |
671 | * @hash: to be processed hash table | 672 | * @hash: to be processed hash table |
672 | * @process_fn: Function called to process given nc packet. Should return true | 673 | * @process_fn: Function called to process given nc packet. Should return true |
@@ -711,7 +712,8 @@ batadv_nc_process_nc_paths(struct batadv_priv *bat_priv, | |||
711 | } | 712 | } |
712 | 713 | ||
713 | /** | 714 | /** |
714 | * batadv_nc_worker - periodic task for house keeping related to network coding | 715 | * batadv_nc_worker() - periodic task for house keeping related to network |
716 | * coding | ||
715 | * @work: kernel work struct | 717 | * @work: kernel work struct |
716 | */ | 718 | */ |
717 | static void batadv_nc_worker(struct work_struct *work) | 719 | static void batadv_nc_worker(struct work_struct *work) |
@@ -751,8 +753,8 @@ static void batadv_nc_worker(struct work_struct *work) | |||
751 | } | 753 | } |
752 | 754 | ||
753 | /** | 755 | /** |
754 | * batadv_can_nc_with_orig - checks whether the given orig node is suitable for | 756 | * batadv_can_nc_with_orig() - checks whether the given orig node is suitable |
755 | * coding or not | 757 | * for coding or not |
756 | * @bat_priv: the bat priv with all the soft interface information | 758 | * @bat_priv: the bat priv with all the soft interface information |
757 | * @orig_node: neighboring orig node which may be used as nc candidate | 759 | * @orig_node: neighboring orig node which may be used as nc candidate |
758 | * @ogm_packet: incoming ogm packet also used for the checks | 760 | * @ogm_packet: incoming ogm packet also used for the checks |
@@ -792,7 +794,7 @@ static bool batadv_can_nc_with_orig(struct batadv_priv *bat_priv, | |||
792 | } | 794 | } |
793 | 795 | ||
794 | /** | 796 | /** |
795 | * batadv_nc_find_nc_node - search for an existing nc node and return it | 797 | * batadv_nc_find_nc_node() - search for an existing nc node and return it |
796 | * @orig_node: orig node originating the ogm packet | 798 | * @orig_node: orig node originating the ogm packet |
797 | * @orig_neigh_node: neighboring orig node from which we received the ogm packet | 799 | * @orig_neigh_node: neighboring orig node from which we received the ogm packet |
798 | * (can be equal to orig_node) | 800 | * (can be equal to orig_node) |
@@ -832,7 +834,7 @@ batadv_nc_find_nc_node(struct batadv_orig_node *orig_node, | |||
832 | } | 834 | } |
833 | 835 | ||
834 | /** | 836 | /** |
835 | * batadv_nc_get_nc_node - retrieves an nc node or creates the entry if it was | 837 | * batadv_nc_get_nc_node() - retrieves an nc node or creates the entry if it was |
836 | * not found | 838 | * not found |
837 | * @bat_priv: the bat priv with all the soft interface information | 839 | * @bat_priv: the bat priv with all the soft interface information |
838 | * @orig_node: orig node originating the ogm packet | 840 | * @orig_node: orig node originating the ogm packet |
@@ -892,7 +894,7 @@ batadv_nc_get_nc_node(struct batadv_priv *bat_priv, | |||
892 | } | 894 | } |
893 | 895 | ||
894 | /** | 896 | /** |
895 | * batadv_nc_update_nc_node - updates stored incoming and outgoing nc node | 897 | * batadv_nc_update_nc_node() - updates stored incoming and outgoing nc node |
896 | * structs (best called on incoming OGMs) | 898 | * structs (best called on incoming OGMs) |
897 | * @bat_priv: the bat priv with all the soft interface information | 899 | * @bat_priv: the bat priv with all the soft interface information |
898 | * @orig_node: orig node originating the ogm packet | 900 | * @orig_node: orig node originating the ogm packet |
@@ -947,7 +949,7 @@ out: | |||
947 | } | 949 | } |
948 | 950 | ||
949 | /** | 951 | /** |
950 | * batadv_nc_get_path - get existing nc_path or allocate a new one | 952 | * batadv_nc_get_path() - get existing nc_path or allocate a new one |
951 | * @bat_priv: the bat priv with all the soft interface information | 953 | * @bat_priv: the bat priv with all the soft interface information |
952 | * @hash: hash table containing the nc path | 954 | * @hash: hash table containing the nc path |
953 | * @src: ethernet source address - first half of the nc path search key | 955 | * @src: ethernet source address - first half of the nc path search key |
@@ -1008,7 +1010,7 @@ static struct batadv_nc_path *batadv_nc_get_path(struct batadv_priv *bat_priv, | |||
1008 | } | 1010 | } |
1009 | 1011 | ||
1010 | /** | 1012 | /** |
1011 | * batadv_nc_random_weight_tq - scale the receivers TQ-value to avoid unfair | 1013 | * batadv_nc_random_weight_tq() - scale the receivers TQ-value to avoid unfair |
1012 | * selection of a receiver with slightly lower TQ than the other | 1014 | * selection of a receiver with slightly lower TQ than the other |
1013 | * @tq: to be weighted tq value | 1015 | * @tq: to be weighted tq value |
1014 | * | 1016 | * |
@@ -1031,7 +1033,7 @@ static u8 batadv_nc_random_weight_tq(u8 tq) | |||
1031 | } | 1033 | } |
1032 | 1034 | ||
1033 | /** | 1035 | /** |
1034 | * batadv_nc_memxor - XOR destination with source | 1036 | * batadv_nc_memxor() - XOR destination with source |
1035 | * @dst: byte array to XOR into | 1037 | * @dst: byte array to XOR into |
1036 | * @src: byte array to XOR from | 1038 | * @src: byte array to XOR from |
1037 | * @len: length of destination array | 1039 | * @len: length of destination array |
@@ -1045,7 +1047,7 @@ static void batadv_nc_memxor(char *dst, const char *src, unsigned int len) | |||
1045 | } | 1047 | } |
1046 | 1048 | ||
1047 | /** | 1049 | /** |
1048 | * batadv_nc_code_packets - code a received unicast_packet with an nc packet | 1050 | * batadv_nc_code_packets() - code a received unicast_packet with an nc packet |
1049 | * into a coded_packet and send it | 1051 | * into a coded_packet and send it |
1050 | * @bat_priv: the bat priv with all the soft interface information | 1052 | * @bat_priv: the bat priv with all the soft interface information |
1051 | * @skb: data skb to forward | 1053 | * @skb: data skb to forward |
@@ -1238,7 +1240,7 @@ out: | |||
1238 | } | 1240 | } |
1239 | 1241 | ||
1240 | /** | 1242 | /** |
1241 | * batadv_nc_skb_coding_possible - true if a decoded skb is available at dst. | 1243 | * batadv_nc_skb_coding_possible() - true if a decoded skb is available at dst. |
1242 | * @skb: data skb to forward | 1244 | * @skb: data skb to forward |
1243 | * @dst: destination mac address of the other skb to code with | 1245 | * @dst: destination mac address of the other skb to code with |
1244 | * @src: source mac address of skb | 1246 | * @src: source mac address of skb |
@@ -1262,7 +1264,7 @@ static bool batadv_nc_skb_coding_possible(struct sk_buff *skb, u8 *dst, u8 *src) | |||
1262 | } | 1264 | } |
1263 | 1265 | ||
1264 | /** | 1266 | /** |
1265 | * batadv_nc_path_search - Find the coding path matching in_nc_node and | 1267 | * batadv_nc_path_search() - Find the coding path matching in_nc_node and |
1266 | * out_nc_node to retrieve a buffered packet that can be used for coding. | 1268 | * out_nc_node to retrieve a buffered packet that can be used for coding. |
1267 | * @bat_priv: the bat priv with all the soft interface information | 1269 | * @bat_priv: the bat priv with all the soft interface information |
1268 | * @in_nc_node: pointer to skb next hop's neighbor nc node | 1270 | * @in_nc_node: pointer to skb next hop's neighbor nc node |
@@ -1330,8 +1332,8 @@ batadv_nc_path_search(struct batadv_priv *bat_priv, | |||
1330 | } | 1332 | } |
1331 | 1333 | ||
1332 | /** | 1334 | /** |
1333 | * batadv_nc_skb_src_search - Loops through the list of neighoring nodes of the | 1335 | * batadv_nc_skb_src_search() - Loops through the list of neighoring nodes of |
1334 | * skb's sender (may be equal to the originator). | 1336 | * the skb's sender (may be equal to the originator). |
1335 | * @bat_priv: the bat priv with all the soft interface information | 1337 | * @bat_priv: the bat priv with all the soft interface information |
1336 | * @skb: data skb to forward | 1338 | * @skb: data skb to forward |
1337 | * @eth_dst: next hop mac address of skb | 1339 | * @eth_dst: next hop mac address of skb |
@@ -1376,7 +1378,7 @@ batadv_nc_skb_src_search(struct batadv_priv *bat_priv, | |||
1376 | } | 1378 | } |
1377 | 1379 | ||
1378 | /** | 1380 | /** |
1379 | * batadv_nc_skb_store_before_coding - set the ethernet src and dst of the | 1381 | * batadv_nc_skb_store_before_coding() - set the ethernet src and dst of the |
1380 | * unicast skb before it is stored for use in later decoding | 1382 | * unicast skb before it is stored for use in later decoding |
1381 | * @bat_priv: the bat priv with all the soft interface information | 1383 | * @bat_priv: the bat priv with all the soft interface information |
1382 | * @skb: data skb to store | 1384 | * @skb: data skb to store |
@@ -1411,7 +1413,7 @@ static void batadv_nc_skb_store_before_coding(struct batadv_priv *bat_priv, | |||
1411 | } | 1413 | } |
1412 | 1414 | ||
1413 | /** | 1415 | /** |
1414 | * batadv_nc_skb_dst_search - Loops through list of neighboring nodes to dst. | 1416 | * batadv_nc_skb_dst_search() - Loops through list of neighboring nodes to dst. |
1415 | * @skb: data skb to forward | 1417 | * @skb: data skb to forward |
1416 | * @neigh_node: next hop to forward packet to | 1418 | * @neigh_node: next hop to forward packet to |
1417 | * @ethhdr: pointer to the ethernet header inside the skb | 1419 | * @ethhdr: pointer to the ethernet header inside the skb |
@@ -1469,7 +1471,7 @@ static bool batadv_nc_skb_dst_search(struct sk_buff *skb, | |||
1469 | } | 1471 | } |
1470 | 1472 | ||
1471 | /** | 1473 | /** |
1472 | * batadv_nc_skb_add_to_path - buffer skb for later encoding / decoding | 1474 | * batadv_nc_skb_add_to_path() - buffer skb for later encoding / decoding |
1473 | * @skb: skb to add to path | 1475 | * @skb: skb to add to path |
1474 | * @nc_path: path to add skb to | 1476 | * @nc_path: path to add skb to |
1475 | * @neigh_node: next hop to forward packet to | 1477 | * @neigh_node: next hop to forward packet to |
@@ -1504,7 +1506,7 @@ static bool batadv_nc_skb_add_to_path(struct sk_buff *skb, | |||
1504 | } | 1506 | } |
1505 | 1507 | ||
1506 | /** | 1508 | /** |
1507 | * batadv_nc_skb_forward - try to code a packet or add it to the coding packet | 1509 | * batadv_nc_skb_forward() - try to code a packet or add it to the coding packet |
1508 | * buffer | 1510 | * buffer |
1509 | * @skb: data skb to forward | 1511 | * @skb: data skb to forward |
1510 | * @neigh_node: next hop to forward packet to | 1512 | * @neigh_node: next hop to forward packet to |
@@ -1561,8 +1563,8 @@ out: | |||
1561 | } | 1563 | } |
1562 | 1564 | ||
1563 | /** | 1565 | /** |
1564 | * batadv_nc_skb_store_for_decoding - save a clone of the skb which can be used | 1566 | * batadv_nc_skb_store_for_decoding() - save a clone of the skb which can be |
1565 | * when decoding coded packets | 1567 | * used when decoding coded packets |
1566 | * @bat_priv: the bat priv with all the soft interface information | 1568 | * @bat_priv: the bat priv with all the soft interface information |
1567 | * @skb: data skb to store | 1569 | * @skb: data skb to store |
1568 | */ | 1570 | */ |
@@ -1622,7 +1624,7 @@ out: | |||
1622 | } | 1624 | } |
1623 | 1625 | ||
1624 | /** | 1626 | /** |
1625 | * batadv_nc_skb_store_sniffed_unicast - check if a received unicast packet | 1627 | * batadv_nc_skb_store_sniffed_unicast() - check if a received unicast packet |
1626 | * should be saved in the decoding buffer and, if so, store it there | 1628 | * should be saved in the decoding buffer and, if so, store it there |
1627 | * @bat_priv: the bat priv with all the soft interface information | 1629 | * @bat_priv: the bat priv with all the soft interface information |
1628 | * @skb: unicast skb to store | 1630 | * @skb: unicast skb to store |
@@ -1642,7 +1644,7 @@ void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv, | |||
1642 | } | 1644 | } |
1643 | 1645 | ||
1644 | /** | 1646 | /** |
1645 | * batadv_nc_skb_decode_packet - decode given skb using the decode data stored | 1647 | * batadv_nc_skb_decode_packet() - decode given skb using the decode data stored |
1646 | * in nc_packet | 1648 | * in nc_packet |
1647 | * @bat_priv: the bat priv with all the soft interface information | 1649 | * @bat_priv: the bat priv with all the soft interface information |
1648 | * @skb: unicast skb to decode | 1650 | * @skb: unicast skb to decode |
@@ -1736,7 +1738,7 @@ batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb, | |||
1736 | } | 1738 | } |
1737 | 1739 | ||
1738 | /** | 1740 | /** |
1739 | * batadv_nc_find_decoding_packet - search through buffered decoding data to | 1741 | * batadv_nc_find_decoding_packet() - search through buffered decoding data to |
1740 | * find the data needed to decode the coded packet | 1742 | * find the data needed to decode the coded packet |
1741 | * @bat_priv: the bat priv with all the soft interface information | 1743 | * @bat_priv: the bat priv with all the soft interface information |
1742 | * @ethhdr: pointer to the ethernet header inside the coded packet | 1744 | * @ethhdr: pointer to the ethernet header inside the coded packet |
@@ -1801,7 +1803,7 @@ batadv_nc_find_decoding_packet(struct batadv_priv *bat_priv, | |||
1801 | } | 1803 | } |
1802 | 1804 | ||
1803 | /** | 1805 | /** |
1804 | * batadv_nc_recv_coded_packet - try to decode coded packet and enqueue the | 1806 | * batadv_nc_recv_coded_packet() - try to decode coded packet and enqueue the |
1805 | * resulting unicast packet | 1807 | * resulting unicast packet |
1806 | * @skb: incoming coded packet | 1808 | * @skb: incoming coded packet |
1807 | * @recv_if: pointer to interface this packet was received on | 1809 | * @recv_if: pointer to interface this packet was received on |
@@ -1876,7 +1878,7 @@ free_skb: | |||
1876 | } | 1878 | } |
1877 | 1879 | ||
1878 | /** | 1880 | /** |
1879 | * batadv_nc_mesh_free - clean up network coding memory | 1881 | * batadv_nc_mesh_free() - clean up network coding memory |
1880 | * @bat_priv: the bat priv with all the soft interface information | 1882 | * @bat_priv: the bat priv with all the soft interface information |
1881 | */ | 1883 | */ |
1882 | void batadv_nc_mesh_free(struct batadv_priv *bat_priv) | 1884 | void batadv_nc_mesh_free(struct batadv_priv *bat_priv) |
@@ -1893,7 +1895,7 @@ void batadv_nc_mesh_free(struct batadv_priv *bat_priv) | |||
1893 | 1895 | ||
1894 | #ifdef CONFIG_BATMAN_ADV_DEBUGFS | 1896 | #ifdef CONFIG_BATMAN_ADV_DEBUGFS |
1895 | /** | 1897 | /** |
1896 | * batadv_nc_nodes_seq_print_text - print the nc node information | 1898 | * batadv_nc_nodes_seq_print_text() - print the nc node information |
1897 | * @seq: seq file to print on | 1899 | * @seq: seq file to print on |
1898 | * @offset: not used | 1900 | * @offset: not used |
1899 | * | 1901 | * |
@@ -1956,7 +1958,7 @@ out: | |||
1956 | } | 1958 | } |
1957 | 1959 | ||
1958 | /** | 1960 | /** |
1959 | * batadv_nc_init_debugfs - create nc folder and related files in debugfs | 1961 | * batadv_nc_init_debugfs() - create nc folder and related files in debugfs |
1960 | * @bat_priv: the bat priv with all the soft interface information | 1962 | * @bat_priv: the bat priv with all the soft interface information |
1961 | * | 1963 | * |
1962 | * Return: 0 on success or negative error number in case of failure | 1964 | * Return: 0 on success or negative error number in case of failure |