Lines Matching refs:orig_node
55 struct batadv_orig_node *orig_node, in _batadv_update_route() argument
62 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, recv_if); in _batadv_update_route()
66 spin_lock_bh(&orig_node->neigh_list_lock); in _batadv_update_route()
81 spin_unlock_bh(&orig_node->neigh_list_lock); in _batadv_update_route()
87 "Deleting route towards: %pM\n", orig_node->orig); in _batadv_update_route()
88 batadv_tt_global_del_orig(bat_priv, orig_node, -1, in _batadv_update_route()
95 orig_node->orig, neigh_node->addr); in _batadv_update_route()
100 orig_node->orig, neigh_node->addr, in _batadv_update_route()
117 struct batadv_orig_node *orig_node, in batadv_update_route() argument
123 if (!orig_node) in batadv_update_route()
126 router = batadv_orig_router_get(orig_node, recv_if); in batadv_update_route()
129 _batadv_update_route(bat_priv, orig_node, recv_if, neigh_node); in batadv_update_route()
223 struct batadv_orig_node *orig_node = NULL; in batadv_recv_my_icmp_packet() local
246 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
247 if (!orig_node) in batadv_recv_my_icmp_packet()
261 res = batadv_send_skb_to_orig(skb, orig_node, NULL); in batadv_recv_my_icmp_packet()
284 if (orig_node) in batadv_recv_my_icmp_packet()
285 batadv_orig_node_put(orig_node); in batadv_recv_my_icmp_packet()
296 struct batadv_orig_node *orig_node = NULL; in batadv_recv_icmp_ttl_exceeded() local
314 orig_node = batadv_orig_hash_find(bat_priv, icmp_packet->orig); in batadv_recv_icmp_ttl_exceeded()
315 if (!orig_node) in batadv_recv_icmp_ttl_exceeded()
329 res = batadv_send_skb_to_orig(skb, orig_node, NULL); in batadv_recv_icmp_ttl_exceeded()
339 if (orig_node) in batadv_recv_icmp_ttl_exceeded()
340 batadv_orig_node_put(orig_node); in batadv_recv_icmp_ttl_exceeded()
361 struct batadv_orig_node *orig_node = NULL; in batadv_recv_icmp_packet() local
416 orig_node = batadv_orig_hash_find(bat_priv, icmph->dst); in batadv_recv_icmp_packet()
417 if (!orig_node) in batadv_recv_icmp_packet()
430 res = batadv_send_skb_to_orig(skb, orig_node, recv_if); in batadv_recv_icmp_packet()
438 if (orig_node) in batadv_recv_icmp_packet()
439 batadv_orig_node_put(orig_node); in batadv_recv_icmp_packet()
493 batadv_last_bonding_get(struct batadv_orig_node *orig_node) in batadv_last_bonding_get() argument
497 spin_lock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_get()
498 last_bonding_candidate = orig_node->last_bonding_candidate; in batadv_last_bonding_get()
502 spin_unlock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_get()
513 batadv_last_bonding_replace(struct batadv_orig_node *orig_node, in batadv_last_bonding_replace() argument
518 spin_lock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_replace()
519 old_candidate = orig_node->last_bonding_candidate; in batadv_last_bonding_replace()
523 orig_node->last_bonding_candidate = new_candidate; in batadv_last_bonding_replace()
524 spin_unlock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_replace()
541 struct batadv_orig_node *orig_node, in batadv_find_router() argument
554 if (!orig_node) in batadv_find_router()
557 router = batadv_orig_router_get(orig_node, recv_if); in batadv_find_router()
577 last_candidate = batadv_last_bonding_get(orig_node); in batadv_find_router()
581 hlist_for_each_entry_rcu(cand, &orig_node->ifinfo_list, list) { in batadv_find_router()
647 batadv_last_bonding_replace(orig_node, next_candidate); in batadv_find_router()
653 batadv_last_bonding_replace(orig_node, first_candidate); in batadv_find_router()
655 batadv_last_bonding_replace(orig_node, NULL); in batadv_find_router()
679 struct batadv_orig_node *orig_node = NULL; in batadv_route_unicast_packet() local
695 orig_node = batadv_orig_hash_find(bat_priv, unicast_packet->dest); in batadv_route_unicast_packet()
697 if (!orig_node) in batadv_route_unicast_packet()
725 res = batadv_send_skb_to_orig(skb, orig_node, recv_if); in batadv_route_unicast_packet()
740 batadv_orig_node_put(orig_node); in batadv_route_unicast_packet()
766 struct batadv_orig_node *orig_node = NULL; in batadv_reroute_unicast_packet() local
778 orig_node = batadv_transtable_search(bat_priv, NULL, dst_addr, in batadv_reroute_unicast_packet()
780 if (!orig_node) in batadv_reroute_unicast_packet()
783 if (batadv_compare_eth(orig_node->orig, unicast_packet->dest)) in batadv_reroute_unicast_packet()
786 orig_addr = orig_node->orig; in batadv_reroute_unicast_packet()
787 orig_ttvn = (u8)atomic_read(&orig_node->last_ttvn); in batadv_reroute_unicast_packet()
800 if (orig_node) in batadv_reroute_unicast_packet()
801 batadv_orig_node_put(orig_node); in batadv_reroute_unicast_packet()
811 struct batadv_orig_node *orig_node; in batadv_check_unicast_ttvn() local
860 orig_node = batadv_orig_hash_find(bat_priv, in batadv_check_unicast_ttvn()
866 if (!orig_node) in batadv_check_unicast_ttvn()
869 curr_ttvn = (u8)atomic_read(&orig_node->last_ttvn); in batadv_check_unicast_ttvn()
870 batadv_orig_node_put(orig_node); in batadv_check_unicast_ttvn()
965 struct batadv_orig_node *orig_node = NULL, *orig_node_gw = NULL; in batadv_recv_unicast_packet() local
1026 orig_node = batadv_orig_hash_find(bat_priv, in batadv_recv_unicast_packet()
1041 orig_node); in batadv_recv_unicast_packet()
1044 if (orig_node) in batadv_recv_unicast_packet()
1045 batadv_orig_node_put(orig_node); in batadv_recv_unicast_packet()
1191 struct batadv_orig_node *orig_node = NULL; in batadv_recv_bcast_packet() local
1226 orig_node = batadv_orig_hash_find(bat_priv, bcast_packet->orig); in batadv_recv_bcast_packet()
1228 if (!orig_node) in batadv_recv_bcast_packet()
1231 spin_lock_bh(&orig_node->bcast_seqno_lock); in batadv_recv_bcast_packet()
1235 if (batadv_test_bit(orig_node->bcast_bits, orig_node->last_bcast_seqno, in batadv_recv_bcast_packet()
1239 seq_diff = seqno - orig_node->last_bcast_seqno; in batadv_recv_bcast_packet()
1244 &orig_node->bcast_seqno_reset, NULL)) in batadv_recv_bcast_packet()
1250 if (batadv_bit_get_packet(bat_priv, orig_node->bcast_bits, seq_diff, 1)) in batadv_recv_bcast_packet()
1251 orig_node->last_bcast_seqno = seqno; in batadv_recv_bcast_packet()
1253 spin_unlock_bh(&orig_node->bcast_seqno_lock); in batadv_recv_bcast_packet()
1267 if (batadv_bla_is_backbone_gw(skb, orig_node, hdr_size)) in batadv_recv_bcast_packet()
1278 batadv_interface_rx(recv_if->soft_iface, skb, hdr_size, orig_node); in batadv_recv_bcast_packet()
1285 spin_unlock_bh(&orig_node->bcast_seqno_lock); in batadv_recv_bcast_packet()
1289 if (orig_node) in batadv_recv_bcast_packet()
1290 batadv_orig_node_put(orig_node); in batadv_recv_bcast_packet()