Lines Matching refs:bat_priv

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