summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/pcnet32.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-08-01 23:17:49 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-08-02 19:33:54 (GMT)
commit1409a93274bb1b17f0b7a0b255a75e80899eec11 (patch)
tree778099b4c28e9089af438ca53f79613c43617069 /drivers/net/ethernet/amd/pcnet32.c
parent574e2af7c0af3273836def5e66f236521bb433c9 (diff)
downloadlinux-fsl-qoriq-1409a93274bb1b17f0b7a0b255a75e80899eec11.tar.xz
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/pcnet32.c')
-rw-r--r--drivers/net/ethernet/amd/pcnet32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index ed21307..2d8e288 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)
char *chipname;
struct net_device *dev;
const struct pcnet32_access *a = NULL;
- u8 promaddr[6];
+ u8 promaddr[ETH_ALEN];
int ret = -ENODEV;
/* reset the chip */
@@ -1665,10 +1665,10 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
}
/* read PROM address and compare with CSR address */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < ETH_ALEN; i++)
promaddr[i] = inb(ioaddr + i);
- if (memcmp(promaddr, dev->dev_addr, 6) ||
+ if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
!is_valid_ether_addr(dev->dev_addr)) {
if (is_valid_ether_addr(promaddr)) {
if (pcnet32_debug & NETIF_MSG_PROBE) {