Lines Matching full:router
58 * _batadv_update_route() - set the router for this originator
62 * @neigh_node: neighbor which should be the next router
79 /* curr_router used earlier may not be the current orig_ifinfo->router in _batadv_update_route()
86 curr_router = rcu_dereference_protected(orig_ifinfo->router, true); in _batadv_update_route()
92 rcu_assign_pointer(orig_ifinfo->router, neigh_node); in _batadv_update_route()
122 * batadv_update_route() - set the router for this originator
126 * @neigh_node: neighbor which should be the next router
133 struct batadv_neigh_node *router = NULL; in batadv_update_route() local
138 router = batadv_orig_router_get(orig_node, recv_if); in batadv_update_route()
140 if (router != neigh_node) in batadv_update_route()
144 if (router) in batadv_update_route()
145 batadv_neigh_node_put(router); in batadv_update_route()
500 * Return: last bonding candidate of router or NULL if not found
543 * batadv_find_router() - find a suitable router for this originator
548 * Return: the router which should be used for this orig_node on
559 struct batadv_neigh_node *router, *cand_router = NULL; in batadv_find_router() local
569 router = batadv_orig_router_get(orig_node, recv_if); in batadv_find_router()
571 if (!router) in batadv_find_router()
572 return router; in batadv_find_router()
578 return router; in batadv_find_router()
583 * router is found, use the first candidate found (the previously in batadv_find_router()
586 * router - obviously there are no other candidates. in batadv_find_router()
591 last_cand_router = rcu_dereference(last_candidate->router); in batadv_find_router()
598 cand_router = rcu_dereference(cand->router); in batadv_find_router()
611 cand->if_outgoing, router, in batadv_find_router()
615 /* don't use the same router twice */ in batadv_find_router()
652 * 3) there is no candidate at all, return the default router in batadv_find_router()
655 batadv_neigh_node_put(router); in batadv_find_router()
658 router = next_candidate_router; in batadv_find_router()
661 batadv_neigh_node_put(router); in batadv_find_router()
664 router = first_candidate_router; in batadv_find_router()
684 return router; in batadv_find_router()