Lines Matching refs:soft_iface
236 if (!hard_iface || !hard_iface->soft_iface)
239 net = dev_net(hard_iface->soft_iface);
441 batadv_hardif_get_active(const struct net_device *soft_iface)
447 if (hard_iface->soft_iface != soft_iface)
535 * @soft_iface: netdev struct of the mesh interface
537 static void batadv_hardif_recalc_extra_skbroom(struct net_device *soft_iface)
550 if (hard_iface->soft_iface != soft_iface)
570 soft_iface->needed_headroom = needed_headroom;
571 soft_iface->needed_tailroom = lower_tailroom;
576 * @soft_iface: netdev struct of the soft interface
581 int batadv_hardif_min_mtu(struct net_device *soft_iface)
583 struct batadv_priv *bat_priv = netdev_priv(soft_iface);
593 if (hard_iface->soft_iface != soft_iface)
630 * @soft_iface: netdev struct of the soft interface
632 void batadv_update_min_mtu(struct net_device *soft_iface)
634 struct batadv_priv *bat_priv = netdev_priv(soft_iface);
638 mtu = batadv_hardif_min_mtu(soft_iface);
646 dev_set_mtu(soft_iface, mtu);
651 batadv_tt_local_resize_to_mtu(soft_iface);
663 bat_priv = netdev_priv(hard_iface->soft_iface);
675 batadv_info(hard_iface->soft_iface, "Interface activated: %s\n",
678 batadv_update_min_mtu(hard_iface->soft_iface);
696 batadv_info(hard_iface->soft_iface, "Interface deactivated: %s\n",
699 batadv_update_min_mtu(hard_iface->soft_iface);
705 * @soft_iface: netdev struct of the mesh interface
710 struct net_device *soft_iface)
720 required_mtu = READ_ONCE(soft_iface->mtu) + max_header_len;
730 dev_hold(soft_iface);
731 hard_iface->soft_iface = soft_iface;
732 bat_priv = netdev_priv(hard_iface->soft_iface);
735 soft_iface, NULL, NULL, NULL);
751 batadv_info(hard_iface->soft_iface, "Adding interface: %s\n",
756 batadv_info(hard_iface->soft_iface,
763 batadv_info(hard_iface->soft_iface,
771 batadv_err(hard_iface->soft_iface,
775 batadv_hardif_recalc_extra_skbroom(soft_iface);
784 netdev_upper_dev_unlink(hard_iface->net_dev, soft_iface);
786 hard_iface->soft_iface = NULL;
787 dev_put(soft_iface);
794 * @soft_iface: soft interface to check
802 static size_t batadv_hardif_cnt(const struct net_device *soft_iface)
809 if (hard_iface->soft_iface != soft_iface)
825 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
833 batadv_info(hard_iface->soft_iface, "Removing interface: %s\n",
842 new_if = batadv_hardif_get_active(hard_iface->soft_iface);
854 dev_put(hard_iface->soft_iface);
856 netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface);
857 batadv_hardif_recalc_extra_skbroom(hard_iface->soft_iface);
860 if (batadv_hardif_cnt(hard_iface->soft_iface) <= 1)
863 hard_iface->soft_iface = NULL;
887 hard_iface->soft_iface = NULL;
991 if (hard_iface->soft_iface)
992 batadv_update_min_mtu(hard_iface->soft_iface);
1000 bat_priv = netdev_priv(hard_iface->soft_iface);