Skip to content

Commit

Permalink
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Browse files Browse the repository at this point in the history
Antonio Quartulli says:

====================
This batch of patches includes a number of corrections and
improvements for our kernel-doc. These changes also make sure
that our doc is now properly processed by the kernel-doc
parsing tool.

Other than that you have a patch updating all the copyright
lines to 2016 and another patch switching the URLs in our
readme, Kconfig and MAINTAINERS file from "http" to "https".
Both by Sven Eckelmann.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 7, 2016
2 parents e635919 + 7b5e739 commit 9d1eb21
Show file tree
Hide file tree
Showing 46 changed files with 584 additions and 355 deletions.
2 changes: 1 addition & 1 deletion Documentation/networking/batman-adv.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ interfaces to the kernel module settings.

For more information, please see the manpage (man batctl).

batctl is available on http://www.open-mesh.org/
batctl is available on https://www.open-mesh.org/


CONTACT
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ M: Marek Lindner <mareklindner@neomailbox.ch>
M: Simon Wunderlich <sw@simonwunderlich.de>
M: Antonio Quartulli <a@unstable.cc>
L: b.a.t.m.a.n@lists.open-mesh.org
W: http://www.open-mesh.org/
W: https://www.open-mesh.org/
S: Maintained
F: net/batman-adv/

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config BATMAN_ADV
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is
a routing protocol for multi-hop ad-hoc mesh networks. The
networks may be wired or wireless. See
http://www.open-mesh.org/ for more information and user space
https://www.open-mesh.org/ for more information and user space
tools.

config BATMAN_ADV_BLA
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2015 B.A.T.M.A.N. contributors:
# Copyright (C) 2007-2016 B.A.T.M.A.N. contributors:
#
# Marek Lindner, Simon Wunderlich
#
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bat_algo.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2011-2015 B.A.T.M.A.N. contributors:
/* Copyright (C) 2011-2016 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
29 changes: 18 additions & 11 deletions net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2007-2015 B.A.T.M.A.N. contributors:
/* Copyright (C) 2007-2016 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down Expand Up @@ -88,7 +88,7 @@ static void batadv_ring_buffer_set(u8 lq_recv[], u8 *lq_index, u8 value)
* in the given ring buffer
* @lq_recv: pointer to the ring buffer
*
* Returns computed average value.
* Return: computed average value.
*/
static u8 batadv_ring_buffer_avg(const u8 lq_recv[])
{
Expand Down Expand Up @@ -132,7 +132,7 @@ static void batadv_iv_ogm_orig_free(struct batadv_orig_node *orig_node)
* @orig_node: the orig_node that has to be changed
* @max_if_num: the current amount of interfaces
*
* Returns 0 on success, a negative error code otherwise.
* Return: 0 on success, a negative error code otherwise.
*/
static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
int max_if_num)
Expand Down Expand Up @@ -180,7 +180,7 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
* @max_if_num: the current amount of interfaces
* @del_if_num: the index of the interface being removed
*
* Returns 0 on success, a negative error code otherwise.
* Return: 0 on success, a negative error code otherwise.
*/
static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
int max_if_num, int del_if_num)
Expand Down Expand Up @@ -246,7 +246,7 @@ static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
* @bat_priv: the bat priv with all the soft interface information
* @addr: mac address of the originator
*
* Returns the originator object corresponding to the passed mac address or NULL
* Return: the originator object corresponding to the passed mac address or NULL
* on failure.
* If the object does not exists it is created an initialised.
*/
Expand Down Expand Up @@ -396,7 +396,14 @@ static u8 batadv_hop_penalty(u8 tq, const struct batadv_priv *bat_priv)
return new_tq;
}

/* is there another aggregated packet here? */
/**
* batadv_iv_ogm_aggr_packet - checks if there is another OGM attached
* @buff_pos: current position in the skb
* @packet_len: total length of the skb
* @tvlv_len: tvlv length of the previously considered OGM
*
* Return: true if there is enough space for another OGM, false otherwise.
*/
static bool batadv_iv_ogm_aggr_packet(int buff_pos, int packet_len,
__be16 tvlv_len)
{
Expand Down Expand Up @@ -522,7 +529,7 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
* @if_outgoing: interface for which the retransmission should be considered
* @forw_packet: the forwarded packet which should be checked
*
* Returns true if new_packet can be aggregated with forw_packet
* Return: true if new_packet can be aggregated with forw_packet
*/
static bool
batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
Expand Down Expand Up @@ -1125,7 +1132,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
* @if_incoming: interface where the packet was received
* @if_outgoing: interface for which the retransmission should be considered
*
* Returns 1 if the link can be considered bidirectional, 0 otherwise
* Return: 1 if the link can be considered bidirectional, 0 otherwise
*/
static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
struct batadv_orig_node *orig_neigh_node,
Expand Down Expand Up @@ -1269,7 +1276,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
* @if_incoming: interface on which the OGM packet was received
* @if_outgoing: interface for which the retransmission should be considered
*
* Returns duplicate status as enum batadv_dup_status
* Return: duplicate status as enum batadv_dup_status
*/
static enum batadv_dup_status
batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
Expand Down Expand Up @@ -1929,7 +1936,7 @@ static void batadv_iv_neigh_print(struct batadv_priv *bat_priv,
* @neigh2: the second neighbor object of the comparison
* @if_outgoing2: outgoing interface for the second neighbor
*
* Returns a value less, equal to or greater than 0 if the metric via neigh1 is
* Return: a value less, equal to or greater than 0 if the metric via neigh1 is
* lower, the same as or higher than the metric via neigh2
*/
static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
Expand Down Expand Up @@ -1970,7 +1977,7 @@ static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
* @neigh2: the second neighbor object of the comparison
* @if_outgoing2: outgoing interface for the second neighbor
*
* Returns true if the metric via neigh1 is equally good or better than
* Return: true if the metric via neigh1 is equally good or better than
* the metric via neigh2, false otherwise.
*/
static bool
Expand Down
14 changes: 10 additions & 4 deletions net/batman-adv/bitarray.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2006-2015 B.A.T.M.A.N. contributors:
/* Copyright (C) 2006-2016 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down Expand Up @@ -29,10 +29,16 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n)
bitmap_shift_left(seq_bits, seq_bits, n, BATADV_TQ_LOCAL_WINDOW_SIZE);
}

/* receive and process one packet within the sequence number window.
/**
* batadv_bit_get_packet - receive and process one packet within the sequence
* number window
* @priv: the bat priv with all the soft interface information
* @seq_bits: pointer to the sequence number receive packet
* @seq_num_diff: difference between the current/received sequence number and
* the last sequence number
* @set_mark: whether this packet should be marked in seq_bits
*
* returns:
* 1 if the window was moved (either new or very old)
* Return: 1 if the window was moved (either new or very old),
* 0 if the window was not moved/shifted.
*/
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits, s32 seq_num_diff,
Expand Down
14 changes: 9 additions & 5 deletions net/batman-adv/bitarray.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2006-2015 B.A.T.M.A.N. contributors:
/* Copyright (C) 2006-2016 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand All @@ -24,7 +24,14 @@
#include <linux/compiler.h>
#include <linux/types.h>

/* Returns 1 if the corresponding bit in the given seq_bits indicates true
/**
* batadv_test_bit - check if bit is set in the current window
*
* @seq_bits: pointer to the sequence number receive packet
* @last_seqno: latest sequence number in seq_bits
* @curr_seqno: sequence number to test for
*
* Return: 1 if the corresponding bit in the given seq_bits indicates true
* and curr_seqno is within range of last_seqno. Otherwise returns 0.
*/
static inline int batadv_test_bit(const unsigned long *seq_bits,
Expand All @@ -48,9 +55,6 @@ static inline void batadv_set_bit(unsigned long *seq_bits, s32 n)
set_bit(n, seq_bits); /* turn the position on */
}

/* receive and process one packet, returns 1 if received seq_num is considered
* new, 0 if old
*/
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits, s32 seq_num_diff,
int set_mark);

Expand Down
Loading

0 comments on commit 9d1eb21

Please sign in to comment.