atheros/atlx: use SET_ETHTOOL_OPS directly
As commit a6e28b34205b("staging/et131x: use SET_ETHTOOL_OPS directly"), using a wrapper around SET_ETHTOOL_OPS macro is not actually required, remove and use SET_ETHTOOL_OPS directly. Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
80175f93f3
commit
dffe278f0a
|
@ -55,6 +55,7 @@ static const char atl2_driver_name[] = "atl2";
|
||||||
static const char atl2_driver_string[] = "Atheros(R) L2 Ethernet Driver";
|
static const char atl2_driver_string[] = "Atheros(R) L2 Ethernet Driver";
|
||||||
static const char atl2_copyright[] = "Copyright (c) 2007 Atheros Corporation.";
|
static const char atl2_copyright[] = "Copyright (c) 2007 Atheros Corporation.";
|
||||||
static const char atl2_driver_version[] = ATL2_DRV_VERSION;
|
static const char atl2_driver_version[] = ATL2_DRV_VERSION;
|
||||||
|
static const struct ethtool_ops atl2_ethtool_ops;
|
||||||
|
|
||||||
MODULE_AUTHOR("Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>");
|
MODULE_AUTHOR("Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>");
|
||||||
MODULE_DESCRIPTION("Atheros Fast Ethernet Network Driver");
|
MODULE_DESCRIPTION("Atheros Fast Ethernet Network Driver");
|
||||||
|
@ -71,8 +72,6 @@ static DEFINE_PCI_DEVICE_TABLE(atl2_pci_tbl) = {
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, atl2_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, atl2_pci_tbl);
|
||||||
|
|
||||||
static void atl2_set_ethtool_ops(struct net_device *netdev);
|
|
||||||
|
|
||||||
static void atl2_check_options(struct atl2_adapter *adapter);
|
static void atl2_check_options(struct atl2_adapter *adapter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1397,7 +1396,7 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
atl2_setup_pcicmd(pdev);
|
atl2_setup_pcicmd(pdev);
|
||||||
|
|
||||||
netdev->netdev_ops = &atl2_netdev_ops;
|
netdev->netdev_ops = &atl2_netdev_ops;
|
||||||
atl2_set_ethtool_ops(netdev);
|
SET_ETHTOOL_OPS(netdev, &atl2_ethtool_ops);
|
||||||
netdev->watchdog_timeo = 5 * HZ;
|
netdev->watchdog_timeo = 5 * HZ;
|
||||||
strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
|
strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
|
||||||
|
|
||||||
|
@ -2105,11 +2104,6 @@ static const struct ethtool_ops atl2_ethtool_ops = {
|
||||||
.set_eeprom = atl2_set_eeprom,
|
.set_eeprom = atl2_set_eeprom,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void atl2_set_ethtool_ops(struct net_device *netdev)
|
|
||||||
{
|
|
||||||
SET_ETHTOOL_OPS(netdev, &atl2_ethtool_ops);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LBYTESWAP(a) ((((a) & 0x00ff00ff) << 8) | \
|
#define LBYTESWAP(a) ((((a) & 0x00ff00ff) << 8) | \
|
||||||
(((a) & 0xff00ff00) >> 8))
|
(((a) & 0xff00ff00) >> 8))
|
||||||
#define LONGSWAP(a) ((LBYTESWAP(a) << 16) | (LBYTESWAP(a) >> 16))
|
#define LONGSWAP(a) ((LBYTESWAP(a) << 16) | (LBYTESWAP(a) >> 16))
|
||||||
|
|
Loading…
Reference in New Issue