/Linux-v6.1/net/batman-adv/ |
D | hard-interface.c | 50 struct batadv_hard_iface *hard_iface; in batadv_hardif_release() local 52 hard_iface = container_of(ref, struct batadv_hard_iface, refcount); in batadv_hardif_release() 53 dev_put(hard_iface->net_dev); in batadv_hardif_release() 55 kfree_rcu(hard_iface, rcu); in batadv_hardif_release() 67 struct batadv_hard_iface *hard_iface; in batadv_hardif_get_by_netdev() local 70 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_hardif_get_by_netdev() 71 if (hard_iface->net_dev == net_dev && in batadv_hardif_get_by_netdev() 72 kref_get_unless_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev() 76 hard_iface = NULL; in batadv_hardif_get_by_netdev() 80 return hard_iface; in batadv_hardif_get_by_netdev() [all …]
|
D | bat_v_elp.c | 49 static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface) in batadv_v_elp_start_timer() argument 53 msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER; in batadv_v_elp_start_timer() 56 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq, in batadv_v_elp_start_timer() 69 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput() local 79 throughput = atomic_read(&hard_iface->bat_v.throughput_override); in batadv_v_elp_get_throughput() 86 if (batadv_is_wifi_hardif(hard_iface)) { in batadv_v_elp_get_throughput() 87 if (!batadv_is_cfg80211_hardif(hard_iface)) in batadv_v_elp_get_throughput() 91 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 | 88 static void batadv_v_ogm_start_queue_timer(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_start_queue_timer() argument 94 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.aggr_wq, in batadv_v_ogm_start_queue_timer() 123 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_send_to_if() argument 125 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_send_to_if() 127 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_v_ogm_send_to_if() 134 batadv_send_broadcast_skb(skb, hard_iface); in batadv_v_ogm_send_to_if() 162 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_queue_left() argument 164 unsigned int max = min_t(unsigned int, hard_iface->net_dev->mtu, in batadv_v_ogm_queue_left() 168 lockdep_assert_held(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_queue_left() 170 return hard_iface->bat_v.aggr_len + ogm_len <= max; in batadv_v_ogm_queue_left() [all …]
|
D | hard-interface.h | 72 bool batadv_is_cfg80211_hardif(struct batadv_hard_iface *hard_iface); 73 bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface); 76 int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, 78 void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface); 90 static inline void batadv_hardif_put(struct batadv_hard_iface *hard_iface) in batadv_hardif_put() argument 92 if (!hard_iface) in batadv_hardif_put() 95 kref_put(&hard_iface->refcount, batadv_hardif_release); in batadv_hardif_put() 107 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local 110 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected() 111 if (!hard_iface) in batadv_primary_if_get_selected() [all …]
|
D | bat_v.c | 44 static void batadv_v_iface_activate(struct batadv_hard_iface *hard_iface) in batadv_v_iface_activate() argument 46 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_iface_activate() 52 batadv_v_elp_iface_activate(primary_if, hard_iface); in batadv_v_iface_activate() 60 if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED) in batadv_v_iface_activate() 61 hard_iface->if_status = BATADV_IF_ACTIVE; in batadv_v_iface_activate() 64 static int batadv_v_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_v_iface_enable() argument 68 ret = batadv_v_elp_iface_enable(hard_iface); in batadv_v_iface_enable() 72 ret = batadv_v_ogm_iface_enable(hard_iface); in batadv_v_iface_enable() 74 batadv_v_elp_iface_disable(hard_iface); in batadv_v_iface_enable() 79 static void batadv_v_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_v_iface_disable() argument [all …]
|
D | originator.c | 481 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument 491 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get() 514 batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, in batadv_hardif_neigh_create() argument 518 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create() 521 spin_lock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() 524 hardif_neigh = batadv_hardif_neigh_get(hard_iface, neigh_addr); in batadv_hardif_neigh_create() 532 kref_get(&hard_iface->refcount); in batadv_hardif_neigh_create() 536 hardif_neigh->if_incoming = hard_iface; in batadv_hardif_neigh_create() 544 hlist_add_head_rcu(&hardif_neigh->list, &hard_iface->neigh_list); in batadv_hardif_neigh_create() 547 spin_unlock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create() [all …]
|
D | bat_iv_ogm.c | 174 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_new() argument 182 hard_iface, neigh_addr); in batadv_iv_ogm_neigh_new() 192 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_enable() argument 198 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_enable() 202 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno); in batadv_iv_ogm_iface_enable() 204 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN; in batadv_iv_ogm_iface_enable() 205 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC); in batadv_iv_ogm_iface_enable() 207 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_enable() 211 hard_iface->bat_iv.ogm_buff = ogm_buff; in batadv_iv_ogm_iface_enable() 221 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_enable() [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 | netlink.c | 235 struct net_device *hard_iface; in batadv_netlink_mesh_fill() local 264 hard_iface = primary_if->net_dev; in batadv_netlink_mesh_fill() 267 hard_iface->ifindex) || in batadv_netlink_mesh_fill() 269 hard_iface->name) || in batadv_netlink_mesh_fill() 271 hard_iface->dev_addr)) in batadv_netlink_mesh_fill() 796 struct batadv_hard_iface *hard_iface, in batadv_netlink_hardif_fill() argument 801 struct net_device *net_dev = hard_iface->net_dev; in batadv_netlink_hardif_fill() 827 if (hard_iface->if_status == BATADV_IF_ACTIVE) { in batadv_netlink_hardif_fill() 833 atomic_read(&hard_iface->hop_penalty))) in batadv_netlink_hardif_fill() 838 atomic_read(&hard_iface->bat_v.elp_interval))) in batadv_netlink_hardif_fill() [all …]
|
D | main.c | 306 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local 310 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac() 311 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac() 314 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac() 317 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac() 432 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local 435 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv() 442 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_batman_skb_recv() 459 if (!hard_iface->soft_iface) in batadv_batman_skb_recv() 462 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 | 832 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local 835 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add() 836 if (!hard_iface || hard_iface->soft_iface) in batadv_softif_slave_add() 839 ret = batadv_hardif_enable_interface(hard_iface, dev); in batadv_softif_slave_add() 842 batadv_hardif_put(hard_iface); in batadv_softif_slave_add() 856 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local 859 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del() 861 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del() 864 batadv_hardif_disable_interface(hard_iface); in batadv_softif_slave_del() 868 batadv_hardif_put(hard_iface); in batadv_softif_slave_del() [all …]
|
D | send.h | 36 struct batadv_hard_iface *hard_iface, 39 struct batadv_hard_iface *hard_iface); 52 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 | 2123 void (*activate)(struct batadv_hard_iface *hard_iface); 2126 int (*enable)(struct batadv_hard_iface *hard_iface); 2129 void (*enabled)(struct batadv_hard_iface *hard_iface); 2132 void (*disable)(struct batadv_hard_iface *hard_iface); 2138 void (*update_mac)(struct batadv_hard_iface *hard_iface); 2141 void (*primary_set)(struct batadv_hard_iface *hard_iface); 2173 struct batadv_hard_iface *hard_iface); 2183 struct batadv_hard_iface *hard_iface);
|
D | originator.h | 28 batadv_hardif_neigh_get(const struct batadv_hard_iface *hard_iface, 33 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 | 2220 struct batadv_hard_iface *hard_iface = NULL; in batadv_mcast_netlink_get_primary() local 2239 hard_iface = batadv_primary_if_get_selected(bat_priv); in batadv_mcast_netlink_get_primary() 2240 if (!hard_iface || hard_iface->if_status != BATADV_IF_ACTIVE) { in batadv_mcast_netlink_get_primary() 2249 *primary_if = hard_iface; in batadv_mcast_netlink_get_primary() 2251 batadv_hardif_put(hard_iface); in batadv_mcast_netlink_get_primary()
|
D | routing.c | 178 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument
|