diff options
author | Joe Perches <joe@perches.com> | 2011-11-16 04:38:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-16 20:23:18 -0500 |
commit | c857ff6ecef1c7a1eb10c97c72d7230683392e9c (patch) | |
tree | 14ac0e5388b2882fcd9ce1cc6c7f37e35f9a0f90 /drivers | |
parent | 288e12717011c3954daf0eb5c31399e020776a19 (diff) |
amd8111e: Convert ETH_ADDR_LEN uses to ETH_ALEN
Reduce the number of #defines, use the normal #define from if_ether.h
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/amd/amd8111e.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/amd8111e.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index a388118ee8e6..33e0a8c20f6b 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c | |||
@@ -499,7 +499,7 @@ static int amd8111e_restart(struct net_device *dev) | |||
499 | writel( VAL0 | APAD_XMT | REX_RTRY, mmio + CMD2 ); | 499 | writel( VAL0 | APAD_XMT | REX_RTRY, mmio + CMD2 ); |
500 | 500 | ||
501 | /* Setting the MAC address to the device */ | 501 | /* Setting the MAC address to the device */ |
502 | for(i = 0; i < ETH_ADDR_LEN; i++) | 502 | for (i = 0; i < ETH_ALEN; i++) |
503 | writeb( dev->dev_addr[i], mmio + PADR + i ); | 503 | writeb( dev->dev_addr[i], mmio + PADR + i ); |
504 | 504 | ||
505 | /* Enable interrupt coalesce */ | 505 | /* Enable interrupt coalesce */ |
@@ -1550,7 +1550,7 @@ static int amd8111e_set_mac_address(struct net_device *dev, void *p) | |||
1550 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); | 1550 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); |
1551 | spin_lock_irq(&lp->lock); | 1551 | spin_lock_irq(&lp->lock); |
1552 | /* Setting the MAC address to the device */ | 1552 | /* Setting the MAC address to the device */ |
1553 | for(i = 0; i < ETH_ADDR_LEN; i++) | 1553 | for (i = 0; i < ETH_ALEN; i++) |
1554 | writeb( dev->dev_addr[i], lp->mmio + PADR + i ); | 1554 | writeb( dev->dev_addr[i], lp->mmio + PADR + i ); |
1555 | 1555 | ||
1556 | spin_unlock_irq(&lp->lock); | 1556 | spin_unlock_irq(&lp->lock); |
@@ -1886,7 +1886,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, | |||
1886 | } | 1886 | } |
1887 | 1887 | ||
1888 | /* Initializing MAC address */ | 1888 | /* Initializing MAC address */ |
1889 | for(i = 0; i < ETH_ADDR_LEN; i++) | 1889 | for (i = 0; i < ETH_ALEN; i++) |
1890 | dev->dev_addr[i] = readb(lp->mmio + PADR + i); | 1890 | dev->dev_addr[i] = readb(lp->mmio + PADR + i); |
1891 | 1891 | ||
1892 | /* Setting user defined parametrs */ | 1892 | /* Setting user defined parametrs */ |
diff --git a/drivers/net/ethernet/amd/amd8111e.h b/drivers/net/ethernet/amd/amd8111e.h index 2ff2e7a12dd0..5bbb53a1999c 100644 --- a/drivers/net/ethernet/amd/amd8111e.h +++ b/drivers/net/ethernet/amd/amd8111e.h | |||
@@ -586,7 +586,6 @@ typedef enum { | |||
586 | 586 | ||
587 | #define PKT_BUFF_SZ 1536 | 587 | #define PKT_BUFF_SZ 1536 |
588 | #define MIN_PKT_LEN 60 | 588 | #define MIN_PKT_LEN 60 |
589 | #define ETH_ADDR_LEN 6 | ||
590 | 589 | ||
591 | #define AMD8111E_TX_TIMEOUT (3 * HZ)/* 3 sec */ | 590 | #define AMD8111E_TX_TIMEOUT (3 * HZ)/* 3 sec */ |
592 | #define SOFT_TIMER_FREQ 0xBEBC /* 0.5 sec */ | 591 | #define SOFT_TIMER_FREQ 0xBEBC /* 0.5 sec */ |