Lines Matching refs:orig_node
67 struct batadv_orig_node *orig_node);
72 struct batadv_orig_node *orig_node,
365 static void batadv_tt_global_size_mod(struct batadv_orig_node *orig_node, in batadv_tt_global_size_mod() argument
370 vlan = batadv_orig_node_vlan_new(orig_node, vid); in batadv_tt_global_size_mod()
375 spin_lock_bh(&orig_node->vlan_list_lock); in batadv_tt_global_size_mod()
380 spin_unlock_bh(&orig_node->vlan_list_lock); in batadv_tt_global_size_mod()
392 static void batadv_tt_global_size_inc(struct batadv_orig_node *orig_node, in batadv_tt_global_size_inc() argument
395 batadv_tt_global_size_mod(orig_node, vid, 1); in batadv_tt_global_size_inc()
404 static void batadv_tt_global_size_dec(struct batadv_orig_node *orig_node, in batadv_tt_global_size_dec() argument
407 batadv_tt_global_size_mod(orig_node, vid, -1); in batadv_tt_global_size_dec()
435 batadv_orig_node_put(orig_entry->orig_node); in batadv_tt_orig_list_entry_release()
771 orig_entry->orig_node); in batadv_tt_local_add()
841 batadv_tt_prepare_tvlv_global_data(struct batadv_orig_node *orig_node, in batadv_tt_prepare_tvlv_global_data() argument
854 spin_lock_bh(&orig_node->vlan_list_lock); in batadv_tt_prepare_tvlv_global_data()
855 hlist_for_each_entry(vlan, &orig_node->vlan_list, list) { in batadv_tt_prepare_tvlv_global_data()
877 (*tt_data)->ttvn = atomic_read(&orig_node->last_ttvn); in batadv_tt_prepare_tvlv_global_data()
881 hlist_for_each_entry(vlan, &orig_node->vlan_list, list) { in batadv_tt_prepare_tvlv_global_data()
893 spin_unlock_bh(&orig_node->vlan_list_lock); in batadv_tt_prepare_tvlv_global_data()
1443 const struct batadv_orig_node *orig_node) in batadv_tt_global_orig_entry_find() argument
1451 if (tmp_orig_entry->orig_node != orig_node) in batadv_tt_global_orig_entry_find()
1478 const struct batadv_orig_node *orig_node, in batadv_tt_global_entry_has_orig() argument
1484 orig_entry = batadv_tt_global_orig_entry_find(entry, orig_node); in batadv_tt_global_entry_has_orig()
1530 struct batadv_orig_node *orig_node, int ttvn, in batadv_tt_global_orig_entry_add() argument
1537 orig_entry = batadv_tt_global_orig_entry_find(tt_global, orig_node); in batadv_tt_global_orig_entry_add()
1552 kref_get(&orig_node->refcount); in batadv_tt_global_orig_entry_add()
1553 batadv_tt_global_size_inc(orig_node, tt_global->common.vid); in batadv_tt_global_orig_entry_add()
1554 orig_entry->orig_node = orig_node; in batadv_tt_global_orig_entry_add()
1592 struct batadv_orig_node *orig_node, in batadv_tt_global_add() argument
1604 if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig, vid)) in batadv_tt_global_add()
1672 orig_node, NULL)) in batadv_tt_global_add()
1711 batadv_tt_global_orig_entry_add(tt_global_entry, orig_node, ttvn, in batadv_tt_global_add()
1717 orig_node->orig); in batadv_tt_global_add()
1764 router = batadv_orig_router_get(orig_entry->orig_node, in batadv_transtable_best_orig()
1811 vlan = batadv_orig_node_vlan_get(orig->orig_node, in batadv_tt_global_dump_subentry()
1826 last_ttvn = atomic_read(&orig->orig_node->last_ttvn); in batadv_tt_global_dump_subentry()
1830 orig->orig_node->orig) || in batadv_tt_global_dump_subentry()
2016 batadv_tt_global_size_dec(orig_entry->orig_node, in _batadv_tt_global_del_orig_entry()
2054 struct batadv_orig_node *orig_node, in batadv_tt_global_del_orig_node() argument
2065 if (orig_entry->orig_node == orig_node) { in batadv_tt_global_del_orig_node()
2069 orig_node->orig, in batadv_tt_global_del_orig_node()
2086 struct batadv_orig_node *orig_node, in batadv_tt_global_del_roaming() argument
2100 if (orig_entry->orig_node != orig_node) { in batadv_tt_global_del_roaming()
2116 orig_node, message); in batadv_tt_global_del_roaming()
2131 struct batadv_orig_node *orig_node, in batadv_tt_global_del() argument
2144 orig_node, message); in batadv_tt_global_del()
2176 orig_node, message); in batadv_tt_global_del()
2194 struct batadv_orig_node *orig_node, in batadv_tt_global_del_orig() argument
2226 orig_node, message); in batadv_tt_global_del_orig()
2240 clear_bit(BATADV_ORIG_CAPA_HAS_TT, &orig_node->capa_initialized); in batadv_tt_global_del_orig()
2377 struct batadv_orig_node *orig_node = NULL; in batadv_transtable_search() local
2402 orig_node = best_entry->orig_node; in batadv_transtable_search()
2403 if (orig_node && !kref_get_unless_zero(&orig_node->refcount)) in batadv_transtable_search()
2404 orig_node = NULL; in batadv_transtable_search()
2411 return orig_node; in batadv_transtable_search()
2439 struct batadv_orig_node *orig_node, in batadv_tt_global_crc() argument
2483 orig_node); in batadv_tt_global_crc()
2608 struct batadv_orig_node *orig_node, in batadv_tt_save_orig_buffer() argument
2615 spin_lock_bh(&orig_node->tt_buff_lock); in batadv_tt_save_orig_buffer()
2617 kfree(orig_node->tt_buff); in batadv_tt_save_orig_buffer()
2618 orig_node->tt_buff_len = 0; in batadv_tt_save_orig_buffer()
2619 orig_node->tt_buff = kmalloc(tt_buff_len, GFP_ATOMIC); in batadv_tt_save_orig_buffer()
2620 if (orig_node->tt_buff) { in batadv_tt_save_orig_buffer()
2621 memcpy(orig_node->tt_buff, tt_buff, tt_buff_len); in batadv_tt_save_orig_buffer()
2622 orig_node->tt_buff_len = tt_buff_len; in batadv_tt_save_orig_buffer()
2625 spin_unlock_bh(&orig_node->tt_buff_lock); in batadv_tt_save_orig_buffer()
2654 struct batadv_orig_node *orig_node) in batadv_tt_req_node_new() argument
2660 if (batadv_compare_eth(tt_req_node_tmp, orig_node) && in batadv_tt_req_node_new()
2671 ether_addr_copy(tt_req_node->addr, orig_node->orig); in batadv_tt_req_node_new()
2725 const struct batadv_orig_node *orig_node = data_ptr; in batadv_tt_global_valid() local
2735 return batadv_tt_global_entry_has_orig(tt_global_entry, orig_node, in batadv_tt_global_valid()
2809 static bool batadv_tt_global_check_crc(struct batadv_orig_node *orig_node, in batadv_tt_global_check_crc() argument
2825 if (batadv_bla_is_backbone_gw_orig(orig_node->bat_priv, in batadv_tt_global_check_crc()
2826 orig_node->orig, in batadv_tt_global_check_crc()
2830 vlan = batadv_orig_node_vlan_get(orig_node, in batadv_tt_global_check_crc()
2847 hlist_for_each_entry_rcu(vlan, &orig_node->vlan_list, list) in batadv_tt_global_check_crc()
2879 struct batadv_orig_node *orig_node) in batadv_tt_global_update_crc() argument
2886 hlist_for_each_entry_rcu(vlan, &orig_node->vlan_list, list) { in batadv_tt_global_update_crc()
2890 if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig, in batadv_tt_global_update_crc()
2894 crc = batadv_tt_global_crc(bat_priv, orig_node, vlan->vid); in batadv_tt_global_update_crc()
3134 struct batadv_orig_node *orig_node; in batadv_send_my_tt_response() local
3150 orig_node = batadv_orig_hash_find(bat_priv, req_src); in batadv_send_my_tt_response()
3151 if (!orig_node) in batadv_send_my_tt_response()
3213 orig_node->orig, full_table ? 'F' : '.', req_ttvn); in batadv_send_my_tt_response()
3227 batadv_orig_node_put(orig_node); in batadv_send_my_tt_response()
3254 struct batadv_orig_node *orig_node, in _batadv_tt_update_changes() argument
3264 batadv_tt_global_del(bat_priv, orig_node, in _batadv_tt_update_changes()
3270 if (!batadv_tt_global_add(bat_priv, orig_node, in _batadv_tt_update_changes()
3283 set_bit(BATADV_ORIG_CAPA_HAS_TT, &orig_node->capa_initialized); in _batadv_tt_update_changes()
3291 struct batadv_orig_node *orig_node; in batadv_tt_fill_gtable() local
3293 orig_node = batadv_orig_hash_find(bat_priv, resp_src); in batadv_tt_fill_gtable()
3294 if (!orig_node) in batadv_tt_fill_gtable()
3298 batadv_tt_global_del_orig(bat_priv, orig_node, -1, in batadv_tt_fill_gtable()
3301 _batadv_tt_update_changes(bat_priv, orig_node, tt_change, num_entries, in batadv_tt_fill_gtable()
3304 spin_lock_bh(&orig_node->tt_buff_lock); in batadv_tt_fill_gtable()
3305 kfree(orig_node->tt_buff); in batadv_tt_fill_gtable()
3306 orig_node->tt_buff_len = 0; in batadv_tt_fill_gtable()
3307 orig_node->tt_buff = NULL; in batadv_tt_fill_gtable()
3308 spin_unlock_bh(&orig_node->tt_buff_lock); in batadv_tt_fill_gtable()
3310 atomic_set(&orig_node->last_ttvn, ttvn); in batadv_tt_fill_gtable()
3313 batadv_orig_node_put(orig_node); in batadv_tt_fill_gtable()
3317 struct batadv_orig_node *orig_node, in batadv_tt_update_changes() argument
3321 _batadv_tt_update_changes(bat_priv, orig_node, tt_change, in batadv_tt_update_changes()
3324 batadv_tt_save_orig_buffer(bat_priv, orig_node, tt_change, in batadv_tt_update_changes()
3326 atomic_set(&orig_node->last_ttvn, ttvn); in batadv_tt_update_changes()
3371 struct batadv_orig_node *orig_node = NULL; in batadv_handle_tt_response() local
3381 orig_node = batadv_orig_hash_find(bat_priv, resp_src); in batadv_handle_tt_response()
3382 if (!orig_node) in batadv_handle_tt_response()
3385 spin_lock_bh(&orig_node->tt_lock); in batadv_handle_tt_response()
3397 batadv_tt_update_changes(bat_priv, orig_node, num_entries, in batadv_handle_tt_response()
3402 batadv_tt_global_update_crc(bat_priv, orig_node); in batadv_handle_tt_response()
3404 spin_unlock_bh(&orig_node->tt_lock); in batadv_handle_tt_response()
3417 batadv_orig_node_put(orig_node); in batadv_handle_tt_response()
3519 struct batadv_orig_node *orig_node) in batadv_send_roam_adv() argument
3536 orig_node->orig, client, batadv_print_vid(vid)); in batadv_send_roam_adv()
3544 orig_node->orig, BATADV_TVLV_ROAM, 1, in batadv_send_roam_adv()
3778 struct batadv_orig_node *orig_node, in batadv_tt_update_orig() argument
3783 u8 orig_ttvn = (u8)atomic_read(&orig_node->last_ttvn); in batadv_tt_update_orig()
3790 &orig_node->capa_initialized); in batadv_tt_update_orig()
3806 spin_lock_bh(&orig_node->tt_lock); in batadv_tt_update_orig()
3808 batadv_tt_update_changes(bat_priv, orig_node, tt_num_changes, in batadv_tt_update_orig()
3815 batadv_tt_global_update_crc(bat_priv, orig_node); in batadv_tt_update_orig()
3817 spin_unlock_bh(&orig_node->tt_lock); in batadv_tt_update_orig()
3828 if (!batadv_tt_global_check_crc(orig_node, tt_vlan, in batadv_tt_update_orig()
3836 !batadv_tt_global_check_crc(orig_node, tt_vlan, in batadv_tt_update_orig()
3841 orig_node->orig, ttvn, orig_ttvn, in batadv_tt_update_orig()
3843 batadv_send_tt_request(bat_priv, orig_node, ttvn, in batadv_tt_update_orig()
3913 struct batadv_orig_node *orig_node, in batadv_tt_add_temporary_global_entry() argument
3923 if (!batadv_tt_global_add(bat_priv, orig_node, addr, vid, in batadv_tt_add_temporary_global_entry()
3925 atomic_read(&orig_node->last_ttvn))) in batadv_tt_add_temporary_global_entry()
3930 addr, batadv_print_vid(vid), orig_node->orig); in batadv_tt_add_temporary_global_entry()
4115 struct batadv_orig_node *orig_node = NULL; in batadv_roam_tvlv_unicast_handler_v1() local
4127 orig_node = batadv_orig_hash_find(bat_priv, src); in batadv_roam_tvlv_unicast_handler_v1()
4128 if (!orig_node) in batadv_roam_tvlv_unicast_handler_v1()
4138 batadv_tt_global_add(bat_priv, orig_node, roaming_adv->client, in batadv_roam_tvlv_unicast_handler_v1()
4140 atomic_read(&orig_node->last_ttvn) + 1); in batadv_roam_tvlv_unicast_handler_v1()
4143 batadv_orig_node_put(orig_node); in batadv_roam_tvlv_unicast_handler_v1()