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>
This commit is contained in:
parent
aad59c431b
commit
86688a8f13
|
@ -1144,28 +1144,6 @@ typhoon_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32
|
|
||||||
typhoon_get_rx_csum(struct net_device *dev)
|
|
||||||
{
|
|
||||||
/* For now, we don't allow turning off RX checksums.
|
|
||||||
*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
typhoon_set_flags(struct net_device *dev, u32 data)
|
|
||||||
{
|
|
||||||
/* There's no way to turn off the RX VLAN offloading and stripping
|
|
||||||
* on the current 3XP firmware -- it does not respect the offload
|
|
||||||
* settings -- so we only allow the user to toggle the TX processing.
|
|
||||||
*/
|
|
||||||
if (!(data & ETH_FLAG_RXVLAN))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return ethtool_op_set_flags(dev, data,
|
|
||||||
ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||||
{
|
{
|
||||||
|
@ -1187,13 +1165,7 @@ static const struct ethtool_ops typhoon_ethtool_ops = {
|
||||||
.get_wol = typhoon_get_wol,
|
.get_wol = typhoon_get_wol,
|
||||||
.set_wol = typhoon_set_wol,
|
.set_wol = typhoon_set_wol,
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
.get_rx_csum = typhoon_get_rx_csum,
|
|
||||||
.set_tx_csum = ethtool_op_set_tx_csum,
|
|
||||||
.set_sg = ethtool_op_set_sg,
|
|
||||||
.set_tso = ethtool_op_set_tso,
|
|
||||||
.get_ringparam = typhoon_get_ringparam,
|
.get_ringparam = typhoon_get_ringparam,
|
||||||
.set_flags = typhoon_set_flags,
|
|
||||||
.get_flags = ethtool_op_get_flags,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -2482,10 +2454,15 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
|
|
||||||
/* We can handle scatter gather, up to 16 entries, and
|
/* We can handle scatter gather, up to 16 entries, and
|
||||||
* we can do IP checksumming (only version 4, doh...)
|
* we can do IP checksumming (only version 4, doh...)
|
||||||
|
*
|
||||||
|
* There's no way to turn off the RX VLAN offloading and stripping
|
||||||
|
* on the current 3XP firmware -- it does not respect the offload
|
||||||
|
* settings -- so we only allow the user to toggle the TX processing.
|
||||||
*/
|
*/
|
||||||
dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
|
dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
|
||||||
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
|
NETIF_F_HW_VLAN_TX;
|
||||||
dev->features |= NETIF_F_TSO;
|
dev->features = dev->hw_features |
|
||||||
|
NETIF_F_HW_VLAN_RX | NETIF_F_RXCSUM;
|
||||||
|
|
||||||
if(register_netdev(dev) < 0) {
|
if(register_netdev(dev) < 0) {
|
||||||
err_msg = "unable to register netdev";
|
err_msg = "unable to register netdev";
|
||||||
|
|
Loading…
Reference in New Issue