Home
last modified time | relevance | path

Searched refs:hard_iface (Results 1 – 15 of 15) sorted by relevance

/net/batman-adv/
Dhard-interface.c37 struct batadv_hard_iface *hard_iface; in batadv_hardif_free_rcu() local
39 hard_iface = container_of(rcu, struct batadv_hard_iface, rcu); in batadv_hardif_free_rcu()
40 dev_put(hard_iface->net_dev); in batadv_hardif_free_rcu()
41 kfree(hard_iface); in batadv_hardif_free_rcu()
47 struct batadv_hard_iface *hard_iface; in batadv_hardif_get_by_netdev() local
50 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_hardif_get_by_netdev()
51 if (hard_iface->net_dev == net_dev && in batadv_hardif_get_by_netdev()
52 atomic_inc_not_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev()
56 hard_iface = NULL; in batadv_hardif_get_by_netdev()
60 return hard_iface; in batadv_hardif_get_by_netdev()
[all …]
Dsend.c40 struct batadv_hard_iface *hard_iface, in batadv_send_skb_packet() argument
43 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet()
46 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_send_skb_packet()
49 if (unlikely(!hard_iface->net_dev)) in batadv_send_skb_packet()
52 if (!(hard_iface->net_dev->flags & IFF_UP)) { in batadv_send_skb_packet()
54 hard_iface->net_dev->name); in batadv_send_skb_packet()
65 memcpy(ethhdr->h_source, hard_iface->net_dev->dev_addr, ETH_ALEN); in batadv_send_skb_packet()
73 skb->dev = hard_iface->net_dev; in batadv_send_skb_packet()
121 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface) in batadv_schedule_bat_ogm() argument
123 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_schedule_bat_ogm()
[all …]
Dhard-interface.h46 int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
48 void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
57 batadv_hardif_free_ref(struct batadv_hard_iface *hard_iface) in batadv_hardif_free_ref() argument
59 if (atomic_dec_and_test(&hard_iface->refcount)) in batadv_hardif_free_ref()
60 call_rcu(&hard_iface->rcu, batadv_hardif_free_rcu); in batadv_hardif_free_ref()
66 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local
69 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected()
70 if (!hard_iface) in batadv_primary_if_get_selected()
73 if (!atomic_inc_not_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
74 hard_iface = NULL; in batadv_primary_if_get_selected()
[all …]
Dbat_iv_ogm.c48 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument
55 neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr, in batadv_iv_ogm_neigh_new()
63 neigh_node->if_incoming = hard_iface; in batadv_iv_ogm_neigh_new()
73 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument
82 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable()
84 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN; in batadv_iv_ogm_iface_enable()
85 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC); in batadv_iv_ogm_iface_enable()
89 hard_iface->bat_iv.ogm_buff = ogm_buff; in batadv_iv_ogm_iface_enable()
106 static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_disable() argument
108 kfree(hard_iface->bat_iv.ogm_buff); in batadv_iv_ogm_iface_disable()
[all …]
Dsysfs.c530 struct batadv_hard_iface *hard_iface; in batadv_show_mesh_iface() local
534 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_show_mesh_iface()
535 if (!hard_iface) in batadv_show_mesh_iface()
538 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE) in batadv_show_mesh_iface()
541 ifname = hard_iface->soft_iface->name; in batadv_show_mesh_iface()
545 batadv_hardif_free_ref(hard_iface); in batadv_show_mesh_iface()
555 struct batadv_hard_iface *hard_iface; in batadv_store_mesh_iface() local
559 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_store_mesh_iface()
560 if (!hard_iface) in batadv_store_mesh_iface()
569 batadv_hardif_free_ref(hard_iface); in batadv_store_mesh_iface()
[all …]
Dsoft-interface.c523 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local
526 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add()
527 if (!hard_iface || hard_iface->soft_iface != NULL) in batadv_softif_slave_add()
530 ret = batadv_hardif_enable_interface(hard_iface, dev->name); in batadv_softif_slave_add()
533 if (hard_iface) in batadv_softif_slave_add()
534 batadv_hardif_free_ref(hard_iface); in batadv_softif_slave_add()
548 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local
551 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del()
553 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del()
556 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del()
[all …]
Dmain.c197 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local
200 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac()
201 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac()
204 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac()
207 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac()
267 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local
271 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv()
287 if (!hard_iface->soft_iface) in batadv_batman_skb_recv()
290 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv()
296 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_batman_skb_recv()
[all …]
Dsend.h24 struct batadv_hard_iface *hard_iface,
29 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface);
36 const struct batadv_hard_iface *hard_iface);
Doriginator.c94 batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, in batadv_neigh_node_new() argument
97 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_neigh_node_new()
530 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface, in batadv_orig_hash_add_if() argument
533 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_orig_hash_add_if()
613 int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface, in batadv_orig_hash_del_if() argument
616 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_orig_hash_del_if()
634 hard_iface->if_num); in batadv_orig_hash_del_if()
649 if (hard_iface == hard_iface_tmp) in batadv_orig_hash_del_if()
652 if (hard_iface->soft_iface != hard_iface_tmp->soft_iface) in batadv_orig_hash_del_if()
655 if (hard_iface_tmp->if_num > hard_iface->if_num) in batadv_orig_hash_del_if()
[all …]
Doriginator.h33 batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
39 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface,
41 int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface,
Dtypes.h953 int (*bat_iface_enable)(struct batadv_hard_iface *hard_iface);
954 void (*bat_iface_disable)(struct batadv_hard_iface *hard_iface);
955 void (*bat_iface_update_mac)(struct batadv_hard_iface *hard_iface);
956 void (*bat_primary_iface_set)(struct batadv_hard_iface *hard_iface);
957 void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface);
Drouting.h23 void batadv_slide_own_bcast_window(struct batadv_hard_iface *hard_iface);
25 struct batadv_hard_iface *hard_iface,
Dunicast.c225 struct batadv_hard_iface *hard_iface, in batadv_frag_send_skb() argument
273 seqno = atomic_add_return(2, &hard_iface->frag_seqno); in batadv_frag_send_skb()
277 batadv_send_skb_packet(skb, hard_iface, dstaddr); in batadv_frag_send_skb()
278 batadv_send_skb_packet(frag_skb, hard_iface, dstaddr); in batadv_frag_send_skb()
Dunicast.h33 struct batadv_hard_iface *hard_iface,
Drouting.c37 void batadv_slide_own_bcast_window(struct batadv_hard_iface *hard_iface) in batadv_slide_own_bcast_window() argument
39 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_slide_own_bcast_window()
54 word_index = hard_iface->if_num * BATADV_NUM_WORDS; in batadv_slide_own_bcast_window()
58 w = &orig_node->bcast_own_sum[hard_iface->if_num]; in batadv_slide_own_bcast_window()
250 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument