Explorar el Código

vlan: add set_dump() ethtool api

Add ethtool set_dump() api as "vlan_set_dump()", which calls real device
set_dump() api if implemented. If not implemented, just return -EOPNOTSUPP.

Signed-off-by: Aaron Kramer <a-kramer@ti.com>
Aaron Kramer hace 6 años
padre
commit
118465638a
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      net/8021q/vlan_dev.c

+ 12 - 0
net/8021q/vlan_dev.c

@@ -770,11 +770,23 @@ static int vlan_dev_get_iflink(const struct net_device *dev)
 	return real_dev->ifindex;
 }
 
+static int vlan_set_dump(struct net_device *dev,
+			 struct ethtool_dump *dump)
+{
+	struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
+
+	if (!real_dev->ethtool_ops->set_dump)
+		return -EOPNOTSUPP;
+
+	return real_dev->ethtool_ops->set_dump(real_dev, dump);
+}
+
 static const struct ethtool_ops vlan_ethtool_ops = {
 	.get_link_ksettings	= vlan_ethtool_get_link_ksettings,
 	.get_drvinfo	        = vlan_ethtool_get_drvinfo,
 	.get_link		= ethtool_op_get_link,
 	.get_ts_info		= vlan_ethtool_get_ts_info,
+	.set_dump               = vlan_set_dump,
 };
 
 static const struct net_device_ops vlan_netdev_ops = {