Home
last modified time | relevance | path

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

/linux-4.4.14/net/batman-adv/
Dhard-interface.c51 struct batadv_hard_iface *hard_iface; in batadv_hardif_free_rcu() local
53 hard_iface = container_of(rcu, struct batadv_hard_iface, rcu); in batadv_hardif_free_rcu()
54 dev_put(hard_iface->net_dev); in batadv_hardif_free_rcu()
55 kfree(hard_iface); in batadv_hardif_free_rcu()
61 struct batadv_hard_iface *hard_iface; in batadv_hardif_get_by_netdev() local
64 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_hardif_get_by_netdev()
65 if (hard_iface->net_dev == net_dev && in batadv_hardif_get_by_netdev()
66 atomic_inc_not_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev()
70 hard_iface = NULL; in batadv_hardif_get_by_netdev()
74 return hard_iface; in batadv_hardif_get_by_netdev()
[all …]
Dhard-interface.h57 int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
59 void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
72 batadv_hardif_free_ref(struct batadv_hard_iface *hard_iface) in batadv_hardif_free_ref() argument
74 if (atomic_dec_and_test(&hard_iface->refcount)) in batadv_hardif_free_ref()
75 call_rcu(&hard_iface->rcu, batadv_hardif_free_rcu); in batadv_hardif_free_ref()
81 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local
84 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected()
85 if (!hard_iface) in batadv_primary_if_get_selected()
88 if (!atomic_inc_not_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
89 hard_iface = NULL; in batadv_primary_if_get_selected()
[all …]
Dsend.c56 struct batadv_hard_iface *hard_iface, in batadv_send_skb_packet() argument
59 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet()
62 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_send_skb_packet()
65 if (unlikely(!hard_iface->net_dev)) in batadv_send_skb_packet()
68 if (!(hard_iface->net_dev->flags & IFF_UP)) { in batadv_send_skb_packet()
70 hard_iface->net_dev->name); in batadv_send_skb_packet()
81 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet()
88 skb->dev = hard_iface->net_dev; in batadv_send_skb_packet()
388 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface) in batadv_schedule_bat_ogm() argument
390 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_schedule_bat_ogm()
[all …]
Doriginator.c431 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument
441 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get()
466 struct batadv_hard_iface *hard_iface, in batadv_neigh_node_new() argument
471 neigh_node = batadv_neigh_node_get(orig_node, hard_iface, neigh_addr); in batadv_neigh_node_new()
479 if (!atomic_inc_not_zero(&hard_iface->refcount)) { in batadv_neigh_node_new()
490 neigh_node->if_incoming = hard_iface; in batadv_neigh_node_new()
502 neigh_addr, orig_node->orig, hard_iface->net_dev->name); in batadv_neigh_node_new()
914 struct batadv_hard_iface *hard_iface; in batadv_purge_orig_node() local
941 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_purge_orig_node()
942 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_purge_orig_node()
[all …]
Dbat_iv_ogm.c294 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument
301 neigh_node = batadv_neigh_node_new(orig_node, hard_iface, neigh_addr); in batadv_iv_ogm_neigh_new()
311 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument
319 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable()
321 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN; in batadv_iv_ogm_iface_enable()
322 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC); in batadv_iv_ogm_iface_enable()
326 hard_iface->bat_iv.ogm_buff = ogm_buff; in batadv_iv_ogm_iface_enable()
339 static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_disable() argument
341 kfree(hard_iface->bat_iv.ogm_buff); in batadv_iv_ogm_iface_disable()
342 hard_iface->bat_iv.ogm_buff = NULL; in batadv_iv_ogm_iface_disable()
[all …]
Ddebugfs.h35 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface);
36 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface);
58 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument
64 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument
Dsysfs.c751 struct batadv_hard_iface *hard_iface; in batadv_show_mesh_iface() local
755 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_show_mesh_iface()
756 if (!hard_iface) in batadv_show_mesh_iface()
759 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE) in batadv_show_mesh_iface()
762 ifname = hard_iface->soft_iface->name; in batadv_show_mesh_iface()
766 batadv_hardif_free_ref(hard_iface); in batadv_show_mesh_iface()
776 struct batadv_hard_iface *hard_iface; in batadv_store_mesh_iface() local
780 hard_iface = batadv_hardif_get_by_netdev(net_dev); in batadv_store_mesh_iface()
781 if (!hard_iface) in batadv_store_mesh_iface()
790 batadv_hardif_free_ref(hard_iface); in batadv_store_mesh_iface()
[all …]
Dsoft-interface.c859 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local
862 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add()
863 if (!hard_iface || hard_iface->soft_iface) in batadv_softif_slave_add()
866 ret = batadv_hardif_enable_interface(hard_iface, dev->name); in batadv_softif_slave_add()
869 if (hard_iface) in batadv_softif_slave_add()
870 batadv_hardif_free_ref(hard_iface); in batadv_softif_slave_add()
884 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local
887 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del()
889 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del()
892 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del()
[all …]
Ddebugfs.c478 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument
486 hard_iface->debug_dir = debugfs_create_dir(hard_iface->net_dev->name, in batadv_debugfs_add_hardif()
488 if (!hard_iface->debug_dir) in batadv_debugfs_add_hardif()
494 hard_iface->debug_dir, in batadv_debugfs_add_hardif()
495 hard_iface->net_dev, in batadv_debugfs_add_hardif()
503 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_add_hardif()
504 hard_iface->debug_dir = NULL; in batadv_debugfs_add_hardif()
514 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument
517 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_del_hardif()
518 hard_iface->debug_dir = NULL; in batadv_debugfs_del_hardif()
Dsend.h32 struct batadv_hard_iface *hard_iface,
37 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface);
44 const struct batadv_hard_iface *hard_iface);
Doriginator.h45 struct batadv_hard_iface *hard_iface,
69 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface,
71 int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface,
Dmain.c240 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local
244 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac()
245 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac()
248 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac()
251 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac()
390 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local
394 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv()
410 if (!hard_iface->soft_iface) in batadv_batman_skb_recv()
413 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv()
419 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_batman_skb_recv()
[all …]
Dtypes.h1152 int (*bat_iface_enable)(struct batadv_hard_iface *hard_iface);
1153 void (*bat_iface_disable)(struct batadv_hard_iface *hard_iface);
1154 void (*bat_iface_update_mac)(struct batadv_hard_iface *hard_iface);
1155 void (*bat_primary_iface_set)(struct batadv_hard_iface *hard_iface);
1156 void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface);
1171 struct batadv_hard_iface *hard_iface);
Drouting.h28 struct batadv_hard_iface *hard_iface,
Drouting.c175 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument