Lines Matching refs:hard_iface
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()
226 static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_disable() argument
228 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_disable()
230 kfree(hard_iface->bat_iv.ogm_buff); in batadv_iv_ogm_iface_disable()
231 hard_iface->bat_iv.ogm_buff = NULL; in batadv_iv_ogm_iface_disable()
233 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_disable()
236 static void batadv_iv_ogm_iface_update_mac(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_iface_update_mac() argument
241 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_update_mac()
243 ogm_buff = hard_iface->bat_iv.ogm_buff; in batadv_iv_ogm_iface_update_mac()
249 hard_iface->net_dev->dev_addr); in batadv_iv_ogm_iface_update_mac()
251 hard_iface->net_dev->dev_addr); in batadv_iv_ogm_iface_update_mac()
254 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_iface_update_mac()
258 batadv_iv_ogm_primary_iface_set(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_primary_iface_set() argument
263 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_primary_iface_set()
265 ogm_buff = hard_iface->bat_iv.ogm_buff; in batadv_iv_ogm_primary_iface_set()
273 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_primary_iface_set()
334 struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_send_to_if() argument
336 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_iv_ogm_send_to_if()
344 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_iv_ogm_send_to_if()
359 forw_packet->if_incoming == hard_iface) in batadv_iv_ogm_send_to_if()
377 hard_iface->net_dev->name, in batadv_iv_ogm_send_to_if()
378 hard_iface->net_dev->dev_addr); in batadv_iv_ogm_send_to_if()
393 batadv_send_broadcast_skb(skb, hard_iface); in batadv_iv_ogm_send_to_if()
741 batadv_iv_ogm_slide_own_bcast_window(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_slide_own_bcast_window() argument
743 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_iv_ogm_slide_own_bcast_window()
760 if (orig_ifinfo->if_outgoing != hard_iface) in batadv_iv_ogm_slide_own_bcast_window()
780 static void batadv_iv_ogm_schedule_buff(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_schedule_buff() argument
782 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_iv_ogm_schedule_buff()
783 unsigned char **ogm_buff = &hard_iface->bat_iv.ogm_buff; in batadv_iv_ogm_schedule_buff()
786 int *ogm_buff_len = &hard_iface->bat_iv.ogm_buff_len; in batadv_iv_ogm_schedule_buff()
791 lockdep_assert_held(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_schedule_buff()
803 if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED) in batadv_iv_ogm_schedule_buff()
804 hard_iface->if_status = BATADV_IF_ACTIVE; in batadv_iv_ogm_schedule_buff()
808 if (hard_iface == primary_if) { in batadv_iv_ogm_schedule_buff()
822 seqno = (u32)atomic_read(&hard_iface->bat_iv.ogm_seqno); in batadv_iv_ogm_schedule_buff()
824 atomic_inc(&hard_iface->bat_iv.ogm_seqno); in batadv_iv_ogm_schedule_buff()
826 batadv_iv_ogm_slide_own_bcast_window(hard_iface); in batadv_iv_ogm_schedule_buff()
830 if (hard_iface != primary_if) { in batadv_iv_ogm_schedule_buff()
835 hard_iface, hard_iface, 1, send_time); in batadv_iv_ogm_schedule_buff()
844 if (tmp_hard_iface->soft_iface != hard_iface->soft_iface) in batadv_iv_ogm_schedule_buff()
851 *ogm_buff_len, hard_iface, in batadv_iv_ogm_schedule_buff()
862 static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface) in batadv_iv_ogm_schedule() argument
864 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE || in batadv_iv_ogm_schedule()
865 hard_iface->if_status == BATADV_IF_TO_BE_REMOVED) in batadv_iv_ogm_schedule()
868 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_schedule()
869 batadv_iv_ogm_schedule_buff(hard_iface); in batadv_iv_ogm_schedule()
870 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); in batadv_iv_ogm_schedule()
1555 struct batadv_hard_iface *hard_iface; in batadv_iv_ogm_process() local
1599 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_iv_ogm_process()
1600 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_iv_ogm_process()
1603 if (hard_iface->soft_iface != if_incoming->soft_iface) in batadv_iv_ogm_process()
1607 hard_iface->net_dev->dev_addr)) in batadv_iv_ogm_process()
1611 hard_iface->net_dev->dev_addr)) in batadv_iv_ogm_process()
1615 hard_iface->net_dev->dev_addr)) in batadv_iv_ogm_process()
1664 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { in batadv_iv_ogm_process()
1665 if (hard_iface->if_status != BATADV_IF_ACTIVE) in batadv_iv_ogm_process()
1668 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_iv_ogm_process()
1671 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_iv_ogm_process()
1675 if_incoming, hard_iface); in batadv_iv_ogm_process()
1677 batadv_hardif_put(hard_iface); in batadv_iv_ogm_process()
2103 struct batadv_hard_iface *hard_iface, in batadv_iv_ogm_neigh_dump_hardif() argument
2110 &hard_iface->neigh_list, list) { in batadv_iv_ogm_neigh_dump_hardif()
2137 struct batadv_hard_iface *hard_iface; in batadv_iv_ogm_neigh_dump() local
2154 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, in batadv_iv_ogm_neigh_dump()
2156 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_iv_ogm_neigh_dump()
2165 hard_iface, &idx)) { in batadv_iv_ogm_neigh_dump()
2232 static void batadv_iv_iface_enabled(struct batadv_hard_iface *hard_iface) in batadv_iv_iface_enabled() argument
2235 batadv_iv_ogm_schedule(hard_iface); in batadv_iv_iface_enabled()