Lines Matching refs:soft_iface
235 if (!hard_iface || !hard_iface->soft_iface) in batadv_get_real_netdevice()
238 net = dev_net(hard_iface->soft_iface); in batadv_get_real_netdevice()
440 batadv_hardif_get_active(const struct net_device *soft_iface) in batadv_hardif_get_active() argument
446 if (hard_iface->soft_iface != soft_iface) in batadv_hardif_get_active()
536 static void batadv_hardif_recalc_extra_skbroom(struct net_device *soft_iface) in batadv_hardif_recalc_extra_skbroom() argument
549 if (hard_iface->soft_iface != soft_iface) in batadv_hardif_recalc_extra_skbroom()
569 soft_iface->needed_headroom = needed_headroom; in batadv_hardif_recalc_extra_skbroom()
570 soft_iface->needed_tailroom = lower_tailroom; in batadv_hardif_recalc_extra_skbroom()
580 int batadv_hardif_min_mtu(struct net_device *soft_iface) in batadv_hardif_min_mtu() argument
582 struct batadv_priv *bat_priv = netdev_priv(soft_iface); in batadv_hardif_min_mtu()
592 if (hard_iface->soft_iface != soft_iface) in batadv_hardif_min_mtu()
631 void batadv_update_min_mtu(struct net_device *soft_iface) in batadv_update_min_mtu() argument
633 soft_iface->mtu = batadv_hardif_min_mtu(soft_iface); in batadv_update_min_mtu()
638 batadv_tt_local_resize_to_mtu(soft_iface); in batadv_update_min_mtu()
650 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_activate_interface()
662 batadv_info(hard_iface->soft_iface, "Interface activated: %s\n", in batadv_hardif_activate_interface()
665 batadv_update_min_mtu(hard_iface->soft_iface); in batadv_hardif_activate_interface()
683 batadv_info(hard_iface->soft_iface, "Interface deactivated: %s\n", in batadv_hardif_deactivate_interface()
686 batadv_update_min_mtu(hard_iface->soft_iface); in batadv_hardif_deactivate_interface()
697 struct net_device *soft_iface) in batadv_hardif_enable_interface() argument
712 dev_hold(soft_iface); in batadv_hardif_enable_interface()
713 hard_iface->soft_iface = soft_iface; in batadv_hardif_enable_interface()
714 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_enable_interface()
717 soft_iface, NULL, NULL, NULL); in batadv_hardif_enable_interface()
733 batadv_info(hard_iface->soft_iface, "Adding interface: %s\n", in batadv_hardif_enable_interface()
738 batadv_info(hard_iface->soft_iface, in batadv_hardif_enable_interface()
745 batadv_info(hard_iface->soft_iface, in batadv_hardif_enable_interface()
753 batadv_err(hard_iface->soft_iface, in batadv_hardif_enable_interface()
757 batadv_hardif_recalc_extra_skbroom(soft_iface); in batadv_hardif_enable_interface()
766 netdev_upper_dev_unlink(hard_iface->net_dev, soft_iface); in batadv_hardif_enable_interface()
768 hard_iface->soft_iface = NULL; in batadv_hardif_enable_interface()
769 dev_put(soft_iface); in batadv_hardif_enable_interface()
784 static size_t batadv_hardif_cnt(const struct net_device *soft_iface) in batadv_hardif_cnt() argument
791 if (hard_iface->soft_iface != soft_iface) in batadv_hardif_cnt()
807 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_disable_interface()
815 batadv_info(hard_iface->soft_iface, "Removing interface: %s\n", in batadv_hardif_disable_interface()
824 new_if = batadv_hardif_get_active(hard_iface->soft_iface); in batadv_hardif_disable_interface()
836 dev_put(hard_iface->soft_iface); in batadv_hardif_disable_interface()
838 netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface); in batadv_hardif_disable_interface()
839 batadv_hardif_recalc_extra_skbroom(hard_iface->soft_iface); in batadv_hardif_disable_interface()
842 if (batadv_hardif_cnt(hard_iface->soft_iface) <= 1) in batadv_hardif_disable_interface()
845 hard_iface->soft_iface = NULL; in batadv_hardif_disable_interface()
869 hard_iface->soft_iface = NULL; in batadv_hardif_add_interface()
973 if (hard_iface->soft_iface) in batadv_hard_if_event()
974 batadv_update_min_mtu(hard_iface->soft_iface); in batadv_hard_if_event()
982 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hard_if_event()