Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b84cc4f authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Simon Wunderlich
Browse files

batman-adv: Use inline kernel-doc for enum/struct



The inline kernel-doc comments make it easier to keep changes to the
struct/enum synchronized with the documentation of the it. And it makes it
easier for larger structures like struct batadv_priv to read the
documentation inside the code.

Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
parent 7e9a8c2c
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -73,16 +73,23 @@ static void batadv_iv_send_outstanding_bat_ogm_packet(struct work_struct *work);

/**
 * enum batadv_dup_status - duplicate status
 * @BATADV_NO_DUP: the packet is no duplicate
 * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the
 *  neighbor)
 * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor
 * @BATADV_PROTECTED: originator is currently protected (after reboot)
 */
enum batadv_dup_status {
	/** @BATADV_NO_DUP: the packet is no duplicate */
	BATADV_NO_DUP = 0,

	/**
	 * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for
	 *  the neighbor)
	 */
	BATADV_ORIG_DUP,

	/** @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor */
	BATADV_NEIGH_DUP,

	/**
	 * @BATADV_PROTECTED: originator is currently protected (after reboot)
	 */
	BATADV_PROTECTED,
};

+3 −2
Original line number Diff line number Diff line
@@ -33,11 +33,12 @@ enum batadv_gw_modes {

/**
 * enum batadv_bandwidth_units - bandwidth unit types
 * @BATADV_BW_UNIT_KBIT: unit type kbit
 * @BATADV_BW_UNIT_MBIT: unit type mbit
 */
enum batadv_bandwidth_units {
	/** @BATADV_BW_UNIT_KBIT: unit type kbit */
	BATADV_BW_UNIT_KBIT,

	/** @BATADV_BW_UNIT_MBIT: unit type mbit */
	BATADV_BW_UNIT_MBIT,
};

+21 −6
Original line number Diff line number Diff line
@@ -42,25 +42,40 @@ enum batadv_hard_if_state {

/**
 * enum batadv_hard_if_bcast - broadcast avoidance options
 * @BATADV_HARDIF_BCAST_OK: Do broadcast on according hard interface
 * @BATADV_HARDIF_BCAST_NORECIPIENT: Broadcast not needed, there is no recipient
 * @BATADV_HARDIF_BCAST_DUPFWD: There is just the neighbor we got it from
 * @BATADV_HARDIF_BCAST_DUPORIG: There is just the originator
 */
enum batadv_hard_if_bcast {
	/** @BATADV_HARDIF_BCAST_OK: Do broadcast on according hard interface */
	BATADV_HARDIF_BCAST_OK = 0,

	/**
	 * @BATADV_HARDIF_BCAST_NORECIPIENT: Broadcast not needed, there is no
	 *  recipient
	 */
	BATADV_HARDIF_BCAST_NORECIPIENT,

	/**
	 * @BATADV_HARDIF_BCAST_DUPFWD: There is just the neighbor we got it
	 *  from
	 */
	BATADV_HARDIF_BCAST_DUPFWD,

	/** @BATADV_HARDIF_BCAST_DUPORIG: There is just the originator */
	BATADV_HARDIF_BCAST_DUPORIG,
};

/**
 * enum batadv_hard_if_cleanup - Cleanup modi for soft_iface after slave removal
 * @BATADV_IF_CLEANUP_KEEP: Don't automatically delete soft-interface
 * @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was removed
 */
enum batadv_hard_if_cleanup {
	/**
	 * @BATADV_IF_CLEANUP_KEEP: Don't automatically delete soft-interface
	 */
	BATADV_IF_CLEANUP_KEEP,

	/**
	 * @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was
	 *  removed
	 */
	BATADV_IF_CLEANUP_AUTO,
};

+17 −9
Original line number Diff line number Diff line
@@ -45,25 +45,33 @@ static inline void batadv_debug_log_cleanup(struct batadv_priv *bat_priv)

/**
 * enum batadv_dbg_level - available log levels
 * @BATADV_DBG_BATMAN: OGM and TQ computations related messages
 * @BATADV_DBG_ROUTES: route added / changed / deleted
 * @BATADV_DBG_TT: translation table messages
 * @BATADV_DBG_BLA: bridge loop avoidance messages
 * @BATADV_DBG_DAT: ARP snooping and DAT related messages
 * @BATADV_DBG_NC: network coding related messages
 * @BATADV_DBG_MCAST: multicast related messages
 * @BATADV_DBG_TP_METER: throughput meter messages
 * @BATADV_DBG_ALL: the union of all the above log levels
 */
enum batadv_dbg_level {
	/** @BATADV_DBG_BATMAN: OGM and TQ computations related messages */
	BATADV_DBG_BATMAN	= BIT(0),

	/** @BATADV_DBG_ROUTES: route added / changed / deleted */
	BATADV_DBG_ROUTES	= BIT(1),

	/** @BATADV_DBG_TT: translation table messages */
	BATADV_DBG_TT		= BIT(2),

	/** @BATADV_DBG_BLA: bridge loop avoidance messages */
	BATADV_DBG_BLA		= BIT(3),

	/** @BATADV_DBG_DAT: ARP snooping and DAT related messages */
	BATADV_DBG_DAT		= BIT(4),

	/** @BATADV_DBG_NC: network coding related messages */
	BATADV_DBG_NC		= BIT(5),

	/** @BATADV_DBG_MCAST: multicast related messages */
	BATADV_DBG_MCAST	= BIT(6),

	/** @BATADV_DBG_TP_METER: throughput meter messages */
	BATADV_DBG_TP_METER	= BIT(7),

	/** @BATADV_DBG_ALL: the union of all the above log levels */
	BATADV_DBG_ALL		= 255,
};

+11 −5
Original line number Diff line number Diff line
@@ -26,15 +26,21 @@ struct sk_buff;

/**
 * enum batadv_forw_mode - the way a packet should be forwarded as
 * @BATADV_FORW_ALL: forward the packet to all nodes (currently via classic
 *  flooding)
 * @BATADV_FORW_SINGLE: forward the packet to a single node (currently via the
 *  BATMAN unicast routing protocol)
 * @BATADV_FORW_NONE: don't forward, drop it
 */
enum batadv_forw_mode {
	/**
	 * @BATADV_FORW_ALL: forward the packet to all nodes (currently via
	 *  classic flooding)
	 */
	BATADV_FORW_ALL,

	/**
	 * @BATADV_FORW_SINGLE: forward the packet to a single node (currently
	 *  via the BATMAN unicast routing protocol)
	 */
	BATADV_FORW_SINGLE,

	/** @BATADV_FORW_NONE: don't forward, drop it */
	BATADV_FORW_NONE,
};

Loading