Lines Matching refs:hard_iface
175 batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface,
183 hard_iface, neigh_addr);
193 static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface)
199 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex);
203 atomic_set(&hard_iface->bat_iv.ogm_seqno, random_seqno);
205 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN;
206 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC);
208 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
212 hard_iface->bat_iv.ogm_buff = ogm_buff;
222 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
227 static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface)
229 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex);
231 kfree(hard_iface->bat_iv.ogm_buff);
232 hard_iface->bat_iv.ogm_buff = NULL;
234 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
237 static void batadv_iv_ogm_iface_update_mac(struct batadv_hard_iface *hard_iface)
242 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex);
244 ogm_buff = hard_iface->bat_iv.ogm_buff;
250 hard_iface->net_dev->dev_addr);
252 hard_iface->net_dev->dev_addr);
255 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
259 batadv_iv_ogm_primary_iface_set(struct batadv_hard_iface *hard_iface)
264 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex);
266 ogm_buff = hard_iface->bat_iv.ogm_buff;
274 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
335 struct batadv_hard_iface *hard_iface)
337 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
345 if (hard_iface->if_status != BATADV_IF_ACTIVE)
360 forw_packet->if_incoming == hard_iface)
378 hard_iface->net_dev->name,
379 hard_iface->net_dev->dev_addr);
394 batadv_send_broadcast_skb(skb, hard_iface);
740 * @hard_iface: the interface for which the windows have to be shifted
743 batadv_iv_ogm_slide_own_bcast_window(struct batadv_hard_iface *hard_iface)
745 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
762 if (orig_ifinfo->if_outgoing != hard_iface)
780 * @hard_iface: interface whose ogm buffer should be transmitted
782 static void batadv_iv_ogm_schedule_buff(struct batadv_hard_iface *hard_iface)
784 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
785 unsigned char **ogm_buff = &hard_iface->bat_iv.ogm_buff;
788 int *ogm_buff_len = &hard_iface->bat_iv.ogm_buff_len;
793 lockdep_assert_held(&hard_iface->bat_iv.ogm_buff_mutex);
805 if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED)
806 hard_iface->if_status = BATADV_IF_ACTIVE;
810 if (hard_iface == primary_if) {
824 seqno = (u32)atomic_read(&hard_iface->bat_iv.ogm_seqno);
826 atomic_inc(&hard_iface->bat_iv.ogm_seqno);
828 batadv_iv_ogm_slide_own_bcast_window(hard_iface);
832 if (hard_iface != primary_if) {
837 hard_iface, hard_iface, 1, send_time);
846 if (tmp_hard_iface->soft_iface != hard_iface->soft_iface)
853 *ogm_buff_len, hard_iface,
865 static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
867 if (hard_iface->if_status == BATADV_IF_NOT_IN_USE ||
868 hard_iface->if_status == BATADV_IF_TO_BE_REMOVED)
871 mutex_lock(&hard_iface->bat_iv.ogm_buff_mutex);
872 batadv_iv_ogm_schedule_buff(hard_iface);
873 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
1568 struct batadv_hard_iface *hard_iface;
1612 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
1613 if (hard_iface->if_status != BATADV_IF_ACTIVE)
1616 if (hard_iface->soft_iface != if_incoming->soft_iface)
1620 hard_iface->net_dev->dev_addr))
1624 hard_iface->net_dev->dev_addr))
1628 hard_iface->net_dev->dev_addr))
1677 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
1678 if (hard_iface->if_status != BATADV_IF_ACTIVE)
1681 if (hard_iface->soft_iface != bat_priv->soft_iface)
1684 if (!kref_get_unless_zero(&hard_iface->refcount))
1688 if_incoming, hard_iface);
1690 batadv_hardif_put(hard_iface);
2144 struct batadv_hard_iface *hard_iface;
2150 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
2151 if (hard_iface->soft_iface != net_dev)
2155 &hard_iface->neigh_list, list) {
2258 * @hard_iface: Hard interface to dump the neighbours for
2268 struct batadv_hard_iface *hard_iface,
2275 &hard_iface->neigh_list, list) {
2302 struct batadv_hard_iface *hard_iface;
2319 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list,
2321 if (hard_iface->soft_iface != bat_priv->soft_iface)
2330 hard_iface, &idx)) {
2397 static void batadv_iv_iface_enabled(struct batadv_hard_iface *hard_iface)
2400 batadv_iv_ogm_schedule(hard_iface);