Skip to content

Commit

Permalink
amd8111e: Convert ETH_ADDR_LEN uses to ETH_ALEN
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and David S. Miller committed Nov 17, 2011
1 parent 288e127 commit c857ff6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/amd/amd8111e.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ static int amd8111e_restart(struct net_device *dev)
writel( VAL0 | APAD_XMT | REX_RTRY, mmio + CMD2 );

/* Setting the MAC address to the device */
for(i = 0; i < ETH_ADDR_LEN; i++)
for (i = 0; i < ETH_ALEN; i++)
writeb( dev->dev_addr[i], mmio + PADR + i );

/* Enable interrupt coalesce */
Expand Down Expand Up @@ -1550,7 +1550,7 @@ static int amd8111e_set_mac_address(struct net_device *dev, void *p)
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
spin_lock_irq(&lp->lock);
/* Setting the MAC address to the device */
for(i = 0; i < ETH_ADDR_LEN; i++)
for (i = 0; i < ETH_ALEN; i++)
writeb( dev->dev_addr[i], lp->mmio + PADR + i );

spin_unlock_irq(&lp->lock);
Expand Down Expand Up @@ -1886,7 +1886,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
}

/* Initializing MAC address */
for(i = 0; i < ETH_ADDR_LEN; i++)
for (i = 0; i < ETH_ALEN; i++)
dev->dev_addr[i] = readb(lp->mmio + PADR + i);

/* Setting user defined parametrs */
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/amd/amd8111e.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ typedef enum {

#define PKT_BUFF_SZ 1536
#define MIN_PKT_LEN 60
#define ETH_ADDR_LEN 6

#define AMD8111E_TX_TIMEOUT (3 * HZ)/* 3 sec */
#define SOFT_TIMER_FREQ 0xBEBC /* 0.5 sec */
Expand Down

0 comments on commit c857ff6

Please sign in to comment.