Lines Matching refs:neigh_node
64 struct neigh_node *neigh_node) in _update_route() argument
66 struct neigh_node *curr_router; in _update_route()
71 if ((curr_router) && (!neigh_node)) { in _update_route()
78 } else if ((!curr_router) && (neigh_node)) { in _update_route()
82 orig_node->orig, neigh_node->addr); in _update_route()
84 } else if (neigh_node && curr_router) { in _update_route()
87 orig_node->orig, neigh_node->addr, in _update_route()
95 if (neigh_node && !atomic_inc_not_zero(&neigh_node->refcount)) in _update_route()
96 neigh_node = NULL; in _update_route()
99 rcu_assign_pointer(orig_node->router, neigh_node); in _update_route()
108 struct neigh_node *neigh_node) in update_route() argument
110 struct neigh_node *router = NULL; in update_route()
117 if (router != neigh_node) in update_route()
118 _update_route(bat_priv, orig_node, neigh_node); in update_route()
127 struct neigh_node *neigh_node) in bonding_candidate_del() argument
130 if (list_empty(&neigh_node->bonding_list)) in bonding_candidate_del()
133 list_del_rcu(&neigh_node->bonding_list); in bonding_candidate_del()
134 INIT_LIST_HEAD(&neigh_node->bonding_list); in bonding_candidate_del()
135 neigh_node_free_ref(neigh_node); in bonding_candidate_del()
143 struct neigh_node *neigh_node) in bonding_candidate_add() argument
146 struct neigh_node *tmp_neigh_node, *router = NULL; in bonding_candidate_add()
153 neigh_node->orig_node->primary_addr)) in bonding_candidate_add()
161 if (neigh_node->tq_avg < router->tq_avg - BONDING_TQ_THRESHOLD) in bonding_candidate_add()
172 if (tmp_neigh_node == neigh_node) in bonding_candidate_add()
180 if ((neigh_node->if_incoming == tmp_neigh_node->if_incoming) || in bonding_candidate_add()
181 (compare_eth(neigh_node->addr, tmp_neigh_node->addr))) { in bonding_candidate_add()
192 if (!list_empty(&neigh_node->bonding_list)) in bonding_candidate_add()
195 if (!atomic_inc_not_zero(&neigh_node->refcount)) in bonding_candidate_add()
198 list_add_rcu(&neigh_node->bonding_list, &orig_node->bond_list); in bonding_candidate_add()
203 bonding_candidate_del(orig_node, neigh_node); in bonding_candidate_add()
285 struct neigh_node *router = NULL; in recv_my_icmp_packet()
340 struct neigh_node *router = NULL; in recv_icmp_ttl_exceeded()
397 struct neigh_node *router = NULL; in recv_icmp_packet()
478 static struct neigh_node *find_bond_router(struct orig_node *primary_orig, in find_bond_router()
481 struct neigh_node *tmp_neigh_node; in find_bond_router()
482 struct neigh_node *router = NULL, *first_candidate = NULL; in find_bond_router()
529 static struct neigh_node *find_ifalter_router(struct orig_node *primary_orig, in find_ifalter_router()
532 struct neigh_node *tmp_neigh_node; in find_ifalter_router()
533 struct neigh_node *router = NULL, *first_candidate = NULL; in find_ifalter_router()
699 struct neigh_node *find_router(struct bat_priv *bat_priv, in find_router()
705 struct neigh_node *router; in find_router()
807 struct neigh_node *neigh_node = NULL; in route_unicast_packet() local
829 neigh_node = find_router(bat_priv, orig_node, recv_if); in route_unicast_packet()
831 if (!neigh_node) in route_unicast_packet()
842 skb->len > neigh_node->if_incoming->net_dev->mtu) { in route_unicast_packet()
844 neigh_node->if_incoming, neigh_node->addr); in route_unicast_packet()
849 frag_can_reassemble(skb, neigh_node->if_incoming->net_dev->mtu)) { in route_unicast_packet()
870 send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); in route_unicast_packet()
874 if (neigh_node) in route_unicast_packet()
875 neigh_node_free_ref(neigh_node); in route_unicast_packet()