diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-04-18 09:31:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-19 02:03:59 -0400 |
commit | feb990d467f76abe90ae68437eb1db351e67c674 (patch) | |
tree | b08458ac6f8be26055bbc0731cb103461fb7c902 /drivers/net/vxge/vxge-ethtool.c | |
parent | 30f554f925335abad89aaa38eec6828242b27527 (diff) |
net: vxge: convert to hw_features
Side effect: ->gro_enable is removed as napi_gro_receive() does the
fallback itself.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-ethtool.c')
-rw-r--r-- | drivers/net/vxge/vxge-ethtool.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c index 43c458323f83..5aef6c893aee 100644 --- a/drivers/net/vxge/vxge-ethtool.c +++ b/drivers/net/vxge/vxge-ethtool.c | |||
@@ -1071,35 +1071,6 @@ static int vxge_ethtool_get_regs_len(struct net_device *dev) | |||
1071 | return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath; | 1071 | return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | static u32 vxge_get_rx_csum(struct net_device *dev) | ||
1075 | { | ||
1076 | struct vxgedev *vdev = netdev_priv(dev); | ||
1077 | |||
1078 | return vdev->rx_csum; | ||
1079 | } | ||
1080 | |||
1081 | static int vxge_set_rx_csum(struct net_device *dev, u32 data) | ||
1082 | { | ||
1083 | struct vxgedev *vdev = netdev_priv(dev); | ||
1084 | |||
1085 | if (data) | ||
1086 | vdev->rx_csum = 1; | ||
1087 | else | ||
1088 | vdev->rx_csum = 0; | ||
1089 | |||
1090 | return 0; | ||
1091 | } | ||
1092 | |||
1093 | static int vxge_ethtool_op_set_tso(struct net_device *dev, u32 data) | ||
1094 | { | ||
1095 | if (data) | ||
1096 | dev->features |= (NETIF_F_TSO | NETIF_F_TSO6); | ||
1097 | else | ||
1098 | dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6); | ||
1099 | |||
1100 | return 0; | ||
1101 | } | ||
1102 | |||
1103 | static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset) | 1074 | static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset) |
1104 | { | 1075 | { |
1105 | struct vxgedev *vdev = netdev_priv(dev); | 1076 | struct vxgedev *vdev = netdev_priv(dev); |
@@ -1119,40 +1090,6 @@ static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset) | |||
1119 | } | 1090 | } |
1120 | } | 1091 | } |
1121 | 1092 | ||
1122 | static int vxge_set_flags(struct net_device *dev, u32 data) | ||
1123 | { | ||
1124 | struct vxgedev *vdev = netdev_priv(dev); | ||
1125 | enum vxge_hw_status status; | ||
1126 | |||
1127 | if (ethtool_invalid_flags(dev, data, ETH_FLAG_RXHASH)) | ||
1128 | return -EINVAL; | ||
1129 | |||
1130 | if (!!(data & ETH_FLAG_RXHASH) == vdev->devh->config.rth_en) | ||
1131 | return 0; | ||
1132 | |||
1133 | if (netif_running(dev) || (vdev->config.rth_steering == NO_STEERING)) | ||
1134 | return -EINVAL; | ||
1135 | |||
1136 | vdev->devh->config.rth_en = !!(data & ETH_FLAG_RXHASH); | ||
1137 | |||
1138 | /* Enabling RTH requires some of the logic in vxge_device_register and a | ||
1139 | * vpath reset. Due to these restrictions, only allow modification | ||
1140 | * while the interface is down. | ||
1141 | */ | ||
1142 | status = vxge_reset_all_vpaths(vdev); | ||
1143 | if (status != VXGE_HW_OK) { | ||
1144 | vdev->devh->config.rth_en = !vdev->devh->config.rth_en; | ||
1145 | return -EFAULT; | ||
1146 | } | ||
1147 | |||
1148 | if (vdev->devh->config.rth_en) | ||
1149 | dev->features |= NETIF_F_RXHASH; | ||
1150 | else | ||
1151 | dev->features &= ~NETIF_F_RXHASH; | ||
1152 | |||
1153 | return 0; | ||
1154 | } | ||
1155 | |||
1156 | static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms) | 1093 | static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms) |
1157 | { | 1094 | { |
1158 | struct vxgedev *vdev = netdev_priv(dev); | 1095 | struct vxgedev *vdev = netdev_priv(dev); |
@@ -1181,19 +1118,10 @@ static const struct ethtool_ops vxge_ethtool_ops = { | |||
1181 | .get_link = ethtool_op_get_link, | 1118 | .get_link = ethtool_op_get_link, |
1182 | .get_pauseparam = vxge_ethtool_getpause_data, | 1119 | .get_pauseparam = vxge_ethtool_getpause_data, |
1183 | .set_pauseparam = vxge_ethtool_setpause_data, | 1120 | .set_pauseparam = vxge_ethtool_setpause_data, |
1184 | .get_rx_csum = vxge_get_rx_csum, | ||
1185 | .set_rx_csum = vxge_set_rx_csum, | ||
1186 | .get_tx_csum = ethtool_op_get_tx_csum, | ||
1187 | .set_tx_csum = ethtool_op_set_tx_ipv6_csum, | ||
1188 | .get_sg = ethtool_op_get_sg, | ||
1189 | .set_sg = ethtool_op_set_sg, | ||
1190 | .get_tso = ethtool_op_get_tso, | ||
1191 | .set_tso = vxge_ethtool_op_set_tso, | ||
1192 | .get_strings = vxge_ethtool_get_strings, | 1121 | .get_strings = vxge_ethtool_get_strings, |
1193 | .set_phys_id = vxge_ethtool_idnic, | 1122 | .set_phys_id = vxge_ethtool_idnic, |
1194 | .get_sset_count = vxge_ethtool_get_sset_count, | 1123 | .get_sset_count = vxge_ethtool_get_sset_count, |
1195 | .get_ethtool_stats = vxge_get_ethtool_stats, | 1124 | .get_ethtool_stats = vxge_get_ethtool_stats, |
1196 | .set_flags = vxge_set_flags, | ||
1197 | .flash_device = vxge_fw_flash, | 1125 | .flash_device = vxge_fw_flash, |
1198 | }; | 1126 | }; |
1199 | 1127 | ||