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>
This commit is contained in:

committed by
David S. Miller

parent
574e2af7c0
commit
1409a93274
@@ -1304,7 +1304,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
struct tulip_private *tp;
|
||||
/* See note below on the multiport cards. */
|
||||
static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'};
|
||||
static unsigned char last_phys_addr[ETH_ALEN] = {
|
||||
0x00, 'L', 'i', 'n', 'u', 'x'
|
||||
};
|
||||
static int last_irq;
|
||||
static int multiport_cnt; /* For four-port boards w/one EEPROM */
|
||||
int i, irq;
|
||||
@@ -1627,8 +1629,8 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
dev->dev_addr[i] = last_phys_addr[i] + 1;
|
||||
#if defined(CONFIG_SPARC)
|
||||
addr = of_get_property(dp, "local-mac-address", &len);
|
||||
if (addr && len == 6)
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
if (addr && len == ETH_ALEN)
|
||||
memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */
|
||||
if (last_irq)
|
||||
|
Reference in New Issue
Block a user