Lines Matching full:router
45 * _batadv_update_route() - set the router for this originator
49 * @neigh_node: neighbor which should be the next router
66 /* curr_router used earlier may not be the current orig_ifinfo->router in _batadv_update_route()
78 curr_router = rcu_replace_pointer(orig_ifinfo->router, neigh_node, in _batadv_update_route()
108 * batadv_update_route() - set the router for this originator
112 * @neigh_node: neighbor which should be the next router
119 struct batadv_neigh_node *router = NULL; in batadv_update_route() local
124 router = batadv_orig_router_get(orig_node, recv_if); in batadv_update_route()
126 if (router != neigh_node) in batadv_update_route()
130 batadv_neigh_node_put(router); in batadv_update_route()
471 * Return: last bonding candidate of router or NULL if not found
513 * batadv_find_router() - find a suitable router for this originator
518 * Return: the router which should be used for this orig_node on
529 struct batadv_neigh_node *router, *cand_router = NULL; in batadv_find_router() local
539 router = batadv_orig_router_get(orig_node, recv_if); in batadv_find_router()
541 if (!router) in batadv_find_router()
542 return router; in batadv_find_router()
548 return router; in batadv_find_router()
553 * router is found, use the first candidate found (the previously in batadv_find_router()
556 * router - obviously there are no other candidates. in batadv_find_router()
561 last_cand_router = rcu_dereference(last_candidate->router); in batadv_find_router()
568 cand_router = rcu_dereference(cand->router); in batadv_find_router()
581 cand->if_outgoing, router, in batadv_find_router()
585 /* don't use the same router twice */ in batadv_find_router()
622 * 3) there is no candidate at all, return the default router in batadv_find_router()
625 batadv_neigh_node_put(router); in batadv_find_router()
628 router = next_candidate_router; in batadv_find_router()
631 batadv_neigh_node_put(router); in batadv_find_router()
634 router = first_candidate_router; in batadv_find_router()
653 return router; in batadv_find_router()