diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index a499b6b31ca..d822c92058c 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -67,6 +67,7 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { | |||
67 | {"rx_over_errors", IXGBE_STAT(net_stats.rx_over_errors)}, | 67 | {"rx_over_errors", IXGBE_STAT(net_stats.rx_over_errors)}, |
68 | {"rx_crc_errors", IXGBE_STAT(net_stats.rx_crc_errors)}, | 68 | {"rx_crc_errors", IXGBE_STAT(net_stats.rx_crc_errors)}, |
69 | {"rx_frame_errors", IXGBE_STAT(net_stats.rx_frame_errors)}, | 69 | {"rx_frame_errors", IXGBE_STAT(net_stats.rx_frame_errors)}, |
70 | {"hw_rsc_count", IXGBE_STAT(rsc_count)}, | ||
70 | {"rx_fifo_errors", IXGBE_STAT(net_stats.rx_fifo_errors)}, | 71 | {"rx_fifo_errors", IXGBE_STAT(net_stats.rx_fifo_errors)}, |
71 | {"rx_missed_errors", IXGBE_STAT(net_stats.rx_missed_errors)}, | 72 | {"rx_missed_errors", IXGBE_STAT(net_stats.rx_missed_errors)}, |
72 | {"tx_aborted_errors", IXGBE_STAT(net_stats.tx_aborted_errors)}, | 73 | {"tx_aborted_errors", IXGBE_STAT(net_stats.tx_aborted_errors)}, |
@@ -1127,6 +1128,27 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
1127 | return 0; | 1128 | return 0; |
1128 | } | 1129 | } |
1129 | 1130 | ||
1131 | static int ixgbe_set_flags(struct net_device *netdev, u32 data) | ||
1132 | { | ||
1133 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
1134 | |||
1135 | ethtool_op_set_flags(netdev, data); | ||
1136 | |||
1137 | if (!(adapter->flags & IXGBE_FLAG_RSC_CAPABLE)) | ||
1138 | return 0; | ||
1139 | |||
1140 | /* if state changes we need to update adapter->flags and reset */ | ||
1141 | if ((!!(data & ETH_FLAG_LRO)) != | ||
1142 | (!!(adapter->flags & IXGBE_FLAG_RSC_ENABLED))) { | ||
1143 | adapter->flags ^= IXGBE_FLAG_RSC_ENABLED; | ||
1144 | if (netif_running(netdev)) | ||
1145 | ixgbe_reinit_locked(adapter); | ||
1146 | else | ||
1147 | ixgbe_reset(adapter); | ||
1148 | } | ||
1149 | return 0; | ||
1150 | |||
1151 | } | ||
1130 | 1152 | ||
1131 | static const struct ethtool_ops ixgbe_ethtool_ops = { | 1153 | static const struct ethtool_ops ixgbe_ethtool_ops = { |
1132 | .get_settings = ixgbe_get_settings, | 1154 | .get_settings = ixgbe_get_settings, |
@@ -1161,7 +1183,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops = { | |||
1161 | .get_coalesce = ixgbe_get_coalesce, | 1183 | .get_coalesce = ixgbe_get_coalesce, |
1162 | .set_coalesce = ixgbe_set_coalesce, | 1184 | .set_coalesce = ixgbe_set_coalesce, |
1163 | .get_flags = ethtool_op_get_flags, | 1185 | .get_flags = ethtool_op_get_flags, |
1164 | .set_flags = ethtool_op_set_flags, | 1186 | .set_flags = ixgbe_set_flags, |
1165 | }; | 1187 | }; |
1166 | 1188 | ||
1167 | void ixgbe_set_ethtool_ops(struct net_device *netdev) | 1189 | void ixgbe_set_ethtool_ops(struct net_device *netdev) |