/Linux-v4.19/net/batman-adv/ |
D | hard-interface.c | 62 struct batadv_hard_iface *hard_iface; in batadv_hardif_release() local 64 hard_iface = container_of(ref, struct batadv_hard_iface, refcount); in batadv_hardif_release() 65 dev_put(hard_iface->net_dev); in batadv_hardif_release() 67 kfree_rcu(hard_iface, rcu); in batadv_hardif_release() 79 struct batadv_hard_iface *hard_iface; in batadv_hardif_get_by_netdev() local 82 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_hardif_get_by_netdev() 83 if (hard_iface->net_dev == net_dev && in batadv_hardif_get_by_netdev() 84 kref_get_unless_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev() 88 hard_iface = NULL; in batadv_hardif_get_by_netdev() 92 return hard_iface; in batadv_hardif_get_by_netdev() [all …]
|
D | bat_v_elp.c | 59 static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface) in batadv_v_elp_start_timer() argument 63 msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER; in batadv_v_elp_start_timer() 66 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq, in batadv_v_elp_start_timer() 79 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput() local 89 throughput = atomic_read(&hard_iface->bat_v.throughput_override); in batadv_v_elp_get_throughput() 96 if (batadv_is_wifi_hardif(hard_iface)) { in batadv_v_elp_get_throughput() 97 if (!batadv_is_cfg80211_hardif(hard_iface)) in batadv_v_elp_get_throughput() 101 real_netdev = batadv_get_real_netdev(hard_iface->net_dev); in batadv_v_elp_get_throughput() 128 ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings); in batadv_v_elp_get_throughput() 146 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX; in batadv_v_elp_get_throughput() [all …]
|
D | hard-interface.h | 108 bool batadv_is_cfg80211_hardif(struct batadv_hard_iface *hard_iface); 109 bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface); 112 int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, 114 void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, 128 static inline void batadv_hardif_put(struct batadv_hard_iface *hard_iface) in batadv_hardif_put() argument 130 kref_put(&hard_iface->refcount, batadv_hardif_release); in batadv_hardif_put() 142 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local 145 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected() 146 if (!hard_iface) in batadv_primary_if_get_selected() 149 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected() [all …]
|
D | originator.c | 533 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument 543 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get() 566 batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, in batadv_hardif_neigh_create() argument 570 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create() 573 spin_lock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() 576 hardif_neigh = batadv_hardif_neigh_get(hard_iface, neigh_addr); in batadv_hardif_neigh_create() 584 kref_get(&hard_iface->refcount); in batadv_hardif_neigh_create() 588 hardif_neigh->if_incoming = hard_iface; in batadv_hardif_neigh_create() 596 hlist_add_head_rcu(&hardif_neigh->list, &hard_iface->neigh_list); in batadv_hardif_neigh_create() 599 spin_unlock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() [all …]
|
D | send.c | 76 struct batadv_hard_iface *hard_iface, in batadv_send_skb_packet() argument 83 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet() 85 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_send_skb_packet() 88 if (unlikely(!hard_iface->net_dev)) in batadv_send_skb_packet() 91 if (!(hard_iface->net_dev->flags & IFF_UP)) { in batadv_send_skb_packet() 93 hard_iface->net_dev->name); in batadv_send_skb_packet() 104 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet() 111 skb->dev = hard_iface->net_dev; in batadv_send_skb_packet() 137 struct batadv_hard_iface *hard_iface) in batadv_send_broadcast_skb() argument 139 return batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr); in batadv_send_broadcast_skb() [all …]
|
D | debugfs.h | 35 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface); 36 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface); 37 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface); 63 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument 69 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_rename_hardif() argument 74 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument
|
D | sysfs.c | 257 struct batadv_hard_iface *hard_iface; \ 260 hard_iface = batadv_hardif_get_by_netdev(net_dev); \ 261 if (!hard_iface) \ 266 &hard_iface->_var, \ 267 hard_iface->soft_iface, \ 270 batadv_hardif_put(hard_iface); \ 279 struct batadv_hard_iface *hard_iface; \ 282 hard_iface = batadv_hardif_get_by_netdev(net_dev); \ 283 if (!hard_iface) \ 286 length = sprintf(buff, "%i\n", atomic_read(&hard_iface->_var)); \ [all …]
|
D | bat_v_ogm.c | 116 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_send_to_if() argument 118 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_send_to_if() 120 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_v_ogm_send_to_if() 127 batadv_send_broadcast_skb(skb, hard_iface); in batadv_v_ogm_send_to_if() 136 struct batadv_hard_iface *hard_iface; in batadv_v_ogm_send() local 179 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_v_ogm_send() 180 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_v_ogm_send() 183 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_v_ogm_send() 186 ret = batadv_hardif_no_broadcast(hard_iface, NULL, NULL); in batadv_v_ogm_send() 205 hard_iface->net_dev->name, type); in batadv_v_ogm_send() [all …]
|
D | debugfs.c | 312 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument 314 struct net *net = dev_net(hard_iface->net_dev); in batadv_debugfs_add_hardif() 324 hard_iface->debug_dir = debugfs_create_dir(hard_iface->net_dev->name, in batadv_debugfs_add_hardif() 326 if (!hard_iface->debug_dir) in batadv_debugfs_add_hardif() 332 hard_iface->debug_dir, in batadv_debugfs_add_hardif() 333 hard_iface->net_dev, in batadv_debugfs_add_hardif() 341 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_add_hardif() 342 hard_iface->debug_dir = NULL; in batadv_debugfs_add_hardif() 351 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_rename_hardif() argument 353 const char *name = hard_iface->net_dev->name; in batadv_debugfs_rename_hardif() [all …]
|
D | bat_v.c | 56 static void batadv_v_iface_activate(struct batadv_hard_iface *hard_iface) in batadv_v_iface_activate() argument 58 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_iface_activate() 64 batadv_v_elp_iface_activate(primary_if, hard_iface); in batadv_v_iface_activate() 72 if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED) in batadv_v_iface_activate() 73 hard_iface->if_status = BATADV_IF_ACTIVE; in batadv_v_iface_activate() 76 static int batadv_v_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_v_iface_enable() argument 80 ret = batadv_v_elp_iface_enable(hard_iface); in batadv_v_iface_enable() 84 ret = batadv_v_ogm_iface_enable(hard_iface); in batadv_v_iface_enable() 86 batadv_v_elp_iface_disable(hard_iface); in batadv_v_iface_enable() 91 static void batadv_v_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_v_iface_disable() argument [all …]
|
D | bat_iv_ogm.c | 358 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument 366 hard_iface, neigh_addr); in batadv_iv_ogm_neigh_new() 376 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument 384 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable() 386 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN; in batadv_iv_ogm_iface_enable() 387 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC); in batadv_iv_ogm_iface_enable() 391 hard_iface->bat_iv.ogm_buff = ogm_buff; in batadv_iv_ogm_iface_enable() 404 static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_disable() argument 406 kfree(hard_iface->bat_iv.ogm_buff); in batadv_iv_ogm_iface_disable() 407 hard_iface->bat_iv.ogm_buff = NULL; in batadv_iv_ogm_iface_disable() [all …]
|
D | main.c | 278 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local 282 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac() 283 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac() 286 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac() 289 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac() 442 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local 445 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv() 452 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_batman_skb_recv() 469 if (!hard_iface->soft_iface) in batadv_batman_skb_recv() 472 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv() [all …]
|
D | bat_v_elp.h | 27 int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface); 28 void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface); 30 struct batadv_hard_iface *hard_iface);
|
D | netlink.c | 137 struct net_device *hard_iface; in batadv_netlink_mesh_info_put() local 162 hard_iface = primary_if->net_dev; in batadv_netlink_mesh_info_put() 165 hard_iface->ifindex) || in batadv_netlink_mesh_info_put() 167 hard_iface->name) || in batadv_netlink_mesh_info_put() 169 hard_iface->dev_addr)) in batadv_netlink_mesh_info_put() 455 struct batadv_hard_iface *hard_iface) in batadv_netlink_dump_hardif_entry() argument 457 struct net_device *net_dev = hard_iface->net_dev; in batadv_netlink_dump_hardif_entry() 473 if (hard_iface->if_status == BATADV_IF_ACTIVE) { in batadv_netlink_dump_hardif_entry() 498 struct batadv_hard_iface *hard_iface; in batadv_netlink_dump_hardifs() local 521 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_netlink_dump_hardifs() [all …]
|
D | soft-interface.c | 886 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local 890 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add() 891 if (!hard_iface || hard_iface->soft_iface) in batadv_softif_slave_add() 894 ret = batadv_hardif_enable_interface(hard_iface, net, dev->name); in batadv_softif_slave_add() 897 if (hard_iface) in batadv_softif_slave_add() 898 batadv_hardif_put(hard_iface); in batadv_softif_slave_add() 912 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local 915 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del() 917 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del() 920 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del() [all …]
|
D | originator.h | 41 batadv_hardif_neigh_get(const struct batadv_hard_iface *hard_iface, 47 struct batadv_hard_iface *hard_iface, 75 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface, 77 int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface,
|
D | send.h | 49 struct batadv_hard_iface *hard_iface, 52 struct batadv_hard_iface *hard_iface); 61 const struct batadv_hard_iface *hard_iface);
|
D | types.h | 2123 void (*activate)(struct batadv_hard_iface *hard_iface); 2126 int (*enable)(struct batadv_hard_iface *hard_iface); 2129 void (*disable)(struct batadv_hard_iface *hard_iface); 2135 void (*update_mac)(struct batadv_hard_iface *hard_iface); 2138 void (*primary_set)(struct batadv_hard_iface *hard_iface); 2175 struct batadv_hard_iface *hard_iface); 2207 struct batadv_hard_iface *hard_iface); 2213 struct batadv_hard_iface *hard_iface);
|
D | bat_v_ogm.h | 30 int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface);
|
D | multicast.c | 1495 struct batadv_hard_iface *hard_iface = NULL; in batadv_mcast_netlink_get_primary() local 1514 hard_iface = batadv_primary_if_get_selected(bat_priv); in batadv_mcast_netlink_get_primary() 1515 if (!hard_iface || hard_iface->if_status != BATADV_IF_ACTIVE) { in batadv_mcast_netlink_get_primary() 1525 *primary_if = hard_iface; in batadv_mcast_netlink_get_primary() 1526 else if (hard_iface) in batadv_mcast_netlink_get_primary() 1527 batadv_hardif_put(hard_iface); in batadv_mcast_netlink_get_primary()
|
D | routing.h | 29 struct batadv_hard_iface *hard_iface,
|
D | routing.c | 193 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument
|