diff options
Diffstat (limited to 'drivers/net/de600.c')
-rw-r--r-- | drivers/net/de600.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/de600.c b/drivers/net/de600.c index 5dd0d9c0eac9..421c2ca49711 100644 --- a/drivers/net/de600.c +++ b/drivers/net/de600.c | |||
@@ -154,11 +154,6 @@ static int de600_close(struct net_device *dev) | |||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||
157 | static struct net_device_stats *get_stats(struct net_device *dev) | ||
158 | { | ||
159 | return (struct net_device_stats *)(dev->priv); | ||
160 | } | ||
161 | |||
162 | static inline void trigger_interrupt(struct net_device *dev) | 157 | static inline void trigger_interrupt(struct net_device *dev) |
163 | { | 158 | { |
164 | de600_put_command(FLIP_IRQ); | 159 | de600_put_command(FLIP_IRQ); |
@@ -308,7 +303,7 @@ static int de600_tx_intr(struct net_device *dev, int irq_status) | |||
308 | if (!(irq_status & TX_FAILED16)) { | 303 | if (!(irq_status & TX_FAILED16)) { |
309 | tx_fifo_out = (tx_fifo_out + 1) % TX_PAGES; | 304 | tx_fifo_out = (tx_fifo_out + 1) % TX_PAGES; |
310 | ++free_tx_pages; | 305 | ++free_tx_pages; |
311 | ((struct net_device_stats *)(dev->priv))->tx_packets++; | 306 | dev->stats.tx_packets++; |
312 | netif_wake_queue(dev); | 307 | netif_wake_queue(dev); |
313 | } | 308 | } |
314 | 309 | ||
@@ -375,8 +370,8 @@ static void de600_rx_intr(struct net_device *dev) | |||
375 | 370 | ||
376 | /* update stats */ | 371 | /* update stats */ |
377 | dev->last_rx = jiffies; | 372 | dev->last_rx = jiffies; |
378 | ((struct net_device_stats *)(dev->priv))->rx_packets++; /* count all receives */ | 373 | dev->stats.rx_packets++; /* count all receives */ |
379 | ((struct net_device_stats *)(dev->priv))->rx_bytes += size; /* count all received bytes */ | 374 | dev->stats.rx_bytes += size; /* count all received bytes */ |
380 | 375 | ||
381 | /* | 376 | /* |
382 | * If any worth-while packets have been received, netif_rx() | 377 | * If any worth-while packets have been received, netif_rx() |
@@ -390,7 +385,7 @@ static struct net_device * __init de600_probe(void) | |||
390 | struct net_device *dev; | 385 | struct net_device *dev; |
391 | int err; | 386 | int err; |
392 | 387 | ||
393 | dev = alloc_etherdev(sizeof(struct net_device_stats)); | 388 | dev = alloc_etherdev(0); |
394 | if (!dev) | 389 | if (!dev) |
395 | return ERR_PTR(-ENOMEM); | 390 | return ERR_PTR(-ENOMEM); |
396 | 391 | ||
@@ -448,8 +443,6 @@ static struct net_device * __init de600_probe(void) | |||
448 | printk(":%02X",dev->dev_addr[i]); | 443 | printk(":%02X",dev->dev_addr[i]); |
449 | printk("\n"); | 444 | printk("\n"); |
450 | 445 | ||
451 | dev->get_stats = get_stats; | ||
452 | |||
453 | dev->open = de600_open; | 446 | dev->open = de600_open; |
454 | dev->stop = de600_close; | 447 | dev->stop = de600_close; |
455 | dev->hard_start_xmit = &de600_start_xmit; | 448 | dev->hard_start_xmit = &de600_start_xmit; |