Lines Matching refs:hard_iface

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()
181 static void batadv_v_ogm_aggr_list_free(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_aggr_list_free() argument
183 lockdep_assert_held(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_aggr_list_free()
185 __skb_queue_purge(&hard_iface->bat_v.aggr_list); in batadv_v_ogm_aggr_list_free()
186 hard_iface->bat_v.aggr_len = 0; in batadv_v_ogm_aggr_list_free()
200 static void batadv_v_ogm_aggr_send(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_aggr_send() argument
202 unsigned int aggr_len = hard_iface->bat_v.aggr_len; in batadv_v_ogm_aggr_send()
207 lockdep_assert_held(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_aggr_send()
214 batadv_v_ogm_aggr_list_free(hard_iface); in batadv_v_ogm_aggr_send()
221 while ((skb = __skb_dequeue(&hard_iface->bat_v.aggr_list))) { in batadv_v_ogm_aggr_send()
222 hard_iface->bat_v.aggr_len -= batadv_v_ogm_len(skb); in batadv_v_ogm_aggr_send()
230 batadv_v_ogm_send_to_if(skb_aggr, hard_iface); in batadv_v_ogm_aggr_send()
239 struct batadv_hard_iface *hard_iface) in batadv_v_ogm_queue_on_if() argument
241 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_queue_on_if()
244 batadv_v_ogm_send_to_if(skb, hard_iface); in batadv_v_ogm_queue_on_if()
248 spin_lock_bh(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_queue_on_if()
249 if (!batadv_v_ogm_queue_left(skb, hard_iface)) in batadv_v_ogm_queue_on_if()
250 batadv_v_ogm_aggr_send(hard_iface); in batadv_v_ogm_queue_on_if()
252 hard_iface->bat_v.aggr_len += batadv_v_ogm_len(skb); in batadv_v_ogm_queue_on_if()
253 __skb_queue_tail(&hard_iface->bat_v.aggr_list, skb); in batadv_v_ogm_queue_on_if()
254 spin_unlock_bh(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_queue_on_if()
263 struct batadv_hard_iface *hard_iface; in batadv_v_ogm_send_softif() local
303 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_v_ogm_send_softif()
304 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_v_ogm_send_softif()
307 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_v_ogm_send_softif()
310 ret = batadv_hardif_no_broadcast(hard_iface, NULL, NULL); in batadv_v_ogm_send_softif()
329 hard_iface->net_dev->name, type); in batadv_v_ogm_send_softif()
331 batadv_hardif_put(hard_iface); in batadv_v_ogm_send_softif()
339 hard_iface->net_dev->name, in batadv_v_ogm_send_softif()
340 hard_iface->net_dev->dev_addr); in batadv_v_ogm_send_softif()
345 batadv_hardif_put(hard_iface); in batadv_v_ogm_send_softif()
349 batadv_v_ogm_queue_on_if(skb_tmp, hard_iface); in batadv_v_ogm_send_softif()
350 batadv_hardif_put(hard_iface); in batadv_v_ogm_send_softif()
388 struct batadv_hard_iface *hard_iface; in batadv_v_ogm_aggr_work() local
391 hard_iface = container_of(batv, struct batadv_hard_iface, bat_v); in batadv_v_ogm_aggr_work()
393 spin_lock_bh(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_aggr_work()
394 batadv_v_ogm_aggr_send(hard_iface); in batadv_v_ogm_aggr_work()
395 spin_unlock_bh(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_aggr_work()
397 batadv_v_ogm_start_queue_timer(hard_iface); in batadv_v_ogm_aggr_work()
408 int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_iface_enable() argument
410 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_iface_enable()
412 batadv_v_ogm_start_queue_timer(hard_iface); in batadv_v_ogm_iface_enable()
422 void batadv_v_ogm_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_v_ogm_iface_disable() argument
424 cancel_delayed_work_sync(&hard_iface->bat_v.aggr_wq); in batadv_v_ogm_iface_disable()
426 spin_lock_bh(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_iface_disable()
427 batadv_v_ogm_aggr_list_free(hard_iface); in batadv_v_ogm_iface_disable()
428 spin_unlock_bh(&hard_iface->bat_v.aggr_list.lock); in batadv_v_ogm_iface_disable()
859 struct batadv_hard_iface *hard_iface; in batadv_v_ogm_process() local
924 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_v_ogm_process()
925 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_v_ogm_process()
928 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_v_ogm_process()
931 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_v_ogm_process()
934 ret = batadv_hardif_no_broadcast(hard_iface, in batadv_v_ogm_process()
956 ogm_packet->orig, hard_iface->net_dev->name, in batadv_v_ogm_process()
959 batadv_hardif_put(hard_iface); in batadv_v_ogm_process()
965 if_incoming, hard_iface); in batadv_v_ogm_process()
967 batadv_hardif_put(hard_iface); in batadv_v_ogm_process()