@@ -58,7 +58,11 @@ static void
5858batadv_bla_send_announce (struct batadv_priv * bat_priv ,
5959 struct batadv_bla_backbone_gw * backbone_gw );
6060
61- /* return the index of the claim */
61+ /**
62+ * batadv_choose_claim
63+ *
64+ * Return: the index of the claim
65+ */
6266static inline u32 batadv_choose_claim (const void * data , u32 size )
6367{
6468 struct batadv_bla_claim * claim = (struct batadv_bla_claim * )data ;
@@ -70,7 +74,11 @@ static inline u32 batadv_choose_claim(const void *data, u32 size)
7074 return hash % size ;
7175}
7276
73- /* return the index of the backbone gateway */
77+ /**
78+ * batadv_choose_backbone_gw
79+ *
80+ * Return: the index of the backbone gateway
81+ */
7482static inline u32 batadv_choose_backbone_gw (const void * data , u32 size )
7583{
7684 const struct batadv_bla_claim * claim = (struct batadv_bla_claim * )data ;
@@ -145,8 +153,9 @@ static void batadv_claim_free_ref(struct batadv_bla_claim *claim)
145153 * @bat_priv: the bat priv with all the soft interface information
146154 * @data: search data (may be local/static data)
147155 *
148- * looks for a claim in the hash, and returns it if found
149- * or NULL otherwise.
156+ * looks for a claim in the hash
157+ *
158+ * Return: claim if found or NULL otherwise.
150159 */
151160static struct batadv_bla_claim
152161* batadv_claim_hash_find (struct batadv_priv * bat_priv ,
@@ -186,7 +195,7 @@ static struct batadv_bla_claim
186195 * @addr: the address of the originator
187196 * @vid: the VLAN ID
188197 *
189- * Returns claim if found or NULL otherwise.
198+ * Return: claim if found or NULL otherwise.
190199 */
191200static struct batadv_bla_backbone_gw *
192201batadv_backbone_hash_find (struct batadv_priv * bat_priv , u8 * addr ,
@@ -666,7 +675,11 @@ static void batadv_bla_del_claim(struct batadv_priv *bat_priv,
666675 batadv_claim_free_ref (claim );
667676}
668677
669- /* check for ANNOUNCE frame, return 1 if handled */
678+ /**
679+ * batadv_handle_announce - check for ANNOUNCE frame
680+ *
681+ * Return: 1 if handled
682+ */
670683static int batadv_handle_announce (struct batadv_priv * bat_priv , u8 * an_addr ,
671684 u8 * backbone_addr , unsigned short vid )
672685{
@@ -716,7 +729,11 @@ static int batadv_handle_announce(struct batadv_priv *bat_priv, u8 *an_addr,
716729 return 1 ;
717730}
718731
719- /* check for REQUEST frame, return 1 if handled */
732+ /**
733+ * batadv_handle_request - check for REQUEST frame
734+ *
735+ * Return: 1 if handled
736+ */
720737static int batadv_handle_request (struct batadv_priv * bat_priv ,
721738 struct batadv_hard_iface * primary_if ,
722739 u8 * backbone_addr , struct ethhdr * ethhdr ,
@@ -740,7 +757,11 @@ static int batadv_handle_request(struct batadv_priv *bat_priv,
740757 return 1 ;
741758}
742759
743- /* check for UNCLAIM frame, return 1 if handled */
760+ /**
761+ * batadv_handle_unclaim - check for UNCLAIM frame
762+ *
763+ * Return: 1 if handled
764+ */
744765static int batadv_handle_unclaim (struct batadv_priv * bat_priv ,
745766 struct batadv_hard_iface * primary_if ,
746767 u8 * backbone_addr , u8 * claim_addr ,
@@ -769,7 +790,11 @@ static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
769790 return 1 ;
770791}
771792
772- /* check for CLAIM frame, return 1 if handled */
793+ /**
794+ * batadv_handle_claim - check for CLAIM frame
795+ *
796+ * Return: 1 if handled
797+ */
773798static int batadv_handle_claim (struct batadv_priv * bat_priv ,
774799 struct batadv_hard_iface * primary_if ,
775800 u8 * backbone_addr , u8 * claim_addr ,
@@ -809,7 +834,7 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
809834 * This function also applies the group ID of the sender
810835 * if it is in the same mesh.
811836 *
812- * returns :
837+ * Return :
813838 * 2 - if it is a claim packet and on the same group
814839 * 1 - if is a claim packet from another group
815840 * 0 - if it is not a claim packet
@@ -880,7 +905,7 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv,
880905 *
881906 * Check if this is a claim frame, and process it accordingly.
882907 *
883- * returns 1 if it was a claim frame, otherwise return 0 to
908+ * Return: 1 if it was a claim frame, otherwise return 0 to
884909 * tell the callee that it can use the frame on its own.
885910 */
886911static int batadv_bla_process_claim (struct batadv_priv * bat_priv ,
@@ -1397,7 +1422,7 @@ int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv,
13971422 *
13981423 * Check if the originator is a gateway for the VLAN identified by vid.
13991424 *
1400- * Returns true if orig is a backbone for this vid, false otherwise.
1425+ * Return: true if orig is a backbone for this vid, false otherwise.
14011426 */
14021427bool batadv_bla_is_backbone_gw_orig (struct batadv_priv * bat_priv , u8 * orig ,
14031428 unsigned short vid )
@@ -1436,9 +1461,10 @@ bool batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, u8 *orig,
14361461 * @orig_node: the orig_node of the frame
14371462 * @hdr_size: maximum length of the frame
14381463 *
1439- * bla_is_backbone_gw inspects the skb for the VLAN ID and returns 1
1440- * if the orig_node is also a gateway on the soft interface, otherwise it
1441- * returns 0.
1464+ * bla_is_backbone_gw inspects the skb for the VLAN ID
1465+ *
1466+ * Return: 1 if the orig_node is also a gateway on the soft interface, otherwise
1467+ * it returns 0.
14421468 */
14431469int batadv_bla_is_backbone_gw (struct sk_buff * skb ,
14441470 struct batadv_orig_node * orig_node , int hdr_size )
@@ -1498,8 +1524,9 @@ void batadv_bla_free(struct batadv_priv *bat_priv)
14981524 * * we have to race for a claim
14991525 * * if the frame is allowed on the LAN
15001526 *
1501- * in these cases, the skb is further handled by this function and
1502- * returns 1, otherwise it returns 0 and the caller shall further
1527+ * in these cases, the skb is further handled by this function
1528+ *
1529+ * Return: 1 if handled, otherwise it returns 0 and the caller shall further
15031530 * process the skb.
15041531 */
15051532int batadv_bla_rx (struct batadv_priv * bat_priv , struct sk_buff * skb ,
@@ -1592,11 +1619,12 @@ int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
15921619 * * a claim was received which has to be processed
15931620 * * the frame is allowed on the mesh
15941621 *
1595- * in these cases, the skb is further handled by this function and
1596- * returns 1, otherwise it returns 0 and the caller shall further
1597- * process the skb.
1622+ * in these cases, the skb is further handled by this function.
15981623 *
15991624 * This call might reallocate skb data.
1625+ *
1626+ * Return: 1 if handled, otherwise it returns 0 and the caller shall further
1627+ * process the skb.
16001628 */
16011629int batadv_bla_tx (struct batadv_priv * bat_priv , struct sk_buff * skb ,
16021630 unsigned short vid )
0 commit comments