Lines Matching refs:hard_iface

46  * @hard_iface: the interface for which the timer has to be reset
48 static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface)
52 msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER;
55 queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq,
68 struct batadv_hard_iface *hard_iface = neigh->if_incoming;
78 throughput = atomic_read(&hard_iface->bat_v.throughput_override);
85 if (batadv_is_wifi_hardif(hard_iface)) {
86 if (!batadv_is_cfg80211_hardif(hard_iface))
90 real_netdev = batadv_get_real_netdev(hard_iface->net_dev);
128 ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings);
133 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX;
135 hard_iface->bat_v.flags &= ~BATADV_FULL_DUPLEX;
143 if (!(hard_iface->bat_v.flags & BATADV_WARNING_DEFAULT)) {
144 batadv_info(hard_iface->soft_iface,
146 hard_iface->net_dev->name,
149 hard_iface->bat_v.flags |= BATADV_WARNING_DEFAULT;
194 struct batadv_hard_iface *hard_iface = neigh->if_incoming;
195 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
202 if (!batadv_is_wifi_hardif(hard_iface))
220 elp_skb_len = hard_iface->bat_v.elp_skb->len;
221 skb = skb_copy_expand(hard_iface->bat_v.elp_skb, 0,
231 skb_put_zero(skb, probe_len - hard_iface->bat_v.elp_skb->len);
235 hard_iface->net_dev->name, neigh->addr);
237 batadv_send_skb_packet(skb, hard_iface, neigh->addr);
252 struct batadv_hard_iface *hard_iface;
261 hard_iface = container_of(bat_v, struct batadv_hard_iface, bat_v);
262 bat_priv = netdev_priv(hard_iface->soft_iface);
268 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE ||
269 hard_iface->if_status == BATADV_IF_TO_BE_REMOVED)
273 if (hard_iface->if_status != BATADV_IF_ACTIVE)
276 skb = skb_copy(hard_iface->bat_v.elp_skb, GFP_ATOMIC);
281 elp_packet->seqno = htonl(atomic_read(&hard_iface->bat_v.elp_seqno));
282 elp_interval = atomic_read(&hard_iface->bat_v.elp_interval);
287 hard_iface->net_dev->name,
288 atomic_read(&hard_iface->bat_v.elp_seqno));
290 batadv_send_broadcast_skb(skb, hard_iface);
292 atomic_inc(&hard_iface->bat_v.elp_seqno);
299 * 1) if the hard_iface is wifi => send a number of unicast ELPs for
306 hlist_for_each_entry_rcu(hardif_neigh, &hard_iface->neigh_list, list) {
329 batadv_v_elp_start_timer(hard_iface);
336 * @hard_iface: interface for which the data has to be prepared
340 int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface)
350 hard_iface->bat_v.elp_skb = dev_alloc_skb(size);
351 if (!hard_iface->bat_v.elp_skb)
354 skb_reserve(hard_iface->bat_v.elp_skb, ETH_HLEN + NET_IP_ALIGN);
355 elp_buff = skb_put_zero(hard_iface->bat_v.elp_skb,
364 atomic_set(&hard_iface->bat_v.elp_seqno, random_seqno);
367 hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX;
370 hard_iface->bat_v.flags &= ~BATADV_WARNING_DEFAULT;
372 if (batadv_is_wifi_hardif(hard_iface))
373 hard_iface->bat_v.flags &= ~BATADV_FULL_DUPLEX;
375 INIT_DELAYED_WORK(&hard_iface->bat_v.elp_wq,
377 batadv_v_elp_start_timer(hard_iface);
386 * @hard_iface: interface for which the resources have to be released
388 void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface)
390 cancel_delayed_work_sync(&hard_iface->bat_v.elp_wq);
392 dev_kfree_skb(hard_iface->bat_v.elp_skb);
393 hard_iface->bat_v.elp_skb = NULL;
400 * @hard_iface: interface holding the to-be-updated buffer
403 struct batadv_hard_iface *hard_iface)
408 if (!hard_iface->bat_v.elp_skb)
411 skb = hard_iface->bat_v.elp_skb;
424 struct batadv_hard_iface *hard_iface;
428 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
429 if (primary_iface->soft_iface != hard_iface->soft_iface)
432 batadv_v_elp_iface_activate(primary_iface, hard_iface);