|
@@ -379,6 +379,43 @@ static int enic_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int enic_get_tunable(struct net_device *dev,
|
|
|
|
+ const struct ethtool_tunable *tuna, void *data)
|
|
|
|
+{
|
|
|
|
+ struct enic *enic = netdev_priv(dev);
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
|
|
+ switch (tuna->id) {
|
|
|
|
+ case ETHTOOL_RX_COPYBREAK:
|
|
|
|
+ *(u32 *)data = enic->rx_copybreak;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static int enic_set_tunable(struct net_device *dev,
|
|
|
|
+ const struct ethtool_tunable *tuna,
|
|
|
|
+ const void *data)
|
|
|
|
+{
|
|
|
|
+ struct enic *enic = netdev_priv(dev);
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
|
|
+ switch (tuna->id) {
|
|
|
|
+ case ETHTOOL_RX_COPYBREAK:
|
|
|
|
+ enic->rx_copybreak = *(u32 *)data;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
static const struct ethtool_ops enic_ethtool_ops = {
|
|
static const struct ethtool_ops enic_ethtool_ops = {
|
|
.get_settings = enic_get_settings,
|
|
.get_settings = enic_get_settings,
|
|
.get_drvinfo = enic_get_drvinfo,
|
|
.get_drvinfo = enic_get_drvinfo,
|
|
@@ -391,6 +428,8 @@ static const struct ethtool_ops enic_ethtool_ops = {
|
|
.get_coalesce = enic_get_coalesce,
|
|
.get_coalesce = enic_get_coalesce,
|
|
.set_coalesce = enic_set_coalesce,
|
|
.set_coalesce = enic_set_coalesce,
|
|
.get_rxnfc = enic_get_rxnfc,
|
|
.get_rxnfc = enic_get_rxnfc,
|
|
|
|
+ .get_tunable = enic_get_tunable,
|
|
|
|
+ .set_tunable = enic_set_tunable,
|
|
};
|
|
};
|
|
|
|
|
|
void enic_set_ethtool_ops(struct net_device *netdev)
|
|
void enic_set_ethtool_ops(struct net_device *netdev)
|