/kernel/linux/linux-5.10/net/batman-adv/ |
D | hard-interface.c | 51 struct batadv_hard_iface *hard_iface; in batadv_hardif_release() local 53 hard_iface = container_of(ref, struct batadv_hard_iface, refcount); in batadv_hardif_release() 54 dev_put(hard_iface->net_dev); in batadv_hardif_release() 56 kfree_rcu(hard_iface, rcu); in batadv_hardif_release() 68 struct batadv_hard_iface *hard_iface; in batadv_hardif_get_by_netdev() local 71 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_hardif_get_by_netdev() 72 if (hard_iface->net_dev == net_dev && in batadv_hardif_get_by_netdev() 73 kref_get_unless_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev() 77 hard_iface = NULL; in batadv_hardif_get_by_netdev() 81 return hard_iface; in batadv_hardif_get_by_netdev() [all …]
|
D | bat_v_elp.c | 48 static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface) in batadv_v_elp_start_timer() argument 52 msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER; in batadv_v_elp_start_timer() 55 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq, in batadv_v_elp_start_timer() 68 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput() local 78 throughput = atomic_read(&hard_iface->bat_v.throughput_override); in batadv_v_elp_get_throughput() 85 if (batadv_is_wifi_hardif(hard_iface)) { in batadv_v_elp_get_throughput() 86 if (!batadv_is_cfg80211_hardif(hard_iface)) in batadv_v_elp_get_throughput() 90 real_netdev = batadv_get_real_netdev(hard_iface->net_dev); in batadv_v_elp_get_throughput() 129 ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings); in batadv_v_elp_get_throughput() 134 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX; in batadv_v_elp_get_throughput() [all …]
|
D | bat_v_ogm.c | 87 static void batadv_v_ogm_start_queue_timer(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_start_queue_timer() argument 93 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.aggr_wq, in batadv_v_ogm_start_queue_timer() 122 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_send_to_if() argument 124 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_send_to_if() 126 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_v_ogm_send_to_if() 133 batadv_send_broadcast_skb(skb, hard_iface); in batadv_v_ogm_send_to_if() 161 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_queue_left() argument 163 unsigned int max = min_t(unsigned int, hard_iface->net_dev->mtu, in batadv_v_ogm_queue_left() 167 lockdep_assert_held(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_queue_left() 169 return hard_iface->bat_v.aggr_len + ogm_len <= max; in batadv_v_ogm_queue_left() [all …]
|
D | hard-interface.h | 95 bool batadv_is_cfg80211_hardif(struct batadv_hard_iface *hard_iface); 96 bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface); 99 int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, 101 void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, 114 static inline void batadv_hardif_put(struct batadv_hard_iface *hard_iface) in batadv_hardif_put() argument 116 if (!hard_iface) in batadv_hardif_put() 119 kref_put(&hard_iface->refcount, batadv_hardif_release); in batadv_hardif_put() 131 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local 134 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected() 135 if (!hard_iface) in batadv_primary_if_get_selected() [all …]
|
D | originator.c | 482 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument 492 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get() 515 batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, in batadv_hardif_neigh_create() argument 519 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create() 522 spin_lock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() 525 hardif_neigh = batadv_hardif_neigh_get(hard_iface, neigh_addr); in batadv_hardif_neigh_create() 533 kref_get(&hard_iface->refcount); in batadv_hardif_neigh_create() 537 hardif_neigh->if_incoming = hard_iface; in batadv_hardif_neigh_create() 545 hlist_add_head_rcu(&hardif_neigh->list, &hard_iface->neigh_list); in batadv_hardif_neigh_create() 548 spin_unlock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() [all …]
|
D | send.c | 64 struct batadv_hard_iface *hard_iface, in batadv_send_skb_packet() argument 71 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet() 73 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_send_skb_packet() 76 if (unlikely(!hard_iface->net_dev)) in batadv_send_skb_packet() 79 if (!(hard_iface->net_dev->flags & IFF_UP)) { in batadv_send_skb_packet() 81 hard_iface->net_dev->name); in batadv_send_skb_packet() 92 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet() 99 skb->dev = hard_iface->net_dev; in batadv_send_skb_packet() 125 struct batadv_hard_iface *hard_iface) in batadv_send_broadcast_skb() argument 127 return batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr); in batadv_send_broadcast_skb() [all …]
|
D | sysfs.c | 265 struct batadv_hard_iface *hard_iface; \ 270 hard_iface = batadv_hardif_get_by_netdev(net_dev); \ 271 if (!hard_iface) \ 276 &hard_iface->_var, \ 277 hard_iface->soft_iface, \ 280 if (hard_iface->soft_iface) { \ 281 bat_priv = netdev_priv(hard_iface->soft_iface); \ 282 batadv_netlink_notify_hardif(bat_priv, hard_iface); \ 285 batadv_hardif_put(hard_iface); \ 294 struct batadv_hard_iface *hard_iface; \ [all …]
|
D | bat_v.c | 45 static void batadv_v_iface_activate(struct batadv_hard_iface *hard_iface) in batadv_v_iface_activate() argument 47 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_iface_activate() 53 batadv_v_elp_iface_activate(primary_if, hard_iface); in batadv_v_iface_activate() 61 if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED) in batadv_v_iface_activate() 62 hard_iface->if_status = BATADV_IF_ACTIVE; in batadv_v_iface_activate() 65 static int batadv_v_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_v_iface_enable() argument 69 ret = batadv_v_elp_iface_enable(hard_iface); in batadv_v_iface_enable() 73 ret = batadv_v_ogm_iface_enable(hard_iface); in batadv_v_iface_enable() 75 batadv_v_elp_iface_disable(hard_iface); in batadv_v_iface_enable() 80 static void batadv_v_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_v_iface_disable() argument [all …]
|
D | bat_iv_ogm.c | 175 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument 183 hard_iface, neigh_addr); in batadv_iv_ogm_neigh_new() 193 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument 199 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_enable() 203 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable() 205 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN; in batadv_iv_ogm_iface_enable() 206 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC); in batadv_iv_ogm_iface_enable() 208 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_enable() 212 hard_iface->bat_iv.ogm_buff = ogm_buff; in batadv_iv_ogm_iface_enable() 222 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_enable() [all …]
|
D | debugfs.h | 25 void batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface); 26 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface); 27 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface); 57 void batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument 62 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_rename_hardif() argument 67 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument
|
D | debugfs.c | 318 void batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument 320 struct net *net = dev_net(hard_iface->net_dev); in batadv_debugfs_add_hardif() 326 hard_iface->debug_dir = debugfs_create_dir(hard_iface->net_dev->name, in batadv_debugfs_add_hardif() 332 hard_iface->debug_dir, hard_iface->net_dev, in batadv_debugfs_add_hardif() 340 void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_rename_hardif() argument 342 const char *name = hard_iface->net_dev->name; in batadv_debugfs_rename_hardif() 345 dir = hard_iface->debug_dir; in batadv_debugfs_rename_hardif() 357 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument 359 struct net *net = dev_net(hard_iface->net_dev); in batadv_debugfs_del_hardif() 365 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_del_hardif() [all …]
|
D | netlink.c | 234 struct net_device *hard_iface; in batadv_netlink_mesh_fill() local 263 hard_iface = primary_if->net_dev; in batadv_netlink_mesh_fill() 266 hard_iface->ifindex) || in batadv_netlink_mesh_fill() 268 hard_iface->name) || in batadv_netlink_mesh_fill() 270 hard_iface->dev_addr)) in batadv_netlink_mesh_fill() 797 struct batadv_hard_iface *hard_iface, in batadv_netlink_hardif_fill() argument 802 struct net_device *net_dev = hard_iface->net_dev; in batadv_netlink_hardif_fill() 824 if (hard_iface->if_status == BATADV_IF_ACTIVE) { in batadv_netlink_hardif_fill() 830 atomic_read(&hard_iface->hop_penalty))) in batadv_netlink_hardif_fill() 835 atomic_read(&hard_iface->bat_v.elp_interval))) in batadv_netlink_hardif_fill() [all …]
|
D | main.c | 312 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local 316 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac() 317 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac() 320 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac() 323 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac() 476 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local 479 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv() 486 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_batman_skb_recv() 503 if (!hard_iface->soft_iface) in batadv_batman_skb_recv() 506 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv() [all …]
|
D | bat_v_elp.h | 15 int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface); 16 void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface); 18 struct batadv_hard_iface *hard_iface);
|
D | soft-interface.c | 873 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local 877 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add() 878 if (!hard_iface || hard_iface->soft_iface) in batadv_softif_slave_add() 881 ret = batadv_hardif_enable_interface(hard_iface, net, dev->name); in batadv_softif_slave_add() 884 if (hard_iface) in batadv_softif_slave_add() 885 batadv_hardif_put(hard_iface); in batadv_softif_slave_add() 899 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local 902 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del() 904 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del() 907 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del() [all …]
|
D | send.h | 36 struct batadv_hard_iface *hard_iface, 39 struct batadv_hard_iface *hard_iface); 48 const struct batadv_hard_iface *hard_iface);
|
D | bat_v_ogm.h | 19 int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface); 20 void batadv_v_ogm_iface_disable(struct batadv_hard_iface *hard_iface);
|
D | types.h | 2190 void (*activate)(struct batadv_hard_iface *hard_iface); 2193 int (*enable)(struct batadv_hard_iface *hard_iface); 2196 void (*enabled)(struct batadv_hard_iface *hard_iface); 2199 void (*disable)(struct batadv_hard_iface *hard_iface); 2205 void (*update_mac)(struct batadv_hard_iface *hard_iface); 2208 void (*primary_set)(struct batadv_hard_iface *hard_iface); 2245 struct batadv_hard_iface *hard_iface); 2255 struct batadv_hard_iface *hard_iface); 2261 struct batadv_hard_iface *hard_iface);
|
D | originator.h | 29 batadv_hardif_neigh_get(const struct batadv_hard_iface *hard_iface, 34 struct batadv_hard_iface *hard_iface,
|
D | netlink.h | 26 struct batadv_hard_iface *hard_iface);
|
D | routing.h | 16 struct batadv_hard_iface *hard_iface,
|
D | multicast.c | 2363 struct batadv_hard_iface *hard_iface = NULL; in batadv_mcast_netlink_get_primary() local 2382 hard_iface = batadv_primary_if_get_selected(bat_priv); in batadv_mcast_netlink_get_primary() 2383 if (!hard_iface || hard_iface->if_status != BATADV_IF_ACTIVE) { in batadv_mcast_netlink_get_primary() 2393 *primary_if = hard_iface; in batadv_mcast_netlink_get_primary() 2394 else if (hard_iface) in batadv_mcast_netlink_get_primary() 2395 batadv_hardif_put(hard_iface); in batadv_mcast_netlink_get_primary()
|
D | routing.c | 181 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument
|