• Home
  • Raw
  • Download

Lines Matching refs:hard_iface

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()
123 hard_iface->bat_v.flags &= ~BATADV_FULL_DUPLEX; in batadv_v_elp_get_throughput()
131 if (!(hard_iface->bat_v.flags & BATADV_WARNING_DEFAULT)) { in batadv_v_elp_get_throughput()
132 batadv_info(hard_iface->soft_iface, in batadv_v_elp_get_throughput()
134 hard_iface->net_dev->name, in batadv_v_elp_get_throughput()
137 hard_iface->bat_v.flags |= BATADV_WARNING_DEFAULT; in batadv_v_elp_get_throughput()
182 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_wifi_neigh_probe() local
183 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_elp_wifi_neigh_probe()
190 if (!batadv_is_wifi_netdev(hard_iface->net_dev)) in batadv_v_elp_wifi_neigh_probe()
208 elp_skb_len = hard_iface->bat_v.elp_skb->len; in batadv_v_elp_wifi_neigh_probe()
209 skb = skb_copy_expand(hard_iface->bat_v.elp_skb, 0, in batadv_v_elp_wifi_neigh_probe()
219 skb_put(skb, probe_len - hard_iface->bat_v.elp_skb->len); in batadv_v_elp_wifi_neigh_probe()
223 hard_iface->net_dev->name, neigh->addr); in batadv_v_elp_wifi_neigh_probe()
225 batadv_send_skb_packet(skb, hard_iface, neigh->addr); in batadv_v_elp_wifi_neigh_probe()
240 struct batadv_hard_iface *hard_iface; in batadv_v_elp_periodic_work() local
248 hard_iface = container_of(bat_v, struct batadv_hard_iface, bat_v); in batadv_v_elp_periodic_work()
249 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_elp_periodic_work()
255 if ((hard_iface->if_status == BATADV_IF_NOT_IN_USE) || in batadv_v_elp_periodic_work()
256 (hard_iface->if_status == BATADV_IF_TO_BE_REMOVED)) in batadv_v_elp_periodic_work()
260 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_v_elp_periodic_work()
263 skb = skb_copy(hard_iface->bat_v.elp_skb, GFP_ATOMIC); in batadv_v_elp_periodic_work()
268 elp_packet->seqno = htonl(atomic_read(&hard_iface->bat_v.elp_seqno)); in batadv_v_elp_periodic_work()
269 elp_interval = atomic_read(&hard_iface->bat_v.elp_interval); in batadv_v_elp_periodic_work()
274 hard_iface->net_dev->name, in batadv_v_elp_periodic_work()
275 atomic_read(&hard_iface->bat_v.elp_seqno)); in batadv_v_elp_periodic_work()
277 batadv_send_broadcast_skb(skb, hard_iface); in batadv_v_elp_periodic_work()
279 atomic_inc(&hard_iface->bat_v.elp_seqno); in batadv_v_elp_periodic_work()
293 hlist_for_each_entry_rcu(hardif_neigh, &hard_iface->neigh_list, list) { in batadv_v_elp_periodic_work()
313 batadv_v_elp_start_timer(hard_iface); in batadv_v_elp_periodic_work()
324 int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_v_elp_iface_enable() argument
333 hard_iface->bat_v.elp_skb = dev_alloc_skb(size); in batadv_v_elp_iface_enable()
334 if (!hard_iface->bat_v.elp_skb) in batadv_v_elp_iface_enable()
337 skb_reserve(hard_iface->bat_v.elp_skb, ETH_HLEN + NET_IP_ALIGN); in batadv_v_elp_iface_enable()
338 elp_buff = skb_put(hard_iface->bat_v.elp_skb, BATADV_ELP_HLEN); in batadv_v_elp_iface_enable()
347 atomic_set(&hard_iface->bat_v.elp_seqno, random_seqno); in batadv_v_elp_iface_enable()
350 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX; in batadv_v_elp_iface_enable()
353 hard_iface->bat_v.flags &= ~BATADV_WARNING_DEFAULT; in batadv_v_elp_iface_enable()
355 if (batadv_is_wifi_netdev(hard_iface->net_dev)) in batadv_v_elp_iface_enable()
356 hard_iface->bat_v.flags &= ~BATADV_FULL_DUPLEX; in batadv_v_elp_iface_enable()
358 INIT_DELAYED_WORK(&hard_iface->bat_v.elp_wq, in batadv_v_elp_iface_enable()
360 batadv_v_elp_start_timer(hard_iface); in batadv_v_elp_iface_enable()
371 void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_v_elp_iface_disable() argument
373 cancel_delayed_work_sync(&hard_iface->bat_v.elp_wq); in batadv_v_elp_iface_disable()
375 dev_kfree_skb(hard_iface->bat_v.elp_skb); in batadv_v_elp_iface_disable()
376 hard_iface->bat_v.elp_skb = NULL; in batadv_v_elp_iface_disable()
386 struct batadv_hard_iface *hard_iface) in batadv_v_elp_iface_activate() argument
391 if (!hard_iface->bat_v.elp_skb) in batadv_v_elp_iface_activate()
394 skb = hard_iface->bat_v.elp_skb; in batadv_v_elp_iface_activate()
407 struct batadv_hard_iface *hard_iface; in batadv_v_elp_primary_iface_set() local
411 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_v_elp_primary_iface_set()
412 if (primary_iface->soft_iface != hard_iface->soft_iface) in batadv_v_elp_primary_iface_set()
415 batadv_v_elp_iface_activate(primary_iface, hard_iface); in batadv_v_elp_primary_iface_set()