Home
last modified time | relevance | path

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

/net/batman-adv/
Dhard-interface.c51 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 …]
Dbat_v_elp.c47 static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface) in batadv_v_elp_start_timer() argument
51 msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER; in batadv_v_elp_start_timer()
54 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq, in batadv_v_elp_start_timer()
67 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput() local
77 throughput = atomic_read(&hard_iface->bat_v.throughput_override); in batadv_v_elp_get_throughput()
84 if (batadv_is_wifi_hardif(hard_iface)) { in batadv_v_elp_get_throughput()
85 if (!batadv_is_cfg80211_hardif(hard_iface)) in batadv_v_elp_get_throughput()
89 real_netdev = batadv_get_real_netdev(hard_iface->net_dev); in batadv_v_elp_get_throughput()
121 ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings); in batadv_v_elp_get_throughput()
126 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX; in batadv_v_elp_get_throughput()
[all …]
Dbat_v_ogm.c86 static void batadv_v_ogm_start_queue_timer(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_start_queue_timer() argument
92 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.aggr_wq, in batadv_v_ogm_start_queue_timer()
121 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_send_to_if() argument
123 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_send_to_if()
125 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 …]
Dhard-interface.h95 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,
115 static inline void batadv_hardif_put(struct batadv_hard_iface *hard_iface) in batadv_hardif_put() argument
117 kref_put(&hard_iface->refcount, batadv_hardif_release); in batadv_hardif_put()
129 struct batadv_hard_iface *hard_iface; in batadv_primary_if_get_selected() local
132 hard_iface = rcu_dereference(bat_priv->primary_if); in batadv_primary_if_get_selected()
133 if (!hard_iface) in batadv_primary_if_get_selected()
136 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
[all …]
Doriginator.c522 const struct batadv_hard_iface *hard_iface, in batadv_neigh_node_get() argument
532 if (tmp_neigh_node->if_incoming != hard_iface) in batadv_neigh_node_get()
555 batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, in batadv_hardif_neigh_create() argument
559 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create()
562 spin_lock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create()
565 hardif_neigh = batadv_hardif_neigh_get(hard_iface, neigh_addr); in batadv_hardif_neigh_create()
573 kref_get(&hard_iface->refcount); in batadv_hardif_neigh_create()
577 hardif_neigh->if_incoming = hard_iface; in batadv_hardif_neigh_create()
585 hlist_add_head_rcu(&hardif_neigh->list, &hard_iface->neigh_list); in batadv_hardif_neigh_create()
588 spin_unlock_bh(&hard_iface->neigh_list_lock); in batadv_hardif_neigh_create()
[all …]
Dsend.c64 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 …]
Dsysfs.c265 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 …]
Dbat_iv_ogm.c174 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 …]
Dbat_v.c45 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 …]
Ddebugfs.h25 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
Dnetlink.c234 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()
800 struct batadv_hard_iface *hard_iface, in batadv_netlink_hardif_fill() argument
805 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()
834 atomic_read(&hard_iface->bat_v.elp_interval))) in batadv_netlink_hardif_fill()
838 atomic_read(&hard_iface->bat_v.throughput_override))) in batadv_netlink_hardif_fill()
[all …]
Ddebugfs.c318 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 …]
Dmain.c313 const struct batadv_hard_iface *hard_iface; in batadv_is_my_mac() local
317 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_is_my_mac()
318 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_is_my_mac()
321 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac()
324 if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { in batadv_is_my_mac()
477 struct batadv_hard_iface *hard_iface; in batadv_batman_skb_recv() local
480 hard_iface = container_of(ptype, struct batadv_hard_iface, in batadv_batman_skb_recv()
487 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_batman_skb_recv()
504 if (!hard_iface->soft_iface) in batadv_batman_skb_recv()
507 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv()
[all …]
Dsoft-interface.c857 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_add() local
861 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_add()
862 if (!hard_iface || hard_iface->soft_iface) in batadv_softif_slave_add()
865 ret = batadv_hardif_enable_interface(hard_iface, net, dev->name); in batadv_softif_slave_add()
868 if (hard_iface) in batadv_softif_slave_add()
869 batadv_hardif_put(hard_iface); in batadv_softif_slave_add()
883 struct batadv_hard_iface *hard_iface; in batadv_softif_slave_del() local
886 hard_iface = batadv_hardif_get_by_netdev(slave_dev); in batadv_softif_slave_del()
888 if (!hard_iface || hard_iface->soft_iface != dev) in batadv_softif_slave_del()
891 batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); in batadv_softif_slave_del()
[all …]
Dbat_v_elp.h15 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);
Dsend.h36 struct batadv_hard_iface *hard_iface,
39 struct batadv_hard_iface *hard_iface);
48 const struct batadv_hard_iface *hard_iface);
Dtypes.h2193 void (*activate)(struct batadv_hard_iface *hard_iface);
2196 int (*enable)(struct batadv_hard_iface *hard_iface);
2199 void (*enabled)(struct batadv_hard_iface *hard_iface);
2202 void (*disable)(struct batadv_hard_iface *hard_iface);
2208 void (*update_mac)(struct batadv_hard_iface *hard_iface);
2211 void (*primary_set)(struct batadv_hard_iface *hard_iface);
2248 struct batadv_hard_iface *hard_iface);
2258 struct batadv_hard_iface *hard_iface);
2264 struct batadv_hard_iface *hard_iface);
Dbat_v_ogm.h19 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);
Doriginator.h28 batadv_hardif_neigh_get(const struct batadv_hard_iface *hard_iface,
34 struct batadv_hard_iface *hard_iface,
Dnetlink.h26 struct batadv_hard_iface *hard_iface);
Dmulticast.c2362 struct batadv_hard_iface *hard_iface = NULL; in batadv_mcast_netlink_get_primary() local
2381 hard_iface = batadv_primary_if_get_selected(bat_priv); in batadv_mcast_netlink_get_primary()
2382 if (!hard_iface || hard_iface->if_status != BATADV_IF_ACTIVE) { in batadv_mcast_netlink_get_primary()
2392 *primary_if = hard_iface; in batadv_mcast_netlink_get_primary()
2393 else if (hard_iface) in batadv_mcast_netlink_get_primary()
2394 batadv_hardif_put(hard_iface); in batadv_mcast_netlink_get_primary()
Drouting.h16 struct batadv_hard_iface *hard_iface,
Drouting.c181 struct batadv_hard_iface *hard_iface, in batadv_check_management_packet() argument