Lines Matching refs:soft_iface

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