aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/typhoon.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-04-16 20:15:47 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-17 20:47:34 -0400
commit86688a8f132a7630f8610c13a349c711fe683b44 (patch)
tree8fd3d699632f64cf58cd2f5383d2914c104f7c38 /drivers/net/typhoon.c
parentaad59c431b77be5cbfa01f2066a036b95981fed9 (diff)
net: typhoon: convert to hw_features
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/typhoon.c')
-rw-r--r--drivers/net/typhoon.c39
1 files changed, 8 insertions, 31 deletions
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 82653cb07857..119c394f71ce 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1144,28 +1144,6 @@ typhoon_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
1144 return 0; 1144 return 0;
1145} 1145}
1146 1146
1147static u32
1148typhoon_get_rx_csum(struct net_device *dev)
1149{
1150 /* For now, we don't allow turning off RX checksums.
1151 */
1152 return 1;
1153}
1154
1155static int
1156typhoon_set_flags(struct net_device *dev, u32 data)
1157{
1158 /* There's no way to turn off the RX VLAN offloading and stripping
1159 * on the current 3XP firmware -- it does not respect the offload
1160 * settings -- so we only allow the user to toggle the TX processing.
1161 */
1162 if (!(data & ETH_FLAG_RXVLAN))
1163 return -EINVAL;
1164
1165 return ethtool_op_set_flags(dev, data,
1166 ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN);
1167}
1168
1169static void 1147static void
1170typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering) 1148typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
1171{ 1149{
@@ -1187,13 +1165,7 @@ static const struct ethtool_ops typhoon_ethtool_ops = {
1187 .get_wol = typhoon_get_wol, 1165 .get_wol = typhoon_get_wol,
1188 .set_wol = typhoon_set_wol, 1166 .set_wol = typhoon_set_wol,
1189 .get_link = ethtool_op_get_link, 1167 .get_link = ethtool_op_get_link,
1190 .get_rx_csum = typhoon_get_rx_csum,
1191 .set_tx_csum = ethtool_op_set_tx_csum,
1192 .set_sg = ethtool_op_set_sg,
1193 .set_tso = ethtool_op_set_tso,
1194 .get_ringparam = typhoon_get_ringparam, 1168 .get_ringparam = typhoon_get_ringparam,
1195 .set_flags = typhoon_set_flags,
1196 .get_flags = ethtool_op_get_flags,
1197}; 1169};
1198 1170
1199static int 1171static int
@@ -2482,10 +2454,15 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2482 2454
2483 /* We can handle scatter gather, up to 16 entries, and 2455 /* We can handle scatter gather, up to 16 entries, and
2484 * we can do IP checksumming (only version 4, doh...) 2456 * we can do IP checksumming (only version 4, doh...)
2457 *
2458 * There's no way to turn off the RX VLAN offloading and stripping
2459 * on the current 3XP firmware -- it does not respect the offload
2460 * settings -- so we only allow the user to toggle the TX processing.
2485 */ 2461 */
2486 dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; 2462 dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
2487 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 2463 NETIF_F_HW_VLAN_TX;
2488 dev->features |= NETIF_F_TSO; 2464 dev->features = dev->hw_features |
2465 NETIF_F_HW_VLAN_RX | NETIF_F_RXCSUM;
2489 2466
2490 if(register_netdev(dev) < 0) { 2467 if(register_netdev(dev) < 0) {
2491 err_msg = "unable to register netdev"; 2468 err_msg = "unable to register netdev";