Commit d6534799 authored by Yi Zou's avatar Yi Zou Committed by David S. Miller

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: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 61a1fa10
...@@ -626,6 +626,17 @@ static int vlan_dev_fcoe_disable(struct net_device *dev) ...@@ -626,6 +626,17 @@ static int vlan_dev_fcoe_disable(struct net_device *dev)
rc = ops->ndo_fcoe_disable(real_dev); rc = ops->ndo_fcoe_disable(real_dev);
return rc; return rc;
} }
static int vlan_dev_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type)
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
const struct net_device_ops *ops = real_dev->netdev_ops;
int rc = -EINVAL;
if (ops->ndo_fcoe_get_wwn)
rc = ops->ndo_fcoe_get_wwn(real_dev, wwn, type);
return rc;
}
#endif #endif
static void vlan_dev_change_rx_flags(struct net_device *dev, int change) 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,6 +802,7 @@ static const struct net_device_ops vlan_netdev_ops = {
.ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
.ndo_fcoe_enable = vlan_dev_fcoe_enable, .ndo_fcoe_enable = vlan_dev_fcoe_enable,
.ndo_fcoe_disable = vlan_dev_fcoe_disable, .ndo_fcoe_disable = vlan_dev_fcoe_disable,
.ndo_fcoe_get_wwn = vlan_dev_fcoe_get_wwn,
#endif #endif
}; };
...@@ -813,6 +825,7 @@ static const struct net_device_ops vlan_netdev_accel_ops = { ...@@ -813,6 +825,7 @@ static const struct net_device_ops vlan_netdev_accel_ops = {
.ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
.ndo_fcoe_enable = vlan_dev_fcoe_enable, .ndo_fcoe_enable = vlan_dev_fcoe_enable,
.ndo_fcoe_disable = vlan_dev_fcoe_disable, .ndo_fcoe_disable = vlan_dev_fcoe_disable,
.ndo_fcoe_get_wwn = vlan_dev_fcoe_get_wwn,
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment