Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213844
b: refs/heads/master
c: 25aec76
h: refs/heads/master
v: v3
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Aug 19, 2010
1 parent ef87f85 commit 1edc8a7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2244d07bfa2097cb00600da91c715a8aa547917e
refs/heads/master: 25aec76a3bd962f0aae1d7980ab1efa56cb24b43
34 changes: 12 additions & 22 deletions trunk/drivers/net/arm/ether1.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ static int ether1_open(struct net_device *dev);
static int ether1_sendpacket(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t ether1_interrupt(int irq, void *dev_id);
static int ether1_close(struct net_device *dev);
static struct net_device_stats *ether1_getstats(struct net_device *dev);
static void ether1_setmulticastlist(struct net_device *dev);
static void ether1_timeout(struct net_device *dev);

Expand Down Expand Up @@ -649,8 +648,6 @@ ether1_open (struct net_device *dev)
if (request_irq(dev->irq, ether1_interrupt, 0, "ether1", dev))
return -EAGAIN;

memset (&priv(dev)->stats, 0, sizeof (struct net_device_stats));

if (ether1_init_for_open (dev)) {
free_irq (dev->irq, dev);
return -EAGAIN;
Expand All @@ -673,7 +670,7 @@ ether1_timeout(struct net_device *dev)
if (ether1_init_for_open (dev))
printk (KERN_ERR "%s: unable to restart interface\n", dev->name);

priv(dev)->stats.tx_errors++;
dev->stats.tx_errors++;
netif_wake_queue(dev);
}

Expand Down Expand Up @@ -802,21 +799,21 @@ ether1_xmit_done (struct net_device *dev)

while (nop.nop_status & STAT_COMPLETE) {
if (nop.nop_status & STAT_OK) {
priv(dev)->stats.tx_packets ++;
priv(dev)->stats.collisions += (nop.nop_status & STAT_COLLISIONS);
dev->stats.tx_packets++;
dev->stats.collisions += (nop.nop_status & STAT_COLLISIONS);
} else {
priv(dev)->stats.tx_errors ++;
dev->stats.tx_errors++;

if (nop.nop_status & STAT_COLLAFTERTX)
priv(dev)->stats.collisions ++;
dev->stats.collisions++;
if (nop.nop_status & STAT_NOCARRIER)
priv(dev)->stats.tx_carrier_errors ++;
dev->stats.tx_carrier_errors++;
if (nop.nop_status & STAT_TXLOSTCTS)
printk (KERN_WARNING "%s: cts lost\n", dev->name);
if (nop.nop_status & STAT_TXSLOWDMA)
priv(dev)->stats.tx_fifo_errors ++;
dev->stats.tx_fifo_errors++;
if (nop.nop_status & STAT_COLLEXCESSIVE)
priv(dev)->stats.collisions += 16;
dev->stats.collisions += 16;
}

if (nop.nop_link == caddr) {
Expand Down Expand Up @@ -879,13 +876,13 @@ ether1_recv_done (struct net_device *dev)

skb->protocol = eth_type_trans (skb, dev);
netif_rx (skb);
priv(dev)->stats.rx_packets ++;
dev->stats.rx_packets++;
} else
priv(dev)->stats.rx_dropped ++;
dev->stats.rx_dropped++;
} else {
printk(KERN_WARNING "%s: %s\n", dev->name,
(rbd.rbd_status & RBD_EOF) ? "oversized packet" : "acnt not valid");
priv(dev)->stats.rx_dropped ++;
dev->stats.rx_dropped++;
}

nexttail = ether1_readw(dev, priv(dev)->rx_tail, rfd_t, rfd_link, NORMALIRQS);
Expand Down Expand Up @@ -939,7 +936,7 @@ ether1_interrupt (int irq, void *dev_id)
printk (KERN_WARNING "%s: RU went not ready: RU suspended\n", dev->name);
ether1_writew(dev, SCB_CMDRXRESUME, SCB_ADDR, scb_t, scb_command, NORMALIRQS);
writeb(CTRL_CA, REG_CONTROL);
priv(dev)->stats.rx_dropped ++; /* we suspended due to lack of buffer space */
dev->stats.rx_dropped++; /* we suspended due to lack of buffer space */
} else
printk(KERN_WARNING "%s: RU went not ready: %04X\n", dev->name,
ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS));
Expand All @@ -962,12 +959,6 @@ ether1_close (struct net_device *dev)
return 0;
}

static struct net_device_stats *
ether1_getstats (struct net_device *dev)
{
return &priv(dev)->stats;
}

/*
* Set or clear the multicast filter for this adaptor.
* num_addrs == -1 Promiscuous mode, receive all packets.
Expand All @@ -994,7 +985,6 @@ static const struct net_device_ops ether1_netdev_ops = {
.ndo_open = ether1_open,
.ndo_stop = ether1_close,
.ndo_start_xmit = ether1_sendpacket,
.ndo_get_stats = ether1_getstats,
.ndo_set_multicast_list = ether1_setmulticastlist,
.ndo_tx_timeout = ether1_timeout,
.ndo_validate_addr = eth_validate_addr,
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/arm/ether1.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

struct ether1_priv {
void __iomem *base;
struct net_device_stats stats;
unsigned int tx_link;
unsigned int tx_head;
volatile unsigned int tx_tail;
Expand Down

0 comments on commit 1edc8a7

Please sign in to comment.