Lines Matching refs:soft_iface
236 if (!hard_iface || !hard_iface->soft_iface)
239 net = dev_net(hard_iface->soft_iface);
440 batadv_hardif_get_active(const struct net_device *soft_iface)
446 if (hard_iface->soft_iface != soft_iface)
536 * @soft_iface: netdev struct of the mesh interface
538 static void batadv_hardif_recalc_extra_skbroom(struct net_device *soft_iface)
551 if (hard_iface->soft_iface != soft_iface)
571 soft_iface->needed_headroom = needed_headroom;
572 soft_iface->needed_tailroom = lower_tailroom;
577 * @soft_iface: netdev struct of the soft interface
582 int batadv_hardif_min_mtu(struct net_device *soft_iface)
584 struct batadv_priv *bat_priv = netdev_priv(soft_iface);
594 if (hard_iface->soft_iface != soft_iface)
631 * @soft_iface: netdev struct of the soft interface
633 void batadv_update_min_mtu(struct net_device *soft_iface)
635 struct batadv_priv *bat_priv = netdev_priv(soft_iface);
639 mtu = batadv_hardif_min_mtu(soft_iface);
647 dev_set_mtu(soft_iface, mtu);
652 batadv_tt_local_resize_to_mtu(soft_iface);
664 bat_priv = netdev_priv(hard_iface->soft_iface);
676 batadv_info(hard_iface->soft_iface, "Interface activated: %s\n",
679 batadv_update_min_mtu(hard_iface->soft_iface);
698 batadv_info(hard_iface->soft_iface, "Interface deactivated: %s\n",
701 batadv_update_min_mtu(hard_iface->soft_iface);
741 struct net_device *soft_iface, *master;
751 soft_iface = dev_get_by_name(net, iface_name);
753 if (!soft_iface) {
754 soft_iface = batadv_softif_create(net, iface_name);
756 if (!soft_iface) {
762 dev_hold(soft_iface);
765 if (!batadv_softif_is_valid(soft_iface)) {
767 soft_iface->name);
780 hard_iface->soft_iface = soft_iface;
781 bat_priv = netdev_priv(hard_iface->soft_iface);
784 soft_iface, NULL, NULL, NULL);
800 batadv_info(hard_iface->soft_iface, "Adding interface: %s\n",
805 batadv_info(hard_iface->soft_iface,
812 batadv_info(hard_iface->soft_iface,
820 batadv_err(hard_iface->soft_iface,
824 batadv_hardif_recalc_extra_skbroom(soft_iface);
833 netdev_upper_dev_unlink(hard_iface->net_dev, soft_iface);
835 hard_iface->soft_iface = NULL;
836 dev_put(soft_iface);
844 * @soft_iface: soft interface to check
852 static size_t batadv_hardif_cnt(const struct net_device *soft_iface)
859 if (hard_iface->soft_iface != soft_iface)
878 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
886 batadv_info(hard_iface->soft_iface, "Removing interface: %s\n",
895 new_if = batadv_hardif_get_active(hard_iface->soft_iface);
908 dev_put(hard_iface->soft_iface);
910 netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface);
911 batadv_hardif_recalc_extra_skbroom(hard_iface->soft_iface);
914 if (batadv_hardif_cnt(hard_iface->soft_iface) <= 1) {
918 batadv_softif_destroy_sysfs(hard_iface->soft_iface);
921 hard_iface->soft_iface = NULL;
951 hard_iface->soft_iface = NULL;
1066 if (hard_iface->soft_iface)
1067 batadv_update_min_mtu(hard_iface->soft_iface);
1075 bat_priv = netdev_priv(hard_iface->soft_iface);