diff options
-rw-r--r-- | drivers/net/tg3.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b61b52f0a9fb..9975cdb38831 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -165,11 +165,6 @@ | |||
165 | 165 | ||
166 | #define TG3_RAW_IP_ALIGN 2 | 166 | #define TG3_RAW_IP_ALIGN 2 |
167 | 167 | ||
168 | /* number of ETHTOOL_GSTATS u64's */ | ||
169 | #define TG3_NUM_STATS (sizeof(struct tg3_ethtool_stats)/sizeof(u64)) | ||
170 | |||
171 | #define TG3_NUM_TEST 6 | ||
172 | |||
173 | #define TG3_FW_UPDATE_TIMEOUT_SEC 5 | 168 | #define TG3_FW_UPDATE_TIMEOUT_SEC 5 |
174 | 169 | ||
175 | #define FIRMWARE_TG3 "tigon/tg3.bin" | 170 | #define FIRMWARE_TG3 "tigon/tg3.bin" |
@@ -279,7 +274,7 @@ MODULE_DEVICE_TABLE(pci, tg3_pci_tbl); | |||
279 | 274 | ||
280 | static const struct { | 275 | static const struct { |
281 | const char string[ETH_GSTRING_LEN]; | 276 | const char string[ETH_GSTRING_LEN]; |
282 | } ethtool_stats_keys[TG3_NUM_STATS] = { | 277 | } ethtool_stats_keys[] = { |
283 | { "rx_octets" }, | 278 | { "rx_octets" }, |
284 | { "rx_fragments" }, | 279 | { "rx_fragments" }, |
285 | { "rx_ucast_packets" }, | 280 | { "rx_ucast_packets" }, |
@@ -358,9 +353,12 @@ static const struct { | |||
358 | { "nic_tx_threshold_hit" } | 353 | { "nic_tx_threshold_hit" } |
359 | }; | 354 | }; |
360 | 355 | ||
356 | #define TG3_NUM_STATS ARRAY_SIZE(ethtool_stats_keys) | ||
357 | |||
358 | |||
361 | static const struct { | 359 | static const struct { |
362 | const char string[ETH_GSTRING_LEN]; | 360 | const char string[ETH_GSTRING_LEN]; |
363 | } ethtool_test_keys[TG3_NUM_TEST] = { | 361 | } ethtool_test_keys[] = { |
364 | { "nvram test (online) " }, | 362 | { "nvram test (online) " }, |
365 | { "link test (online) " }, | 363 | { "link test (online) " }, |
366 | { "register test (offline)" }, | 364 | { "register test (offline)" }, |
@@ -369,6 +367,9 @@ static const struct { | |||
369 | { "interrupt test (offline)" }, | 367 | { "interrupt test (offline)" }, |
370 | }; | 368 | }; |
371 | 369 | ||
370 | #define TG3_NUM_TEST ARRAY_SIZE(ethtool_test_keys) | ||
371 | |||
372 | |||
372 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) | 373 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) |
373 | { | 374 | { |
374 | writel(val, tp->regs + off); | 375 | writel(val, tp->regs + off); |