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 …]
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,
61 batadv_hardif_free_ref(struct batadv_hard_iface *hard_iface) in batadv_hardif_free_ref() argument
63 if (atomic_dec_and_test(&hard_iface->refcount)) in batadv_hardif_free_ref()
64 call_rcu(&hard_iface->rcu, batadv_hardif_free_rcu); in batadv_hardif_free_ref()
73 batadv_hardif_free_ref_now(struct batadv_hard_iface *hard_iface) in batadv_hardif_free_ref_now() argument
75 if (atomic_dec_and_test(&hard_iface->refcount)) in batadv_hardif_free_ref_now()
76 batadv_hardif_free_rcu(&hard_iface->rcu); in batadv_hardif_free_ref_now()
82 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local
85 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected()
[all …]
Dsend.c38 struct batadv_hard_iface *hard_iface, in batadv_send_skb_packet() argument
41 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet()
44 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_send_skb_packet()
47 if (unlikely(!hard_iface->net_dev)) in batadv_send_skb_packet()
50 if (!(hard_iface->net_dev->flags & IFF_UP)) { in batadv_send_skb_packet()
52 hard_iface->net_dev->name); in batadv_send_skb_packet()
63 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet()
70 skb->dev = hard_iface->net_dev; in batadv_send_skb_packet()
370 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface) in batadv_schedule_bat_ogm() argument
372 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_schedule_bat_ogm()
[all …]
Dbat_iv_ogm.c264 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument
269 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_iv_ogm_neigh_new()
272 neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr, orig_node); in batadv_iv_ogm_neigh_new()
276 if (!atomic_inc_not_zero(&hard_iface->refcount)) { in batadv_iv_ogm_neigh_new()
283 neigh_node->if_incoming = hard_iface; in batadv_iv_ogm_neigh_new()
286 tmp_neigh_node = batadv_neigh_node_get(orig_node, hard_iface, in batadv_iv_ogm_neigh_new()
292 batadv_hardif_free_ref(hard_iface); in batadv_iv_ogm_neigh_new()
301 hard_iface->net_dev->name); in batadv_iv_ogm_neigh_new()
307 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument
316 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable()
[all …]
Doriginator.c436 batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, in batadv_neigh_node_new() argument
451 neigh_node->if_incoming = hard_iface; in batadv_neigh_node_new()
473 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument
483 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get()
910 struct batadv_hard_iface *hard_iface; in batadv_purge_orig_node() local
937 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_purge_orig_node()
938 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_purge_orig_node()
941 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_purge_orig_node()
946 hard_iface); in batadv_purge_orig_node()
947 batadv_update_route(bat_priv, orig_node, hard_iface, in batadv_purge_orig_node()
[all …]
Dsysfs.c732 struct batadv_hard_iface *hard_iface; in batadv_show_mesh_iface() local
736 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_show_mesh_iface()
737 if (!hard_iface) in batadv_show_mesh_iface()
740 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE) in batadv_show_mesh_iface()
743 ifname = hard_iface->soft_iface->name; in batadv_show_mesh_iface()
747 batadv_hardif_free_ref(hard_iface); in batadv_show_mesh_iface()
757 struct batadv_hard_iface *hard_iface; in batadv_store_mesh_iface() local
761 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_store_mesh_iface()
762 if (!hard_iface) in batadv_store_mesh_iface()
771 batadv_hardif_free_ref(hard_iface); in batadv_store_mesh_iface()
[all …]
Dsoft-interface.c827 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local
830 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add()
831 if (!hard_iface || hard_iface->soft_iface != NULL) in batadv_softif_slave_add()
834 ret = batadv_hardif_enable_interface(hard_iface, dev->name); in batadv_softif_slave_add()
837 if (hard_iface) in batadv_softif_slave_add()
838 batadv_hardif_free_ref(hard_iface); in batadv_softif_slave_add()
852 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local
855 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del()
857 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del()
860 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del()
[all …]
Ddebugfs.c457 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument
465 hard_iface->debug_dir = debugfs_create_dir(hard_iface->net_dev->name, in batadv_debugfs_add_hardif()
467 if (!hard_iface->debug_dir) in batadv_debugfs_add_hardif()
473 hard_iface->debug_dir, in batadv_debugfs_add_hardif()
474 hard_iface->net_dev, in batadv_debugfs_add_hardif()
482 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_add_hardif()
483 hard_iface->debug_dir = NULL; in batadv_debugfs_add_hardif()
497 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument
500 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_del_hardif()
501 hard_iface->debug_dir = NULL; in batadv_debugfs_del_hardif()
Doriginator.h33 const struct batadv_hard_iface *hard_iface,
36 batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
61 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface,
63 int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface,
Dsend.h22 struct batadv_hard_iface *hard_iface,
27 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface);
34 const struct batadv_hard_iface *hard_iface);
Ddebugfs.h27 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface);
28 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface);
Dmain.c216 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local
219 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac()
220 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac()
223 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac()
226 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac()
365 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local
369 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv()
385 if (!hard_iface->soft_iface) in batadv_batman_skb_recv()
388 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv()
394 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_batman_skb_recv()
[all …]
Dtypes.h1134 int (*bat_iface_enable)(struct batadv_hard_iface *hard_iface);
1135 void (*bat_iface_disable)(struct batadv_hard_iface *hard_iface);
1136 void (*bat_iface_update_mac)(struct batadv_hard_iface *hard_iface);
1137 void (*bat_primary_iface_set)(struct batadv_hard_iface *hard_iface);
1138 void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface);
1151 struct batadv_hard_iface *hard_iface);
Drouting.h22 struct batadv_hard_iface *hard_iface,
Drouting.c159 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument