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/dec | |
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/dec')
-rw-r--r-- | drivers/net/ethernet/dec/tulip/tulip_core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c index c94152f1c6be..4e8cfa2ac803 100644 --- a/drivers/net/ethernet/dec/tulip/tulip_core.c +++ b/drivers/net/ethernet/dec/tulip/tulip_core.c | |||
@@ -1304,7 +1304,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1304 | { | 1304 | { |
1305 | struct tulip_private *tp; | 1305 | struct tulip_private *tp; |
1306 | /* See note below on the multiport cards. */ | 1306 | /* See note below on the multiport cards. */ |
1307 | static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'}; | 1307 | static unsigned char last_phys_addr[ETH_ALEN] = { |
1308 | 0x00, 'L', 'i', 'n', 'u', 'x' | ||
1309 | }; | ||
1308 | static int last_irq; | 1310 | static int last_irq; |
1309 | static int multiport_cnt; /* For four-port boards w/one EEPROM */ | 1311 | static int multiport_cnt; /* For four-port boards w/one EEPROM */ |
1310 | int i, irq; | 1312 | int i, irq; |
@@ -1627,8 +1629,8 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1627 | dev->dev_addr[i] = last_phys_addr[i] + 1; | 1629 | dev->dev_addr[i] = last_phys_addr[i] + 1; |
1628 | #if defined(CONFIG_SPARC) | 1630 | #if defined(CONFIG_SPARC) |
1629 | addr = of_get_property(dp, "local-mac-address", &len); | 1631 | addr = of_get_property(dp, "local-mac-address", &len); |
1630 | if (addr && len == 6) | 1632 | if (addr && len == ETH_ALEN) |
1631 | memcpy(dev->dev_addr, addr, 6); | 1633 | memcpy(dev->dev_addr, addr, ETH_ALEN); |
1632 | #endif | 1634 | #endif |
1633 | #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ | 1635 | #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ |
1634 | if (last_irq) | 1636 | if (last_irq) |