* @bat_priv: the bat priv with all the mesh interface information
* @dst: the other endpoint MAC address to look for
*
- * Return: if matching session with @dst was found
+ * Return: true if a matching session with @dst was found, false otherwise
*/
static bool batadv_tp_list_active(struct batadv_priv *bat_priv, const u8 *dst)
__must_hold(&bat_priv->tp_list_lock)
/**
* batadv_tp_vars_common_release() - release batadv_tp_vars_common from lists
* and queue for free after rcu grace period
- * @ref: kref pointer of the batadv_tp_vars
+ * @ref: kref pointer of the batadv_tp_vars_common
*/
static void batadv_tp_vars_common_release(struct kref *ref)
{
}
/**
- * batadv_tp_list_detach() - remove tp receiver session from mesh session list once
+ * batadv_tp_list_detach() - remove tp session from mesh session list once
* @tp_vars: the private data of the current TP meter session
*
* Return: whether tp_vars was detached from list and reference must be freed
* batadv_tp_reset_sender_timer() - reschedule the sender timer
* @tp_vars: the private TP meter data for this session
*
- * Reschedule the timer using tp_vars->rto as delay
+ * Reschedule the timer using tp_vars->cc.rto as delay
*/
static void batadv_tp_reset_sender_timer(struct batadv_tp_sender *tp_vars)
{
*
* Create and send a single TP Meter message.
*
- * Return: 0 on success, BATADV_TP_REASON_DST_UNREACHABLE if the destination is
- * not reachable, BATADV_TP_REASON_MEMORY_ERROR if the packet couldn't be
- * allocated
+ * Return: 0 on success, BATADV_TP_REASON_MEMORY_ERROR if the packet couldn't
+ * be allocated, BATADV_TP_REASON_CANT_SEND if the packet could not be
+ * transmitted
*/
static int batadv_tp_send_msg(struct batadv_tp_sender *tp_vars, const u8 *src,
struct batadv_orig_node *orig_node,
* batadv_tp_send() - main sending thread of a tp meter session
* @arg: address of the related tp_vars
*
- * Return: nothing, this function never returns
+ * Return: 0
*/
static int batadv_tp_send(void *arg)
{
/** @len: length of the packet */
u16 len;
- /** @list: list node for &batadv_tp_vars.unacked_list */
+ /** @list: list node for &batadv_tp_vars_common.unacked_list */
struct list_head list;
};
struct rcu_head rcu;
};
-/** struct batadv_tp_sender_cc - congestion control variables */
+/**
+ * struct batadv_tp_sender_cc - congestion control variables
+ */
struct batadv_tp_sender_cc {
/** @fast_recovery: true if in Fast Recovery mode */
bool fast_recovery:1;
* struct batadv_tp_sender - sender tp meter private variables per session
*/
struct batadv_tp_sender {
- /** @common: common batadv_tp_vars (best be first member) */
+ /** @common: common batadv_tp_vars_common (must be first member) */
struct batadv_tp_vars_common common;
/** @start_time: start time in jiffies */
/** @cc: congestion control variables */
struct batadv_tp_sender_cc cc;
- /** @cc_lock: lock do protect @cc */
+ /** @cc_lock: lock to protect @cc */
spinlock_t cc_lock;
/** @tot_sent: amount of data sent/ACKed so far */
* struct batadv_tp_receiver - receiver tp meter private variables per session
*/
struct batadv_tp_receiver {
- /** @common: common batadv_tp_vars (best be first member) */
+ /** @common: common batadv_tp_vars_common (must be first member) */
struct batadv_tp_vars_common common;
/** @receiving: receiving binary semaphore: 1 if receiving, 0 is not */
/** @forw_bcast_list_lock: lock protecting forw_bcast_list */
spinlock_t forw_bcast_list_lock;
- /** @tp_list_lock: spinlock protecting @tp_list */
+ /** @tp_list_lock: spinlock protecting @tp_sender_list + @tp_receiver_list */
spinlock_t tp_list_lock;
/** @tp_num: number of currently active tp sessions */