net:drivers/net: Miscellaneous conversions to ETH_ALEN
Convert the memset/memcpy uses of 6 to ETH_ALEN where appropriate. Also convert some struct definitions and u8 array declarations of [6] to ETH_ALEN. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0b3d8e087b
commit
d458cdf712
@@ -3354,7 +3354,7 @@ use_random_mac_addr:
|
||||
#if defined(CONFIG_SPARC)
|
||||
addr = of_get_property(cp->of_node, "local-mac-address", NULL);
|
||||
if (addr != NULL) {
|
||||
memcpy(dev_addr, addr, 6);
|
||||
memcpy(dev_addr, addr, ETH_ALEN);
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
@@ -2779,7 +2779,7 @@ static int gem_get_device_address(struct gem *gp)
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
#else
|
||||
get_gem_mac_nonobp(gp->pdev, gp->dev->dev_addr);
|
||||
#endif
|
||||
|
@@ -2675,10 +2675,10 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
|
||||
|
||||
addr = of_get_property(dp, "local-mac-address", &len);
|
||||
|
||||
if (qfe_slot != -1 && addr && len == 6)
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
if (qfe_slot != -1 && addr && len == ETH_ALEN)
|
||||
memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
else
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN);
|
||||
}
|
||||
|
||||
hp = netdev_priv(dev);
|
||||
@@ -3024,9 +3024,9 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
||||
(addr = of_get_property(dp, "local-mac-address", &len))
|
||||
!= NULL &&
|
||||
len == 6) {
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
} else {
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN);
|
||||
}
|
||||
#else
|
||||
get_hme_mac_nonsparc(pdev, &dev->dev_addr[0]);
|
||||
|
@@ -843,7 +843,7 @@ static int qec_ether_init(struct platform_device *op)
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN);
|
||||
|
||||
qe = netdev_priv(dev);
|
||||
|
||||
|
Reference in New Issue
Block a user