Skip to content

Commit 7afcbbe

Browse files
ecsvordex
authored andcommitted
batman-adv: Fix kerneldoc of main functions
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
1 parent 62fe710 commit 7afcbbe

11 files changed

Lines changed: 48 additions & 12 deletions

File tree

‎net/batman-adv/bitarray.c‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n)
2929
bitmap_shift_left(seq_bits, seq_bits, n, BATADV_TQ_LOCAL_WINDOW_SIZE);
3030
}
3131

32-
/* receive and process one packet within the sequence number window.
32+
/**
33+
* batadv_bit_get_packet - receive and process one packet within the sequence
34+
* number window
35+
* @priv: the bat priv with all the soft interface information
36+
* @seq_bits: pointer to the sequence number receive packet
37+
* @seq_num_diff: difference between the current/received sequence number and
38+
* the last sequence number
39+
* @set_mark: whether this packet should be marked in seq_bits
3340
*
34-
* Return:
35-
* 1 if the window was moved (either new or very old)
41+
* Return: 1 if the window was moved (either new or very old),
3642
* 0 if the window was not moved/shifted.
3743
*/
3844
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits, s32 seq_num_diff,

‎net/batman-adv/bitarray.h‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
#include <linux/types.h>
2626

2727
/**
28-
* batadv_test_bit
28+
* batadv_test_bit - check if bit is set in the current window
29+
*
30+
* @seq_bits: pointer to the sequence number receive packet
31+
* @last_seqno: latest sequence number in seq_bits
32+
* @curr_seqno: sequence number to test for
2933
*
3034
* Return: 1 if the corresponding bit in the given seq_bits indicates true
3135
* and curr_seqno is within range of last_seqno. Otherwise returns 0.
@@ -51,11 +55,6 @@ static inline void batadv_set_bit(unsigned long *seq_bits, s32 n)
5155
set_bit(n, seq_bits); /* turn the position on */
5256
}
5357

54-
/**
55-
* batadv_bit_get_packet - receive and process one packet
56-
*
57-
* Return: 1 if received seq_num is considered new, 0 if old
58-
*/
5958
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits, s32 seq_num_diff,
6059
int set_mark);
6160

‎net/batman-adv/debugfs.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ static int batadv_originators_open(struct inode *inode, struct file *file)
281281
* originator table of an hard interface
282282
* @inode: inode pointer to debugfs file
283283
* @file: pointer to the seq_file
284+
*
285+
* Return: 0 on success or negative error number in case of failure
284286
*/
285287
static int batadv_originators_hardif_open(struct inode *inode,
286288
struct file *file)
@@ -329,6 +331,8 @@ static int batadv_bla_backbone_table_open(struct inode *inode,
329331
* batadv_dat_cache_open - Prepare file handler for reads from dat_chache
330332
* @inode: inode which was opened
331333
* @file: file handle to be initialized
334+
*
335+
* Return: 0 on success or negative error number in case of failure
332336
*/
333337
static int batadv_dat_cache_open(struct inode *inode, struct file *file)
334338
{
@@ -483,6 +487,8 @@ void batadv_debugfs_destroy(void)
483487
* batadv_debugfs_add_hardif - creates the base directory for a hard interface
484488
* in debugfs.
485489
* @hard_iface: hard interface which should be added.
490+
*
491+
* Return: 0 on success or negative error number in case of failure
486492
*/
487493
int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface)
488494
{

‎net/batman-adv/main.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,8 @@ int batadv_algo_seq_print_text(struct seq_file *seq, void *offset)
599599
*
600600
* payload_ptr must always point to an address in the skb head buffer and not to
601601
* a fragment.
602+
*
603+
* Return: big endian crc32c of the checksummed data
602604
*/
603605
__be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr)
604606
{

‎net/batman-adv/main.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ static inline void _batadv_dbg(int type __always_unused,
275275

276276
/**
277277
* batadv_compare_eth - Compare two not u16 aligned Ethernet addresses
278+
* @data1: Pointer to a six-byte array containing the Ethernet address
279+
* @data2: Pointer other six-byte array containing the Ethernet address
278280
*
279281
* note: can't use ether_addr_equal() as it requires aligned memory
280282
*
@@ -331,6 +333,8 @@ static inline void batadv_add_counter(struct batadv_priv *bat_priv, size_t idx,
331333

332334
/**
333335
* batadv_sum_counter - Sum the cpu-local counters for index 'idx'
336+
* @bat_priv: the bat priv with all the soft interface information
337+
* @idx: index of counter to sum up
334338
*
335339
* Return: sum of all cpu-local counters
336340
*/

‎net/batman-adv/originator.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ static struct lock_class_key batadv_orig_hash_lock_class_key;
4848
static void batadv_purge_orig(struct work_struct *work);
4949

5050
/**
51-
* batadv_compare_orig
51+
* batadv_compare_orig - comparing function used in the originator hash table
52+
* @node: node in the local table
53+
* @data2: second object to compare the node to
5254
*
5355
* Return: 1 if they are the same originator
5456
*/

‎net/batman-adv/packet.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ struct batadv_bla_claim_dst {
209209
* @version: batman-adv protocol version, part of the genereal header
210210
* @ttl: time to live for this packet, part of the genereal header
211211
* @flags: contains routing relevant flags - see enum batadv_iv_flags
212+
* @seqno: sequence identification
213+
* @orig: address of the source node
214+
* @prev_sender: address of the previous sender
215+
* @reserved: reserved byte for alignment
216+
* @tq: transmission quality
212217
* @tvlv_len: length of tvlv data following the ogm header
213218
*/
214219
struct batadv_ogm_packet {
@@ -345,6 +350,7 @@ struct batadv_unicast_packet {
345350
* @u: common unicast packet header
346351
* @src: address of the source
347352
* @subtype: packet subtype
353+
* @reserved: reserved byte for alignment
348354
*/
349355
struct batadv_unicast_4addr_packet {
350356
struct batadv_unicast_packet u;

‎net/batman-adv/routing.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,13 @@ void batadv_update_route(struct batadv_priv *bat_priv,
141141
}
142142

143143
/**
144-
* batadv_window_protected checks whether the host restarted and is in the
144+
* batadv_window_protected - checks whether the host restarted and is in the
145145
* protection time.
146+
* @bat_priv: the bat priv with all the soft interface information
147+
* @seq_num_diff: difference between the current/received sequence number and
148+
* the last sequence number
149+
* @last_reset: jiffies timestamp of the last reset, will be updated when reset
150+
* is detected
146151
*
147152
* Return:
148153
* 0 if the packet is to be accepted.

‎net/batman-adv/send.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,10 @@ _batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv,
431431
}
432432

433433
/**
434-
* batadv_add_bcast_packet_to_list
434+
* batadv_add_bcast_packet_to_list - queue broadcast packet for multiple sends
435+
* @bat_priv: the bat priv with all the soft interface information
436+
* @skb: broadcast packet to add
437+
* @delay: number of jiffies to wait before sending
435438
*
436439
* add a broadcast packet to the queue and setup timers. broadcast packets
437440
* are sent multiple times to increase probability for being received.

‎net/batman-adv/soft-interface.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ static void batadv_softif_destroy_vlan(struct batadv_priv *bat_priv,
594594
/**
595595
* batadv_interface_add_vid - ndo_add_vid API implementation
596596
* @dev: the netdev of the mesh interface
597+
* @proto: protocol of the the vlan id
597598
* @vid: identifier of the new vlan
598599
*
599600
* Set up all the internal structures for handling the new vlan on top of the
@@ -651,6 +652,7 @@ static int batadv_interface_add_vid(struct net_device *dev, __be16 proto,
651652
/**
652653
* batadv_interface_kill_vid - ndo_kill_vid API implementation
653654
* @dev: the netdev of the mesh interface
655+
* @proto: protocol of the the vlan id
654656
* @vid: identifier of the deleted vlan
655657
*
656658
* Destroy all the internal structures used to handle the vlan identified by vid

0 commit comments

Comments
 (0)