diff options
Diffstat (limited to 'drivers/net/ethernet/atheros/atlx/atl2.c')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl2.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 265ce1b752ed..78befb522a52 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c | |||
@@ -55,6 +55,7 @@ static const char atl2_driver_name[] = "atl2"; | |||
55 | static const char atl2_driver_string[] = "Atheros(R) L2 Ethernet Driver"; | 55 | static const char atl2_driver_string[] = "Atheros(R) L2 Ethernet Driver"; |
56 | static const char atl2_copyright[] = "Copyright (c) 2007 Atheros Corporation."; | 56 | static const char atl2_copyright[] = "Copyright (c) 2007 Atheros Corporation."; |
57 | static const char atl2_driver_version[] = ATL2_DRV_VERSION; | 57 | static const char atl2_driver_version[] = ATL2_DRV_VERSION; |
58 | static const struct ethtool_ops atl2_ethtool_ops; | ||
58 | 59 | ||
59 | MODULE_AUTHOR("Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>"); | 60 | MODULE_AUTHOR("Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>"); |
60 | MODULE_DESCRIPTION("Atheros Fast Ethernet Network Driver"); | 61 | MODULE_DESCRIPTION("Atheros Fast Ethernet Network Driver"); |
@@ -71,8 +72,6 @@ static DEFINE_PCI_DEVICE_TABLE(atl2_pci_tbl) = { | |||
71 | }; | 72 | }; |
72 | MODULE_DEVICE_TABLE(pci, atl2_pci_tbl); | 73 | MODULE_DEVICE_TABLE(pci, atl2_pci_tbl); |
73 | 74 | ||
74 | static void atl2_set_ethtool_ops(struct net_device *netdev); | ||
75 | |||
76 | static void atl2_check_options(struct atl2_adapter *adapter); | 75 | static void atl2_check_options(struct atl2_adapter *adapter); |
77 | 76 | ||
78 | /** | 77 | /** |
@@ -1397,7 +1396,7 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1397 | atl2_setup_pcicmd(pdev); | 1396 | atl2_setup_pcicmd(pdev); |
1398 | 1397 | ||
1399 | netdev->netdev_ops = &atl2_netdev_ops; | 1398 | netdev->netdev_ops = &atl2_netdev_ops; |
1400 | atl2_set_ethtool_ops(netdev); | 1399 | SET_ETHTOOL_OPS(netdev, &atl2_ethtool_ops); |
1401 | netdev->watchdog_timeo = 5 * HZ; | 1400 | netdev->watchdog_timeo = 5 * HZ; |
1402 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); | 1401 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); |
1403 | 1402 | ||
@@ -2105,11 +2104,6 @@ static const struct ethtool_ops atl2_ethtool_ops = { | |||
2105 | .set_eeprom = atl2_set_eeprom, | 2104 | .set_eeprom = atl2_set_eeprom, |
2106 | }; | 2105 | }; |
2107 | 2106 | ||
2108 | static void atl2_set_ethtool_ops(struct net_device *netdev) | ||
2109 | { | ||
2110 | SET_ETHTOOL_OPS(netdev, &atl2_ethtool_ops); | ||
2111 | } | ||
2112 | |||
2113 | #define LBYTESWAP(a) ((((a) & 0x00ff00ff) << 8) | \ | 2107 | #define LBYTESWAP(a) ((((a) & 0x00ff00ff) << 8) | \ |
2114 | (((a) & 0xff00ff00) >> 8)) | 2108 | (((a) & 0xff00ff00) >> 8)) |
2115 | #define LONGSWAP(a) ((LBYTESWAP(a) << 16) | (LBYTESWAP(a) >> 16)) | 2109 | #define LONGSWAP(a) ((LBYTESWAP(a) << 16) | (LBYTESWAP(a) >> 16)) |