diff options
author | Yi Zou <yi.zou@intel.com> | 2009-10-28 14:25:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-29 04:04:04 -0400 |
commit | d6534799410d2b53e5e80b8a90d6a8bab3de30ed (patch) | |
tree | 14b585f2282cb6a19d181684bccbe8decc5f7851 /net/8021q/vlan_dev.c | |
parent | 61a1fa102ada6d8ee9f2293d126ed9f580ca0751 (diff) |
vlan: Add support to netdev_ops.ndo_fcoe_get_wwn for VLAN device
Implements the netdev_ops.ndo_fcoe_get_wwn for VLAN device.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index e3701977f58d..790fd55ec318 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -626,6 +626,17 @@ static int vlan_dev_fcoe_disable(struct net_device *dev) | |||
626 | rc = ops->ndo_fcoe_disable(real_dev); | 626 | rc = ops->ndo_fcoe_disable(real_dev); |
627 | return rc; | 627 | return rc; |
628 | } | 628 | } |
629 | |||
630 | static int vlan_dev_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type) | ||
631 | { | ||
632 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | ||
633 | const struct net_device_ops *ops = real_dev->netdev_ops; | ||
634 | int rc = -EINVAL; | ||
635 | |||
636 | if (ops->ndo_fcoe_get_wwn) | ||
637 | rc = ops->ndo_fcoe_get_wwn(real_dev, wwn, type); | ||
638 | return rc; | ||
639 | } | ||
629 | #endif | 640 | #endif |
630 | 641 | ||
631 | static void vlan_dev_change_rx_flags(struct net_device *dev, int change) | 642 | static void vlan_dev_change_rx_flags(struct net_device *dev, int change) |
@@ -791,6 +802,7 @@ static const struct net_device_ops vlan_netdev_ops = { | |||
791 | .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, | 802 | .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, |
792 | .ndo_fcoe_enable = vlan_dev_fcoe_enable, | 803 | .ndo_fcoe_enable = vlan_dev_fcoe_enable, |
793 | .ndo_fcoe_disable = vlan_dev_fcoe_disable, | 804 | .ndo_fcoe_disable = vlan_dev_fcoe_disable, |
805 | .ndo_fcoe_get_wwn = vlan_dev_fcoe_get_wwn, | ||
794 | #endif | 806 | #endif |
795 | }; | 807 | }; |
796 | 808 | ||
@@ -813,6 +825,7 @@ static const struct net_device_ops vlan_netdev_accel_ops = { | |||
813 | .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, | 825 | .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, |
814 | .ndo_fcoe_enable = vlan_dev_fcoe_enable, | 826 | .ndo_fcoe_enable = vlan_dev_fcoe_enable, |
815 | .ndo_fcoe_disable = vlan_dev_fcoe_disable, | 827 | .ndo_fcoe_disable = vlan_dev_fcoe_disable, |
828 | .ndo_fcoe_get_wwn = vlan_dev_fcoe_get_wwn, | ||
816 | #endif | 829 | #endif |
817 | }; | 830 | }; |
818 | 831 | ||