Lines Matching refs:orig_node

54 				 struct batadv_orig_node *orig_node,  in _batadv_update_route()  argument
61 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, recv_if); in _batadv_update_route()
65 spin_lock_bh(&orig_node->neigh_list_lock); in _batadv_update_route()
80 spin_unlock_bh(&orig_node->neigh_list_lock); in _batadv_update_route()
86 "Deleting route towards: %pM\n", orig_node->orig); in _batadv_update_route()
87 batadv_tt_global_del_orig(bat_priv, orig_node, -1, in _batadv_update_route()
94 orig_node->orig, neigh_node->addr); in _batadv_update_route()
99 orig_node->orig, neigh_node->addr, in _batadv_update_route()
115 struct batadv_orig_node *orig_node, in batadv_update_route() argument
121 if (!orig_node) in batadv_update_route()
124 router = batadv_orig_router_get(orig_node, recv_if); in batadv_update_route()
127 _batadv_update_route(bat_priv, orig_node, recv_if, neigh_node); in batadv_update_route()
220 struct batadv_orig_node *orig_node = NULL; in batadv_recv_my_icmp_packet() local
234 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
235 if (!orig_node) in batadv_recv_my_icmp_packet()
249 res = batadv_send_skb_to_orig(skb, orig_node, NULL); in batadv_recv_my_icmp_packet()
271 batadv_orig_node_put(orig_node); in batadv_recv_my_icmp_packet()
282 struct batadv_orig_node *orig_node = NULL; in batadv_recv_icmp_ttl_exceeded() local
300 orig_node = batadv_orig_hash_find(bat_priv, icmp_packet->orig); in batadv_recv_icmp_ttl_exceeded()
301 if (!orig_node) in batadv_recv_icmp_ttl_exceeded()
315 res = batadv_send_skb_to_orig(skb, orig_node, NULL); in batadv_recv_icmp_ttl_exceeded()
324 batadv_orig_node_put(orig_node); in batadv_recv_icmp_ttl_exceeded()
345 struct batadv_orig_node *orig_node = NULL; in batadv_recv_icmp_packet() local
400 orig_node = batadv_orig_hash_find(bat_priv, icmph->dst); in batadv_recv_icmp_packet()
401 if (!orig_node) in batadv_recv_icmp_packet()
414 res = batadv_send_skb_to_orig(skb, orig_node, recv_if); in batadv_recv_icmp_packet()
422 batadv_orig_node_put(orig_node); in batadv_recv_icmp_packet()
476 batadv_last_bonding_get(struct batadv_orig_node *orig_node) in batadv_last_bonding_get() argument
480 spin_lock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_get()
481 last_bonding_candidate = orig_node->last_bonding_candidate; in batadv_last_bonding_get()
485 spin_unlock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_get()
496 batadv_last_bonding_replace(struct batadv_orig_node *orig_node, in batadv_last_bonding_replace() argument
501 spin_lock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_replace()
502 old_candidate = orig_node->last_bonding_candidate; in batadv_last_bonding_replace()
506 orig_node->last_bonding_candidate = new_candidate; in batadv_last_bonding_replace()
507 spin_unlock_bh(&orig_node->neigh_list_lock); in batadv_last_bonding_replace()
523 struct batadv_orig_node *orig_node, in batadv_find_router() argument
536 if (!orig_node) in batadv_find_router()
539 router = batadv_orig_router_get(orig_node, recv_if); in batadv_find_router()
559 last_candidate = batadv_last_bonding_get(orig_node); in batadv_find_router()
563 hlist_for_each_entry_rcu(cand, &orig_node->ifinfo_list, list) { in batadv_find_router()
629 batadv_last_bonding_replace(orig_node, next_candidate); in batadv_find_router()
635 batadv_last_bonding_replace(orig_node, first_candidate); in batadv_find_router()
637 batadv_last_bonding_replace(orig_node, NULL); in batadv_find_router()
660 struct batadv_orig_node *orig_node = NULL; in batadv_route_unicast_packet() local
676 orig_node = batadv_orig_hash_find(bat_priv, unicast_packet->dest); in batadv_route_unicast_packet()
678 if (!orig_node) in batadv_route_unicast_packet()
706 res = batadv_send_skb_to_orig(skb, orig_node, recv_if); in batadv_route_unicast_packet()
721 batadv_orig_node_put(orig_node); in batadv_route_unicast_packet()
747 struct batadv_orig_node *orig_node = NULL; in batadv_reroute_unicast_packet() local
760 orig_node = batadv_transtable_search(bat_priv, NULL, dst_addr, in batadv_reroute_unicast_packet()
762 if (!orig_node) in batadv_reroute_unicast_packet()
765 if (batadv_compare_eth(orig_node->orig, unicast_packet->dest)) in batadv_reroute_unicast_packet()
768 orig_addr = orig_node->orig; in batadv_reroute_unicast_packet()
769 orig_ttvn = (u8)atomic_read(&orig_node->last_ttvn); in batadv_reroute_unicast_packet()
781 batadv_orig_node_put(orig_node); in batadv_reroute_unicast_packet()
791 struct batadv_orig_node *orig_node; in batadv_check_unicast_ttvn() local
840 orig_node = batadv_orig_hash_find(bat_priv, in batadv_check_unicast_ttvn()
846 if (!orig_node) in batadv_check_unicast_ttvn()
849 curr_ttvn = (u8)atomic_read(&orig_node->last_ttvn); in batadv_check_unicast_ttvn()
850 batadv_orig_node_put(orig_node); in batadv_check_unicast_ttvn()
945 struct batadv_orig_node *orig_node = NULL, *orig_node_gw = NULL; in batadv_recv_unicast_packet() local
1006 orig_node = batadv_orig_hash_find(bat_priv, in batadv_recv_unicast_packet()
1021 orig_node); in batadv_recv_unicast_packet()
1024 batadv_orig_node_put(orig_node); in batadv_recv_unicast_packet()
1170 struct batadv_orig_node *orig_node = NULL; in batadv_recv_bcast_packet() local
1205 orig_node = batadv_orig_hash_find(bat_priv, bcast_packet->orig); in batadv_recv_bcast_packet()
1207 if (!orig_node) in batadv_recv_bcast_packet()
1210 spin_lock_bh(&orig_node->bcast_seqno_lock); in batadv_recv_bcast_packet()
1214 if (batadv_test_bit(orig_node->bcast_bits, orig_node->last_bcast_seqno, in batadv_recv_bcast_packet()
1218 seq_diff = seqno - orig_node->last_bcast_seqno; in batadv_recv_bcast_packet()
1223 &orig_node->bcast_seqno_reset, NULL)) in batadv_recv_bcast_packet()
1229 if (batadv_bit_get_packet(bat_priv, orig_node->bcast_bits, seq_diff, 1)) in batadv_recv_bcast_packet()
1230 orig_node->last_bcast_seqno = seqno; in batadv_recv_bcast_packet()
1232 spin_unlock_bh(&orig_node->bcast_seqno_lock); in batadv_recv_bcast_packet()
1248 if (batadv_bla_is_backbone_gw(skb, orig_node, hdr_size)) in batadv_recv_bcast_packet()
1259 batadv_interface_rx(recv_if->soft_iface, skb, hdr_size, orig_node); in batadv_recv_bcast_packet()
1266 spin_unlock_bh(&orig_node->bcast_seqno_lock); in batadv_recv_bcast_packet()
1271 batadv_orig_node_put(orig_node); in batadv_recv_bcast_packet()