Lines Matching defs:bat_priv

209  * @bat_priv: the bat priv with all the soft interface information
215 const u8 *dst, struct batadv_priv *bat_priv,
233 batadv_netlink_tpmeter_notify(bat_priv, dst, result, test_time,
241 * @bat_priv: the bat priv with all the soft interface information
246 struct batadv_priv *bat_priv,
249 batadv_tp_batctl_notify(reason, dst, bat_priv, 0, 0, cookie);
254 * @bat_priv: the bat priv with all the soft interface information
262 static struct batadv_tp_vars *batadv_tp_list_find(struct batadv_priv *bat_priv,
268 hlist_for_each_entry_rcu(pos, &bat_priv->tp_list, list) {
290 * @bat_priv: the bat priv with all the soft interface information
301 batadv_tp_list_find_session(struct batadv_priv *bat_priv, const u8 *dst,
307 hlist_for_each_entry_rcu(pos, &bat_priv->tp_list, list) {
369 * @bat_priv: the bat priv with all the soft interface information
372 static void batadv_tp_sender_cleanup(struct batadv_priv *bat_priv,
377 spin_lock_bh(&tp_vars->bat_priv->tp_list_lock);
379 spin_unlock_bh(&tp_vars->bat_priv->tp_list_lock);
384 atomic_dec(&tp_vars->bat_priv->tp_num);
399 * @bat_priv: the bat priv with all the soft interface information
402 static void batadv_tp_sender_end(struct batadv_priv *bat_priv,
407 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
411 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
415 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
424 bat_priv,
489 struct batadv_priv *bat_priv = tp_vars->bat_priv;
512 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
622 * @bat_priv: the bat priv with all the soft interface information
627 static void batadv_tp_recv_ack(struct batadv_priv *bat_priv,
645 tp_vars = batadv_tp_list_find_session(bat_priv, icmp->orig,
658 primary_if = batadv_primary_if_get_selected(bat_priv);
662 orig_node = batadv_orig_hash_find(bat_priv, icmp->orig);
700 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
808 struct batadv_priv *bat_priv = tp_vars->bat_priv;
820 orig_node = batadv_orig_hash_find(bat_priv, tp_vars->other_end);
827 primary_if = batadv_primary_if_get_selected(bat_priv);
868 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
888 batadv_tp_sender_end(bat_priv, tp_vars);
889 batadv_tp_sender_cleanup(bat_priv, tp_vars);
904 struct batadv_priv *bat_priv = tp_vars->bat_priv;
915 bat_priv, session_cookie);
921 batadv_tp_sender_cleanup(bat_priv, tp_vars);
930 * @bat_priv: the bat priv with all the soft interface information
935 void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
949 spin_lock_bh(&bat_priv->tp_list_lock);
950 tp_vars = batadv_tp_list_find(bat_priv, dst);
952 spin_unlock_bh(&bat_priv->tp_list_lock);
954 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
957 dst, bat_priv, session_cookie);
961 if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) {
962 spin_unlock_bh(&bat_priv->tp_list_lock);
963 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
966 bat_priv, session_cookie);
972 spin_unlock_bh(&bat_priv->tp_list_lock);
973 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
977 dst, bat_priv, session_cookie);
1016 tp_vars->bat_priv = bat_priv;
1030 hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list);
1031 spin_unlock_bh(&bat_priv->tp_list_lock);
1037 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1055 * @bat_priv: the bat priv with all the soft interface information
1059 void batadv_tp_stop(struct batadv_priv *bat_priv, const u8 *dst,
1065 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1068 orig_node = batadv_orig_hash_find(bat_priv, dst);
1072 tp_vars = batadv_tp_list_find(bat_priv, orig_node->orig);
1074 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1106 struct batadv_priv *bat_priv;
1108 bat_priv = tp_vars->bat_priv;
1118 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1122 spin_lock_bh(&tp_vars->bat_priv->tp_list_lock);
1124 spin_unlock_bh(&tp_vars->bat_priv->tp_list_lock);
1129 atomic_dec(&bat_priv->tp_num);
1144 * @bat_priv: the bat priv with all the soft interface information
1154 static int batadv_tp_send_ack(struct batadv_priv *bat_priv, const u8 *dst,
1164 orig_node = batadv_orig_hash_find(bat_priv, dst);
1170 primary_if = batadv_primary_if_get_selected(bat_priv);
1323 * @bat_priv: the bat priv with all the soft interface information
1329 batadv_tp_init_recv(struct batadv_priv *bat_priv,
1334 spin_lock_bh(&bat_priv->tp_list_lock);
1335 tp_vars = batadv_tp_list_find_session(bat_priv, icmp->orig,
1340 if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) {
1341 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1354 tp_vars->bat_priv = bat_priv;
1361 hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list);
1369 spin_unlock_bh(&bat_priv->tp_list_lock);
1376 * @bat_priv: the bat priv with all the soft interface information
1381 static void batadv_tp_recv_msg(struct batadv_priv *bat_priv,
1396 tp_vars = batadv_tp_init_recv(bat_priv, icmp);
1398 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1403 tp_vars = batadv_tp_list_find_session(bat_priv, icmp->orig,
1406 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1414 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
1452 batadv_tp_send_ack(bat_priv, icmp->orig, tp_vars->last_recv,
1460 * @bat_priv: the bat priv with all the soft interface information
1463 void batadv_tp_meter_recv(struct batadv_priv *bat_priv, struct sk_buff *skb)
1471 batadv_tp_recv_msg(bat_priv, skb);
1474 batadv_tp_recv_ack(bat_priv, skb);
1477 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,