Lines Matching refs:orig_node
143 struct batadv_orig_node *orig_node; in batadv_iv_ogm_orig_get() local
146 orig_node = batadv_orig_hash_find(bat_priv, addr); in batadv_iv_ogm_orig_get()
147 if (orig_node) in batadv_iv_ogm_orig_get()
148 return orig_node; in batadv_iv_ogm_orig_get()
150 orig_node = batadv_orig_node_new(bat_priv, addr); in batadv_iv_ogm_orig_get()
151 if (!orig_node) in batadv_iv_ogm_orig_get()
154 spin_lock_init(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_orig_get()
156 kref_get(&orig_node->refcount); in batadv_iv_ogm_orig_get()
158 batadv_choose_orig, orig_node, in batadv_iv_ogm_orig_get()
159 &orig_node->hash_entry); in batadv_iv_ogm_orig_get()
163 return orig_node; in batadv_iv_ogm_orig_get()
167 batadv_orig_node_put(orig_node); in batadv_iv_ogm_orig_get()
169 batadv_orig_node_put(orig_node); in batadv_iv_ogm_orig_get()
177 struct batadv_orig_node *orig_node, in batadv_iv_ogm_neigh_new() argument
182 neigh_node = batadv_neigh_node_get_or_create(orig_node, in batadv_iv_ogm_neigh_new()
187 neigh_node->orig_node = orig_neigh; in batadv_iv_ogm_neigh_new()
684 static void batadv_iv_ogm_forward(struct batadv_orig_node *orig_node, in batadv_iv_ogm_forward() argument
748 struct batadv_orig_node *orig_node; in batadv_iv_ogm_slide_own_bcast_window() local
758 hlist_for_each_entry_rcu(orig_node, head, hash_entry) { in batadv_iv_ogm_slide_own_bcast_window()
760 &orig_node->ifinfo_list, in batadv_iv_ogm_slide_own_bcast_window()
765 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_slide_own_bcast_window()
771 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_slide_own_bcast_window()
886 static u8 batadv_iv_orig_ifinfo_sum(struct batadv_orig_node *orig_node, in batadv_iv_orig_ifinfo_sum() argument
892 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, if_outgoing); in batadv_iv_orig_ifinfo_sum()
896 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_orig_ifinfo_sum()
898 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_orig_ifinfo_sum()
919 struct batadv_orig_node *orig_node, in batadv_iv_ogm_orig_update() argument
942 &orig_node->neigh_list, list) { in batadv_iv_ogm_orig_update()
982 orig_node, orig_tmp); in batadv_iv_ogm_orig_update()
1015 router = batadv_orig_router_get(orig_node, if_outgoing); in batadv_iv_ogm_orig_update()
1036 sum_orig = batadv_iv_orig_ifinfo_sum(router->orig_node, in batadv_iv_ogm_orig_update()
1038 sum_neigh = batadv_iv_orig_ifinfo_sum(neigh_node->orig_node, in batadv_iv_ogm_orig_update()
1044 batadv_update_route(bat_priv, orig_node, if_outgoing, neigh_node); in batadv_iv_ogm_orig_update()
1070 static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, in batadv_iv_ogm_calc_tq() argument
1116 if (orig_node == orig_neigh_node) in batadv_iv_ogm_calc_tq()
1119 orig_node->last_seen = jiffies; in batadv_iv_ogm_calc_tq()
1185 orig_node->orig, orig_neigh_node->orig, total_count, in batadv_iv_ogm_calc_tq()
1220 struct batadv_orig_node *orig_node; in batadv_iv_ogm_update_seqnos() local
1234 orig_node = batadv_iv_ogm_orig_get(bat_priv, batadv_ogm_packet->orig); in batadv_iv_ogm_update_seqnos()
1235 if (!orig_node) in batadv_iv_ogm_update_seqnos()
1238 orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); in batadv_iv_ogm_update_seqnos()
1240 batadv_orig_node_put(orig_node); in batadv_iv_ogm_update_seqnos()
1244 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_update_seqnos()
1248 if (!hlist_empty(&orig_node->neigh_list) && in batadv_iv_ogm_update_seqnos()
1257 hlist_for_each_entry_rcu(neigh_node, &orig_node->neigh_list, list) { in batadv_iv_ogm_update_seqnos()
1300 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_update_seqnos()
1301 batadv_orig_node_put(orig_node); in batadv_iv_ogm_update_seqnos()
1317 struct batadv_orig_node *orig_node, in batadv_iv_ogm_process_per_outif() argument
1374 router = batadv_orig_router_get(orig_node, if_outgoing); in batadv_iv_ogm_process_per_outif()
1376 router_router = batadv_orig_router_get(router->orig_node, in batadv_iv_ogm_process_per_outif()
1398 batadv_tvlv_ogm_receive(bat_priv, ogm_packet, orig_node); in batadv_iv_ogm_process_per_outif()
1404 orig_neigh_node = orig_node; in batadv_iv_ogm_process_per_outif()
1413 batadv_nc_update_nc_node(bat_priv, orig_node, orig_neigh_node, in batadv_iv_ogm_process_per_outif()
1428 is_bidirect = batadv_iv_ogm_calc_tq(orig_node, orig_neigh_node, in batadv_iv_ogm_process_per_outif()
1435 orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); in batadv_iv_ogm_process_per_outif()
1444 batadv_iv_ogm_orig_update(bat_priv, orig_node, in batadv_iv_ogm_process_per_outif()
1467 batadv_iv_ogm_forward(orig_node, ethhdr, ogm_packet, in batadv_iv_ogm_process_per_outif()
1492 batadv_iv_ogm_forward(orig_node, ethhdr, ogm_packet, in batadv_iv_ogm_process_per_outif()
1523 struct batadv_orig_node *orig_node, in batadv_iv_ogm_process_reply() argument
1540 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, if_incoming); in batadv_iv_ogm_process_reply()
1545 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_process_reply()
1552 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_process_reply()
1567 struct batadv_orig_node *orig_neigh_node, *orig_node; in batadv_iv_ogm_process() local
1669 orig_node = batadv_iv_ogm_orig_get(bat_priv, ogm_packet->orig); in batadv_iv_ogm_process()
1670 if (!orig_node) in batadv_iv_ogm_process()
1673 batadv_iv_ogm_process_per_outif(skb, ogm_offset, orig_node, in batadv_iv_ogm_process()
1687 batadv_iv_ogm_process_per_outif(skb, ogm_offset, orig_node, in batadv_iv_ogm_process()
1694 batadv_orig_node_put(orig_node); in batadv_iv_ogm_process()
1795 batadv_iv_ogm_orig_print_neigh(struct batadv_orig_node *orig_node, in batadv_iv_ogm_orig_print_neigh() argument
1802 hlist_for_each_entry_rcu(neigh_node, &orig_node->neigh_list, list) { in batadv_iv_ogm_orig_print_neigh()
1828 struct batadv_orig_node *orig_node; in batadv_iv_ogm_orig_print() local
1842 hlist_for_each_entry_rcu(orig_node, head, hash_entry) { in batadv_iv_ogm_orig_print()
1843 neigh_node = batadv_orig_router_get(orig_node, in batadv_iv_ogm_orig_print()
1856 last_seen_jiffies = jiffies - orig_node->last_seen; in batadv_iv_ogm_orig_print()
1862 orig_node->orig, last_seen_secs, in batadv_iv_ogm_orig_print()
1867 batadv_iv_ogm_orig_print_neigh(orig_node, if_outgoing, in batadv_iv_ogm_orig_print()
1929 struct batadv_orig_node *orig_node, in batadv_iv_ogm_orig_dump_subentry() argument
1937 last_seen_msecs = jiffies_to_msecs(jiffies - orig_node->last_seen); in batadv_iv_ogm_orig_dump_subentry()
1952 orig_node->orig) || in batadv_iv_ogm_orig_dump_subentry()
1991 struct batadv_orig_node *orig_node, int *sub_s) in batadv_iv_ogm_orig_dump_entry() argument
1999 neigh_node_best = batadv_orig_router_get(orig_node, if_outgoing); in batadv_iv_ogm_orig_dump_entry()
2010 hlist_for_each_entry_rcu(neigh_node, &orig_node->neigh_list, list) { in batadv_iv_ogm_orig_dump_entry()
2018 orig_node, neigh_node, in batadv_iv_ogm_orig_dump_entry()
2055 struct batadv_orig_node *orig_node; in batadv_iv_ogm_orig_dump_bucket() local
2059 hlist_for_each_entry_rcu(orig_node, head, hash_entry) { in batadv_iv_ogm_orig_dump_bucket()
2064 if_outgoing, orig_node, in batadv_iv_ogm_orig_dump_bucket()
2423 struct batadv_orig_node *orig_node; in batadv_iv_gw_get_best_gw_node() local
2427 orig_node = gw_node->orig_node; in batadv_iv_gw_get_best_gw_node()
2428 router = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_get_best_gw_node()
2495 struct batadv_orig_node *orig_node) in batadv_iv_gw_is_eligible() argument
2521 router_orig = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_is_eligible()
2573 router = batadv_orig_router_get(gw_node->orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_write_buffer_text()
2585 gw_node->orig_node->orig, in batadv_iv_gw_write_buffer_text()
2649 router = batadv_orig_router_get(gw_node->orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_dump_entry()
2678 gw_node->orig_node->orig) || in batadv_iv_gw_dump_entry()