Lines Matching refs:orig_node

142 	struct batadv_orig_node *orig_node;  in batadv_iv_ogm_orig_get()  local
145 orig_node = batadv_orig_hash_find(bat_priv, addr); in batadv_iv_ogm_orig_get()
146 if (orig_node) in batadv_iv_ogm_orig_get()
147 return orig_node; in batadv_iv_ogm_orig_get()
149 orig_node = batadv_orig_node_new(bat_priv, addr); in batadv_iv_ogm_orig_get()
150 if (!orig_node) in batadv_iv_ogm_orig_get()
153 spin_lock_init(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_orig_get()
155 kref_get(&orig_node->refcount); in batadv_iv_ogm_orig_get()
157 batadv_choose_orig, orig_node, in batadv_iv_ogm_orig_get()
158 &orig_node->hash_entry); in batadv_iv_ogm_orig_get()
162 return orig_node; in batadv_iv_ogm_orig_get()
166 batadv_orig_node_put(orig_node); in batadv_iv_ogm_orig_get()
168 batadv_orig_node_put(orig_node); in batadv_iv_ogm_orig_get()
176 struct batadv_orig_node *orig_node, in batadv_iv_ogm_neigh_new() argument
181 neigh_node = batadv_neigh_node_get_or_create(orig_node, in batadv_iv_ogm_neigh_new()
186 neigh_node->orig_node = orig_neigh; in batadv_iv_ogm_neigh_new()
682 static void batadv_iv_ogm_forward(struct batadv_orig_node *orig_node, in batadv_iv_ogm_forward() argument
746 struct batadv_orig_node *orig_node; in batadv_iv_ogm_slide_own_bcast_window() local
756 hlist_for_each_entry_rcu(orig_node, head, hash_entry) { in batadv_iv_ogm_slide_own_bcast_window()
758 &orig_node->ifinfo_list, in batadv_iv_ogm_slide_own_bcast_window()
763 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_slide_own_bcast_window()
769 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_slide_own_bcast_window()
883 static u8 batadv_iv_orig_ifinfo_sum(struct batadv_orig_node *orig_node, in batadv_iv_orig_ifinfo_sum() argument
889 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, if_outgoing); in batadv_iv_orig_ifinfo_sum()
893 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_orig_ifinfo_sum()
895 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_orig_ifinfo_sum()
916 struct batadv_orig_node *orig_node, in batadv_iv_ogm_orig_update() argument
939 &orig_node->neigh_list, list) { in batadv_iv_ogm_orig_update()
979 orig_node, orig_tmp); in batadv_iv_ogm_orig_update()
1012 router = batadv_orig_router_get(orig_node, if_outgoing); in batadv_iv_ogm_orig_update()
1033 sum_orig = batadv_iv_orig_ifinfo_sum(router->orig_node, in batadv_iv_ogm_orig_update()
1035 sum_neigh = batadv_iv_orig_ifinfo_sum(neigh_node->orig_node, in batadv_iv_ogm_orig_update()
1041 batadv_update_route(bat_priv, orig_node, if_outgoing, neigh_node); in batadv_iv_ogm_orig_update()
1063 static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, in batadv_iv_ogm_calc_tq() argument
1109 if (orig_node == orig_neigh_node) in batadv_iv_ogm_calc_tq()
1112 orig_node->last_seen = jiffies; in batadv_iv_ogm_calc_tq()
1178 orig_node->orig, orig_neigh_node->orig, total_count, in batadv_iv_ogm_calc_tq()
1212 struct batadv_orig_node *orig_node; in batadv_iv_ogm_update_seqnos() local
1226 orig_node = batadv_iv_ogm_orig_get(bat_priv, batadv_ogm_packet->orig); in batadv_iv_ogm_update_seqnos()
1227 if (!orig_node) in batadv_iv_ogm_update_seqnos()
1230 orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); in batadv_iv_ogm_update_seqnos()
1232 batadv_orig_node_put(orig_node); in batadv_iv_ogm_update_seqnos()
1236 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_update_seqnos()
1240 if (!hlist_empty(&orig_node->neigh_list) && in batadv_iv_ogm_update_seqnos()
1249 hlist_for_each_entry_rcu(neigh_node, &orig_node->neigh_list, list) { in batadv_iv_ogm_update_seqnos()
1292 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_update_seqnos()
1293 batadv_orig_node_put(orig_node); in batadv_iv_ogm_update_seqnos()
1309 struct batadv_orig_node *orig_node, in batadv_iv_ogm_process_per_outif() argument
1366 router = batadv_orig_router_get(orig_node, if_outgoing); in batadv_iv_ogm_process_per_outif()
1368 router_router = batadv_orig_router_get(router->orig_node, in batadv_iv_ogm_process_per_outif()
1390 batadv_tvlv_ogm_receive(bat_priv, ogm_packet, orig_node); in batadv_iv_ogm_process_per_outif()
1396 orig_neigh_node = orig_node; in batadv_iv_ogm_process_per_outif()
1405 batadv_nc_update_nc_node(bat_priv, orig_node, orig_neigh_node, in batadv_iv_ogm_process_per_outif()
1420 is_bidirect = batadv_iv_ogm_calc_tq(orig_node, orig_neigh_node, in batadv_iv_ogm_process_per_outif()
1427 orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); in batadv_iv_ogm_process_per_outif()
1436 batadv_iv_ogm_orig_update(bat_priv, orig_node, in batadv_iv_ogm_process_per_outif()
1459 batadv_iv_ogm_forward(orig_node, ethhdr, ogm_packet, in batadv_iv_ogm_process_per_outif()
1484 batadv_iv_ogm_forward(orig_node, ethhdr, ogm_packet, in batadv_iv_ogm_process_per_outif()
1510 struct batadv_orig_node *orig_node, in batadv_iv_ogm_process_reply() argument
1527 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, if_incoming); in batadv_iv_ogm_process_reply()
1532 spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_process_reply()
1539 spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); in batadv_iv_ogm_process_reply()
1554 struct batadv_orig_node *orig_neigh_node, *orig_node; in batadv_iv_ogm_process() local
1656 orig_node = batadv_iv_ogm_orig_get(bat_priv, ogm_packet->orig); in batadv_iv_ogm_process()
1657 if (!orig_node) in batadv_iv_ogm_process()
1660 batadv_iv_ogm_process_per_outif(skb, ogm_offset, orig_node, in batadv_iv_ogm_process()
1674 batadv_iv_ogm_process_per_outif(skb, ogm_offset, orig_node, in batadv_iv_ogm_process()
1681 batadv_orig_node_put(orig_node); in batadv_iv_ogm_process()
1816 struct batadv_orig_node *orig_node, in batadv_iv_ogm_orig_dump_subentry() argument
1824 last_seen_msecs = jiffies_to_msecs(jiffies - orig_node->last_seen); in batadv_iv_ogm_orig_dump_subentry()
1839 orig_node->orig) || in batadv_iv_ogm_orig_dump_subentry()
1880 struct batadv_orig_node *orig_node, int *sub_s) in batadv_iv_ogm_orig_dump_entry() argument
1888 neigh_node_best = batadv_orig_router_get(orig_node, if_outgoing); in batadv_iv_ogm_orig_dump_entry()
1899 hlist_for_each_entry_rcu(neigh_node, &orig_node->neigh_list, list) { in batadv_iv_ogm_orig_dump_entry()
1907 orig_node, neigh_node, in batadv_iv_ogm_orig_dump_entry()
1943 struct batadv_orig_node *orig_node; in batadv_iv_ogm_orig_dump_bucket() local
1947 hlist_for_each_entry_rcu(orig_node, head, hash_entry) { in batadv_iv_ogm_orig_dump_bucket()
1952 if_outgoing, orig_node, in batadv_iv_ogm_orig_dump_bucket()
2258 struct batadv_orig_node *orig_node; in batadv_iv_gw_get_best_gw_node() local
2262 orig_node = gw_node->orig_node; in batadv_iv_gw_get_best_gw_node()
2263 router = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_get_best_gw_node()
2327 struct batadv_orig_node *orig_node) in batadv_iv_gw_is_eligible() argument
2353 router_orig = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_is_eligible()
2411 router = batadv_orig_router_get(gw_node->orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_dump_entry()
2440 gw_node->orig_node->orig) || in batadv_iv_gw_dump_entry()