Lines Matching refs:real_dev
99 struct net_device *real_dev; member
339 if (!macsec || !macsec->real_dev) in macsec_check_offload()
343 return macsec->real_dev->phydev && in macsec_check_offload()
344 macsec->real_dev->phydev->macsec_ops; in macsec_check_offload()
346 return macsec->real_dev->features & NETIF_F_HW_MACSEC && in macsec_check_offload()
347 macsec->real_dev->macsec_ops; in macsec_check_offload()
361 ctx->phydev = macsec->real_dev->phydev; in __macsec_get_ops()
363 ctx->netdev = macsec->real_dev; in __macsec_get_ops()
367 return macsec->real_dev->phydev->macsec_ops; in __macsec_get_ops()
369 return macsec->real_dev->macsec_ops; in __macsec_get_ops()
486 skb->dev = macsec->real_dev; in macsec_encrypt_finish()
652 if (skb->len - ETH_HLEN > macsec_priv(dev)->real_dev->mtu) { in macsec_encrypt()
1421 struct net_device *real_dev = macsec_priv(dev)->real_dev; in create_rx_sc() local
1422 struct macsec_rxh_data *rxd = macsec_data_rtnl(real_dev); in create_rx_sc()
3402 skb->dev = macsec->real_dev; in macsec_start_xmit()
3412 skb->dev = macsec->real_dev; in macsec_start_xmit()
3447 struct net_device *real_dev = macsec->real_dev; in macsec_dev_init() local
3460 dev->features = real_dev->features & MACSEC_FEATURES; in macsec_dev_init()
3463 dev->needed_headroom = real_dev->needed_headroom + in macsec_dev_init()
3465 dev->needed_tailroom = real_dev->needed_tailroom + in macsec_dev_init()
3469 eth_hw_addr_inherit(dev, real_dev); in macsec_dev_init()
3471 memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len); in macsec_dev_init()
3474 netdev_hold(real_dev, &macsec->dev_tracker, GFP_KERNEL); in macsec_dev_init()
3491 struct net_device *real_dev = macsec->real_dev; in macsec_fix_features() local
3493 features &= (real_dev->features & MACSEC_FEATURES) | in macsec_fix_features()
3503 struct net_device *real_dev = macsec->real_dev; in macsec_dev_open() local
3506 err = dev_uc_add(real_dev, dev->dev_addr); in macsec_dev_open()
3511 err = dev_set_allmulti(real_dev, 1); in macsec_dev_open()
3517 err = dev_set_promiscuity(real_dev, 1); in macsec_dev_open()
3539 if (netif_carrier_ok(real_dev)) in macsec_dev_open()
3545 dev_set_allmulti(real_dev, -1); in macsec_dev_open()
3547 dev_uc_del(real_dev, dev->dev_addr); in macsec_dev_open()
3555 struct net_device *real_dev = macsec->real_dev; in macsec_dev_stop() local
3571 dev_mc_unsync(real_dev, dev); in macsec_dev_stop()
3572 dev_uc_unsync(real_dev, dev); in macsec_dev_stop()
3575 dev_set_allmulti(real_dev, -1); in macsec_dev_stop()
3578 dev_set_promiscuity(real_dev, -1); in macsec_dev_stop()
3580 dev_uc_del(real_dev, dev->dev_addr); in macsec_dev_stop()
3587 struct net_device *real_dev = macsec_priv(dev)->real_dev; in macsec_dev_change_rx_flags() local
3593 dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); in macsec_dev_change_rx_flags()
3596 dev_set_promiscuity(real_dev, in macsec_dev_change_rx_flags()
3602 struct net_device *real_dev = macsec_priv(dev)->real_dev; in macsec_dev_set_rx_mode() local
3604 dev_mc_sync(real_dev, dev); in macsec_dev_set_rx_mode()
3605 dev_uc_sync(real_dev, dev); in macsec_dev_set_rx_mode()
3611 struct net_device *real_dev = macsec->real_dev; in macsec_set_mac_address() local
3621 err = dev_uc_add(real_dev, addr->sa_data); in macsec_set_mac_address()
3625 dev_uc_del(real_dev, dev->dev_addr); in macsec_set_mac_address()
3650 if (macsec->real_dev->mtu - extra < new_mtu) in macsec_change_mtu()
3673 return macsec_priv(dev)->real_dev->ifindex; in macsec_get_iflink()
3722 netdev_put(macsec->real_dev, &macsec->dev_tracker); in macsec_free_netdev()
3893 struct net_device *real_dev = macsec->real_dev; in macsec_common_dellink() local
3910 netdev_upper_dev_unlink(real_dev, dev); in macsec_common_dellink()
3918 struct net_device *real_dev = macsec->real_dev; in macsec_dellink() local
3919 struct macsec_rxh_data *rxd = macsec_data_rtnl(real_dev); in macsec_dellink()
3924 netdev_rx_handler_unregister(real_dev); in macsec_dellink()
3929 static int register_macsec_dev(struct net_device *real_dev, in register_macsec_dev() argument
3933 struct macsec_rxh_data *rxd = macsec_data_rtnl(real_dev); in register_macsec_dev()
3944 err = netdev_rx_handler_register(real_dev, macsec_handle_frame, in register_macsec_dev()
4029 struct net_device *real_dev; in macsec_newlink() local
4035 real_dev = __dev_get_by_index(net, nla_get_u32(tb[IFLA_LINK])); in macsec_newlink()
4036 if (!real_dev) in macsec_newlink()
4038 if (real_dev->type != ARPHRD_ETHER) in macsec_newlink()
4043 macsec->real_dev = real_dev; in macsec_newlink()
4067 mtu = real_dev->mtu - icv_len - macsec_extra_len(true); in macsec_newlink()
4073 rx_handler = rtnl_dereference(real_dev->rx_handler); in macsec_newlink()
4085 err = netdev_upper_dev_link(real_dev, dev, extack); in macsec_newlink()
4099 if (rx_handler && sci_exists(real_dev, sci)) { in macsec_newlink()
4128 err = register_macsec_dev(real_dev, dev); in macsec_newlink()
4132 netif_stacked_transfer_operstate(real_dev, dev); in macsec_newlink()
4142 netdev_upper_dev_unlink(real_dev, dev); in macsec_newlink()
4226 return dev_net(macsec_priv(dev)->real_dev); in macsec_get_link_net()
4314 struct net_device *real_dev = netdev_notifier_info_to_dev(ptr); in macsec_notify() local
4317 if (!is_macsec_master(real_dev)) in macsec_notify()
4327 rxd = macsec_data_rtnl(real_dev); in macsec_notify()
4331 netif_stacked_transfer_operstate(real_dev, dev); in macsec_notify()
4339 rxd = macsec_data_rtnl(real_dev); in macsec_notify()
4344 netdev_rx_handler_unregister(real_dev); in macsec_notify()
4354 rxd = macsec_data_rtnl(real_dev); in macsec_notify()
4357 unsigned int mtu = real_dev->mtu - (m->secy.icv_len + in macsec_notify()