/net/batman-adv/ |
D | hard-interface.c | 61 struct batadv_hard_iface *hard_iface; in batadv_hardif_release() local 63 hard_iface = container_of(ref, struct batadv_hard_iface, refcount); in batadv_hardif_release() 64 dev_put(hard_iface->net_dev); in batadv_hardif_release() 66 kfree_rcu(hard_iface, rcu); in batadv_hardif_release() 72 struct batadv_hard_iface *hard_iface; in batadv_hardif_get_by_netdev() local 75 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_hardif_get_by_netdev() 76 if (hard_iface->net_dev == net_dev && in batadv_hardif_get_by_netdev() 77 kref_get_unless_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev() 81 hard_iface = NULL; in batadv_hardif_get_by_netdev() 85 return hard_iface; in batadv_hardif_get_by_netdev() [all …]
|
D | bat_v_elp.c | 56 static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface) in batadv_v_elp_start_timer() argument 60 msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER; in batadv_v_elp_start_timer() 63 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq, in batadv_v_elp_start_timer() 76 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput() local 85 throughput = atomic_read(&hard_iface->bat_v.throughput_override); in batadv_v_elp_get_throughput() 92 if (batadv_is_wifi_netdev(hard_iface->net_dev)) { in batadv_v_elp_get_throughput() 93 if (hard_iface->net_dev->ieee80211_ptr) { in batadv_v_elp_get_throughput() 94 ret = cfg80211_get_station(hard_iface->net_dev, in batadv_v_elp_get_throughput() 116 ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings); in batadv_v_elp_get_throughput() 121 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX; in batadv_v_elp_get_throughput() [all …]
|
D | originator.c | 487 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument 497 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get() 519 batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, in batadv_hardif_neigh_create() argument 522 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create() 525 spin_lock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() 528 hardif_neigh = batadv_hardif_neigh_get(hard_iface, neigh_addr); in batadv_hardif_neigh_create() 536 kref_get(&hard_iface->refcount); in batadv_hardif_neigh_create() 539 hardif_neigh->if_incoming = hard_iface; in batadv_hardif_neigh_create() 547 hlist_add_head_rcu(&hardif_neigh->list, &hard_iface->neigh_list); in batadv_hardif_neigh_create() 550 spin_unlock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() [all …]
|
D | hard-interface.h | 58 int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, 60 void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, 72 static inline void batadv_hardif_put(struct batadv_hard_iface *hard_iface) in batadv_hardif_put() argument 74 kref_put(&hard_iface->refcount, batadv_hardif_release); in batadv_hardif_put() 80 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local 83 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected() 84 if (!hard_iface) in batadv_primary_if_get_selected() 87 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected() 88 hard_iface = NULL; in batadv_primary_if_get_selected() 92 return hard_iface; in batadv_primary_if_get_selected()
|
D | send.c | 71 struct batadv_hard_iface *hard_iface, in batadv_send_skb_packet() argument 78 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet() 80 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_send_skb_packet() 83 if (unlikely(!hard_iface->net_dev)) in batadv_send_skb_packet() 86 if (!(hard_iface->net_dev->flags & IFF_UP)) { in batadv_send_skb_packet() 88 hard_iface->net_dev->name); in batadv_send_skb_packet() 99 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet() 106 skb->dev = hard_iface->net_dev; in batadv_send_skb_packet() 129 struct batadv_hard_iface *hard_iface) in batadv_send_broadcast_skb() argument 131 return batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr); in batadv_send_broadcast_skb() [all …]
|
D | sysfs.c | 255 struct batadv_hard_iface *hard_iface; \ 258 hard_iface = batadv_hardif_get_by_netdev(net_dev); \ 259 if (!hard_iface) \ 264 &hard_iface->_var, net_dev); \ 266 batadv_hardif_put(hard_iface); \ 275 struct batadv_hard_iface *hard_iface; \ 278 hard_iface = batadv_hardif_get_by_netdev(net_dev); \ 279 if (!hard_iface) \ 282 length = sprintf(buff, "%i\n", atomic_read(&hard_iface->_var)); \ 284 batadv_hardif_put(hard_iface); \ [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 | 345 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument 353 hard_iface, neigh_addr); in batadv_iv_ogm_neigh_new() 363 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument 371 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable() 373 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN; in batadv_iv_ogm_iface_enable() 374 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC); in batadv_iv_ogm_iface_enable() 378 hard_iface->bat_iv.ogm_buff = ogm_buff; in batadv_iv_ogm_iface_enable() 391 static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_disable() argument 393 kfree(hard_iface->bat_iv.ogm_buff); in batadv_iv_ogm_iface_disable() 394 hard_iface->bat_iv.ogm_buff = NULL; in batadv_iv_ogm_iface_disable() [all …]
|
D | bat_v_ogm.c | 115 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_send_to_if() argument 117 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_send_to_if() 119 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_v_ogm_send_to_if() 126 batadv_send_broadcast_skb(skb, hard_iface); in batadv_v_ogm_send_to_if() 135 struct batadv_hard_iface *hard_iface; in batadv_v_ogm_send() local 178 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_v_ogm_send() 179 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_v_ogm_send() 182 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_v_ogm_send() 189 hard_iface->net_dev->name, in batadv_v_ogm_send() 190 hard_iface->net_dev->dev_addr); in batadv_v_ogm_send() [all …]
|
D | debugfs.c | 307 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument 309 struct net *net = dev_net(hard_iface->net_dev); in batadv_debugfs_add_hardif() 319 hard_iface->debug_dir = debugfs_create_dir(hard_iface->net_dev->name, in batadv_debugfs_add_hardif() 321 if (!hard_iface->debug_dir) in batadv_debugfs_add_hardif() 327 hard_iface->debug_dir, in batadv_debugfs_add_hardif() 328 hard_iface->net_dev, in batadv_debugfs_add_hardif() 336 debugfs_remove_recursive(hard_iface->debug_dir); in batadv_debugfs_add_hardif() 337 hard_iface->debug_dir = NULL; in batadv_debugfs_add_hardif() 347 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument 349 struct net *net = dev_net(hard_iface->net_dev); in batadv_debugfs_del_hardif() [all …]
|
D | main.c | 265 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local 269 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac() 270 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac() 273 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac() 276 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac() 417 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local 421 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv() 428 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_batman_skb_recv() 445 if (!hard_iface->soft_iface) in batadv_batman_skb_recv() 448 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv() [all …]
|
D | debugfs.h | 33 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface); 34 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface); 56 int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_add_hardif() argument 62 void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) in batadv_debugfs_del_hardif() argument
|
D | soft-interface.c | 872 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local 876 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add() 877 if (!hard_iface || hard_iface->soft_iface) in batadv_softif_slave_add() 880 ret = batadv_hardif_enable_interface(hard_iface, net, dev->name); in batadv_softif_slave_add() 883 if (hard_iface) in batadv_softif_slave_add() 884 batadv_hardif_put(hard_iface); in batadv_softif_slave_add() 898 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local 901 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del() 903 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del() 906 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del() [all …]
|
D | netlink.c | 133 struct net_device *hard_iface; in batadv_netlink_mesh_info_put() local 155 hard_iface = primary_if->net_dev; in batadv_netlink_mesh_info_put() 158 hard_iface->ifindex) || in batadv_netlink_mesh_info_put() 160 hard_iface->name) || in batadv_netlink_mesh_info_put() 162 hard_iface->dev_addr)) in batadv_netlink_mesh_info_put() 448 struct batadv_hard_iface *hard_iface) in batadv_netlink_dump_hardif_entry() argument 450 struct net_device *net_dev = hard_iface->net_dev; in batadv_netlink_dump_hardif_entry() 466 if (hard_iface->if_status == BATADV_IF_ACTIVE) { in batadv_netlink_dump_hardif_entry() 491 struct batadv_hard_iface *hard_iface; in batadv_netlink_dump_hardifs() local 514 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_netlink_dump_hardifs() [all …]
|
D | bat_v_elp.h | 26 int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface); 27 void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface); 29 struct batadv_hard_iface *hard_iface);
|
D | originator.h | 46 batadv_hardif_neigh_get(const struct batadv_hard_iface *hard_iface, 52 struct batadv_hard_iface *hard_iface, 80 int batadv_orig_hash_add_if(struct batadv_hard_iface *hard_iface, 82 int batadv_orig_hash_del_if(struct batadv_hard_iface *hard_iface,
|
D | send.h | 41 struct batadv_hard_iface *hard_iface, 44 struct batadv_hard_iface *hard_iface); 52 const struct batadv_hard_iface *hard_iface);
|
D | types.h | 1406 void (*activate)(struct batadv_hard_iface *hard_iface); 1407 int (*enable)(struct batadv_hard_iface *hard_iface); 1408 void (*disable)(struct batadv_hard_iface *hard_iface); 1409 void (*update_mac)(struct batadv_hard_iface *hard_iface); 1410 void (*primary_set)(struct batadv_hard_iface *hard_iface); 1439 struct batadv_hard_iface *hard_iface); 1460 struct batadv_hard_iface *hard_iface); 1464 struct batadv_hard_iface *hard_iface);
|
D | bat_v_ogm.h | 29 int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface);
|
D | routing.h | 28 struct batadv_hard_iface *hard_iface,
|
D | routing.c | 184 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument
|