diff options
author | Joe Perches <joe@perches.com> | 2013-08-01 19:17:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-02 15:33:54 -0400 |
commit | 1409a93274bb1b17f0b7a0b255a75e80899eec11 (patch) | |
tree | 778099b4c28e9089af438ca53f79613c43617069 /drivers/net/ethernet/amd | |
parent | 574e2af7c0af3273836def5e66f236521bb433c9 (diff) |
ethernet: Convert mac address uses of 6 to ETH_ALEN
Use the normal #define to help grep find mac addresses
and ensure that addresses are aligned.
pasemi.h has an unaligned access to mac_addr, unchanged
for now.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Olof Johansson <olof@lixom.net> # pasemi_mac pieces
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r-- | drivers/net/ethernet/amd/pcnet32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index ed2130727643..2d8e28819779 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c | |||
@@ -1521,7 +1521,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
1521 | char *chipname; | 1521 | char *chipname; |
1522 | struct net_device *dev; | 1522 | struct net_device *dev; |
1523 | const struct pcnet32_access *a = NULL; | 1523 | const struct pcnet32_access *a = NULL; |
1524 | u8 promaddr[6]; | 1524 | u8 promaddr[ETH_ALEN]; |
1525 | int ret = -ENODEV; | 1525 | int ret = -ENODEV; |
1526 | 1526 | ||
1527 | /* reset the chip */ | 1527 | /* reset the chip */ |
@@ -1665,10 +1665,10 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | /* read PROM address and compare with CSR address */ | 1667 | /* read PROM address and compare with CSR address */ |
1668 | for (i = 0; i < 6; i++) | 1668 | for (i = 0; i < ETH_ALEN; i++) |
1669 | promaddr[i] = inb(ioaddr + i); | 1669 | promaddr[i] = inb(ioaddr + i); |
1670 | 1670 | ||
1671 | if (memcmp(promaddr, dev->dev_addr, 6) || | 1671 | if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) || |
1672 | !is_valid_ether_addr(dev->dev_addr)) { | 1672 | !is_valid_ether_addr(dev->dev_addr)) { |
1673 | if (is_valid_ether_addr(promaddr)) { | 1673 | if (is_valid_ether_addr(promaddr)) { |
1674 | if (pcnet32_debug & NETIF_MSG_PROBE) { | 1674 | if (pcnet32_debug & NETIF_MSG_PROBE) { |