aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 96bad8f233e2..6e695acd1ae0 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -561,6 +561,33 @@ static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa)
561 return err; 561 return err;
562} 562}
563 563
564#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
565static int vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid,
566 struct scatterlist *sgl, unsigned int sgc)
567{
568 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
569 const struct net_device_ops *ops = real_dev->netdev_ops;
570 int rc = 0;
571
572 if (ops->ndo_fcoe_ddp_setup)
573 rc = ops->ndo_fcoe_ddp_setup(real_dev, xid, sgl, sgc);
574
575 return rc;
576}
577
578static int vlan_dev_fcoe_ddp_done(struct net_device *dev, u16 xid)
579{
580 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
581 const struct net_device_ops *ops = real_dev->netdev_ops;
582 int len = 0;
583
584 if (ops->ndo_fcoe_ddp_done)
585 len = ops->ndo_fcoe_ddp_done(real_dev, xid);
586
587 return len;
588}
589#endif
590
564static void vlan_dev_change_rx_flags(struct net_device *dev, int change) 591static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
565{ 592{
566 struct net_device *real_dev = vlan_dev_info(dev)->real_dev; 593 struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
@@ -635,6 +662,10 @@ static int vlan_dev_init(struct net_device *dev)
635 if (is_zero_ether_addr(dev->broadcast)) 662 if (is_zero_ether_addr(dev->broadcast))
636 memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len); 663 memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len);
637 664
665#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
666 dev->fcoe_ddp_xid = real_dev->fcoe_ddp_xid;
667#endif
668
638 if (real_dev->features & NETIF_F_HW_VLAN_TX) { 669 if (real_dev->features & NETIF_F_HW_VLAN_TX) {
639 dev->header_ops = real_dev->header_ops; 670 dev->header_ops = real_dev->header_ops;
640 dev->hard_header_len = real_dev->hard_header_len; 671 dev->hard_header_len = real_dev->hard_header_len;
@@ -715,6 +746,10 @@ static const struct net_device_ops vlan_netdev_ops = {
715 .ndo_change_rx_flags = vlan_dev_change_rx_flags, 746 .ndo_change_rx_flags = vlan_dev_change_rx_flags,
716 .ndo_do_ioctl = vlan_dev_ioctl, 747 .ndo_do_ioctl = vlan_dev_ioctl,
717 .ndo_neigh_setup = vlan_dev_neigh_setup, 748 .ndo_neigh_setup = vlan_dev_neigh_setup,
749#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
750 .ndo_fcoe_ddp_setup = vlan_dev_fcoe_ddp_setup,
751 .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
752#endif
718}; 753};
719 754
720static const struct net_device_ops vlan_netdev_accel_ops = { 755static const struct net_device_ops vlan_netdev_accel_ops = {
@@ -731,6 +766,10 @@ static const struct net_device_ops vlan_netdev_accel_ops = {
731 .ndo_change_rx_flags = vlan_dev_change_rx_flags, 766 .ndo_change_rx_flags = vlan_dev_change_rx_flags,
732 .ndo_do_ioctl = vlan_dev_ioctl, 767 .ndo_do_ioctl = vlan_dev_ioctl,
733 .ndo_neigh_setup = vlan_dev_neigh_setup, 768 .ndo_neigh_setup = vlan_dev_neigh_setup,
769#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
770 .ndo_fcoe_ddp_setup = vlan_dev_fcoe_ddp_setup,
771 .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
772#endif
734}; 773};
735 774
736void vlan_setup(struct net_device *dev) 775void vlan_setup(struct net_device *dev)