Home
last modified time | relevance | path

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

/linux-4.1.27/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()
70 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local
73 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected()
74 if (!hard_iface) in batadv_primary_if_get_selected()
77 if (!atomic_inc_not_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
78 hard_iface = NULL; 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 …]
Doriginator.c408 batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, in batadv_neigh_node_new() argument
423 neigh_node->if_incoming = hard_iface; in batadv_neigh_node_new()
445 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument
455 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get()
875 struct batadv_hard_iface *hard_iface; in batadv_purge_orig_node() local
902 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_purge_orig_node()
903 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_purge_orig_node()
906 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_purge_orig_node()
911 hard_iface); in batadv_purge_orig_node()
912 batadv_update_route(bat_priv, orig_node, hard_iface, in batadv_purge_orig_node()
[all …]
Dbat_iv_ogm.c263 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument
268 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_iv_ogm_neigh_new()
271 neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr, orig_node); in batadv_iv_ogm_neigh_new()
275 if (!atomic_inc_not_zero(&hard_iface->refcount)) { in batadv_iv_ogm_neigh_new()
282 neigh_node->if_incoming = hard_iface; in batadv_iv_ogm_neigh_new()
285 tmp_neigh_node = batadv_neigh_node_get(orig_node, hard_iface, in batadv_iv_ogm_neigh_new()
291 batadv_hardif_free_ref(hard_iface); in batadv_iv_ogm_neigh_new()
300 hard_iface->net_dev->name); in batadv_iv_ogm_neigh_new()
306 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument
315 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable()
[all …]
Dsysfs.c731 struct batadv_hard_iface *hard_iface; in batadv_show_mesh_iface() local
735 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_show_mesh_iface()
736 if (!hard_iface) in batadv_show_mesh_iface()
739 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE) in batadv_show_mesh_iface()
742 ifname = hard_iface->soft_iface->name; in batadv_show_mesh_iface()
746 batadv_hardif_free_ref(hard_iface); in batadv_show_mesh_iface()
756 struct batadv_hard_iface *hard_iface; in batadv_store_mesh_iface() local
760 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_store_mesh_iface()
761 if (!hard_iface) in batadv_store_mesh_iface()
770 batadv_hardif_free_ref(hard_iface); in batadv_store_mesh_iface()
[all …]
Dsoft-interface.c825 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local
828 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add()
829 if (!hard_iface || hard_iface->soft_iface != NULL) in batadv_softif_slave_add()
832 ret = batadv_hardif_enable_interface(hard_iface, dev->name); in batadv_softif_slave_add()
835 if (hard_iface) in batadv_softif_slave_add()
836 batadv_hardif_free_ref(hard_iface); in batadv_softif_slave_add()
850 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local
853 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del()
855 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del()
858 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.h32 const struct batadv_hard_iface *hard_iface,
35 batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
60 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface,
62 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.c215 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local
218 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac()
219 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac()
222 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac()
225 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac()
364 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local
368 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv()
384 if (!hard_iface->soft_iface) in batadv_batman_skb_recv()
387 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv()
393 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_batman_skb_recv()
[all …]
Dtypes.h1135 int (*bat_iface_enable)(struct batadv_hard_iface *hard_iface);
1136 void (*bat_iface_disable)(struct batadv_hard_iface *hard_iface);
1137 void (*bat_iface_update_mac)(struct batadv_hard_iface *hard_iface);
1138 void (*bat_primary_iface_set)(struct batadv_hard_iface *hard_iface);
1139 void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface);
1152 struct batadv_hard_iface *hard_iface);
Drouting.h22 struct batadv_hard_iface *hard_iface,
Drouting.c150 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument