diff options
-rw-r--r-- | drivers/net/ethernet/8390/ax88796.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/pcnet32.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic_if.h | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/dec/tulip/tulip_core.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/sun3_82586.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/nuvoton/w90p910_ether.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/pasemi/pasemi_mac.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/pasemi/pasemi_mac.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlge/qlge.h | 2 |
11 files changed, 29 insertions, 26 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index e1d26433d619..b7232a9b7756 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c | |||
@@ -707,7 +707,7 @@ static int ax_init_dev(struct net_device *dev) | |||
707 | 707 | ||
708 | #ifdef CONFIG_AX88796_93CX6 | 708 | #ifdef CONFIG_AX88796_93CX6 |
709 | if (ax->plat->flags & AXFLG_HAS_93CX6) { | 709 | if (ax->plat->flags & AXFLG_HAS_93CX6) { |
710 | unsigned char mac_addr[6]; | 710 | unsigned char mac_addr[ETH_ALEN]; |
711 | struct eeprom_93cx6 eeprom; | 711 | struct eeprom_93cx6 eeprom; |
712 | 712 | ||
713 | eeprom.data = ei_local; | 713 | eeprom.data = ei_local; |
@@ -719,7 +719,7 @@ static int ax_init_dev(struct net_device *dev) | |||
719 | (__le16 __force *)mac_addr, | 719 | (__le16 __force *)mac_addr, |
720 | sizeof(mac_addr) >> 1); | 720 | sizeof(mac_addr) >> 1); |
721 | 721 | ||
722 | memcpy(dev->dev_addr, mac_addr, 6); | 722 | memcpy(dev->dev_addr, mac_addr, ETH_ALEN); |
723 | } | 723 | } |
724 | #endif | 724 | #endif |
725 | if (ax->plat->wordlength == 2) { | 725 | if (ax->plat->wordlength == 2) { |
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) { |
diff --git a/drivers/net/ethernet/broadcom/cnic_if.h b/drivers/net/ethernet/broadcom/cnic_if.h index 82a03120fcb1..95aff7642b85 100644 --- a/drivers/net/ethernet/broadcom/cnic_if.h +++ b/drivers/net/ethernet/broadcom/cnic_if.h | |||
@@ -238,8 +238,8 @@ struct cnic_sock { | |||
238 | u16 src_port; | 238 | u16 src_port; |
239 | u16 dst_port; | 239 | u16 dst_port; |
240 | u16 vlan_id; | 240 | u16 vlan_id; |
241 | unsigned char old_ha[6]; | 241 | unsigned char old_ha[ETH_ALEN]; |
242 | unsigned char ha[6]; | 242 | unsigned char ha[ETH_ALEN]; |
243 | u32 mtu; | 243 | u32 mtu; |
244 | u32 cid; | 244 | u32 cid; |
245 | u32 l5_cid; | 245 | u32 l5_cid; |
@@ -308,7 +308,7 @@ struct cnic_dev { | |||
308 | #define CNIC_F_BNX2_CLASS 3 | 308 | #define CNIC_F_BNX2_CLASS 3 |
309 | #define CNIC_F_BNX2X_CLASS 4 | 309 | #define CNIC_F_BNX2X_CLASS 4 |
310 | atomic_t ref_count; | 310 | atomic_t ref_count; |
311 | u8 mac_addr[6]; | 311 | u8 mac_addr[ETH_ALEN]; |
312 | 312 | ||
313 | int max_iscsi_conn; | 313 | int max_iscsi_conn; |
314 | int max_fcoe_conn; | 314 | int max_fcoe_conn; |
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) |
diff --git a/drivers/net/ethernet/i825xx/sun3_82586.h b/drivers/net/ethernet/i825xx/sun3_82586.h index 93346f00486b..79aef681ac85 100644 --- a/drivers/net/ethernet/i825xx/sun3_82586.h +++ b/drivers/net/ethernet/i825xx/sun3_82586.h | |||
@@ -133,8 +133,8 @@ struct rfd_struct | |||
133 | unsigned char last; /* Bit15,Last Frame on List / Bit14,suspend */ | 133 | unsigned char last; /* Bit15,Last Frame on List / Bit14,suspend */ |
134 | unsigned short next; /* linkoffset to next RFD */ | 134 | unsigned short next; /* linkoffset to next RFD */ |
135 | unsigned short rbd_offset; /* pointeroffset to RBD-buffer */ | 135 | unsigned short rbd_offset; /* pointeroffset to RBD-buffer */ |
136 | unsigned char dest[6]; /* ethernet-address, destination */ | 136 | unsigned char dest[ETH_ALEN]; /* ethernet-address, destination */ |
137 | unsigned char source[6]; /* ethernet-address, source */ | 137 | unsigned char source[ETH_ALEN]; /* ethernet-address, source */ |
138 | unsigned short length; /* 802.3 frame-length */ | 138 | unsigned short length; /* 802.3 frame-length */ |
139 | unsigned short zero_dummy; /* dummy */ | 139 | unsigned short zero_dummy; /* dummy */ |
140 | }; | 140 | }; |
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index 967bae8b85c5..d4cdf4dc4bc4 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c | |||
@@ -244,7 +244,7 @@ struct myri10ge_priv { | |||
244 | int fw_ver_minor; | 244 | int fw_ver_minor; |
245 | int fw_ver_tiny; | 245 | int fw_ver_tiny; |
246 | int adopted_rx_filter_bug; | 246 | int adopted_rx_filter_bug; |
247 | u8 mac_addr[6]; /* eeprom mac address */ | 247 | u8 mac_addr[ETH_ALEN]; /* eeprom mac address */ |
248 | unsigned long serial_number; | 248 | unsigned long serial_number; |
249 | int vendor_specific_offset; | 249 | int vendor_specific_offset; |
250 | int fw_multicast_support; | 250 | int fw_multicast_support; |
diff --git a/drivers/net/ethernet/nuvoton/w90p910_ether.c b/drivers/net/ethernet/nuvoton/w90p910_ether.c index e88bdb1aa669..dcfe58fa3b8a 100644 --- a/drivers/net/ethernet/nuvoton/w90p910_ether.c +++ b/drivers/net/ethernet/nuvoton/w90p910_ether.c | |||
@@ -922,7 +922,7 @@ static void __init get_mac_address(struct net_device *dev) | |||
922 | { | 922 | { |
923 | struct w90p910_ether *ether = netdev_priv(dev); | 923 | struct w90p910_ether *ether = netdev_priv(dev); |
924 | struct platform_device *pdev; | 924 | struct platform_device *pdev; |
925 | char addr[6]; | 925 | char addr[ETH_ALEN]; |
926 | 926 | ||
927 | pdev = ether->pdev; | 927 | pdev = ether->pdev; |
928 | 928 | ||
@@ -934,7 +934,7 @@ static void __init get_mac_address(struct net_device *dev) | |||
934 | addr[5] = 0xa8; | 934 | addr[5] = 0xa8; |
935 | 935 | ||
936 | if (is_valid_ether_addr(addr)) | 936 | if (is_valid_ether_addr(addr)) |
937 | memcpy(dev->dev_addr, &addr, 0x06); | 937 | memcpy(dev->dev_addr, &addr, ETH_ALEN); |
938 | else | 938 | else |
939 | dev_err(&pdev->dev, "invalid mac address\n"); | 939 | dev_err(&pdev->dev, "invalid mac address\n"); |
940 | } | 940 | } |
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index a5f0b5da6149..f21ae7b6c766 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c | |||
@@ -191,7 +191,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) | |||
191 | struct device_node *dn = pci_device_to_OF_node(pdev); | 191 | struct device_node *dn = pci_device_to_OF_node(pdev); |
192 | int len; | 192 | int len; |
193 | const u8 *maddr; | 193 | const u8 *maddr; |
194 | u8 addr[6]; | 194 | u8 addr[ETH_ALEN]; |
195 | 195 | ||
196 | if (!dn) { | 196 | if (!dn) { |
197 | dev_dbg(&pdev->dev, | 197 | dev_dbg(&pdev->dev, |
@@ -201,8 +201,8 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) | |||
201 | 201 | ||
202 | maddr = of_get_property(dn, "local-mac-address", &len); | 202 | maddr = of_get_property(dn, "local-mac-address", &len); |
203 | 203 | ||
204 | if (maddr && len == 6) { | 204 | if (maddr && len == ETH_ALEN) { |
205 | memcpy(mac->mac_addr, maddr, 6); | 205 | memcpy(mac->mac_addr, maddr, ETH_ALEN); |
206 | return 0; | 206 | return 0; |
207 | } | 207 | } |
208 | 208 | ||
@@ -219,14 +219,15 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) | |||
219 | return -ENOENT; | 219 | return -ENOENT; |
220 | } | 220 | } |
221 | 221 | ||
222 | if (sscanf(maddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &addr[0], | 222 | if (sscanf(maddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", |
223 | &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]) != 6) { | 223 | &addr[0], &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]) |
224 | != ETH_ALEN) { | ||
224 | dev_warn(&pdev->dev, | 225 | dev_warn(&pdev->dev, |
225 | "can't parse mac address, not configuring\n"); | 226 | "can't parse mac address, not configuring\n"); |
226 | return -EINVAL; | 227 | return -EINVAL; |
227 | } | 228 | } |
228 | 229 | ||
229 | memcpy(mac->mac_addr, addr, 6); | 230 | memcpy(mac->mac_addr, addr, ETH_ALEN); |
230 | 231 | ||
231 | return 0; | 232 | return 0; |
232 | } | 233 | } |
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.h b/drivers/net/ethernet/pasemi/pasemi_mac.h index e2f4efa8ad46..f2749d46c125 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.h +++ b/drivers/net/ethernet/pasemi/pasemi_mac.h | |||
@@ -83,7 +83,7 @@ struct pasemi_mac { | |||
83 | #define MAC_TYPE_GMAC 1 | 83 | #define MAC_TYPE_GMAC 1 |
84 | #define MAC_TYPE_XAUI 2 | 84 | #define MAC_TYPE_XAUI 2 |
85 | 85 | ||
86 | u8 mac_addr[6]; | 86 | u8 mac_addr[ETH_ALEN]; |
87 | 87 | ||
88 | struct net_lro_mgr lro_mgr; | 88 | struct net_lro_mgr lro_mgr; |
89 | struct net_lro_desc lro_desc[MAX_LRO_DESCRIPTORS]; | 89 | struct net_lro_desc lro_desc[MAX_LRO_DESCRIPTORS]; |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c index 9fbb1cdbfa47..8375cbde9969 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | |||
@@ -536,10 +536,10 @@ static void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
536 | { | 536 | { |
537 | struct netxen_adapter *adapter = netdev_priv(netdev); | 537 | struct netxen_adapter *adapter = netdev_priv(netdev); |
538 | struct netdev_hw_addr *ha; | 538 | struct netdev_hw_addr *ha; |
539 | u8 null_addr[6]; | 539 | u8 null_addr[ETH_ALEN]; |
540 | int i; | 540 | int i; |
541 | 541 | ||
542 | memset(null_addr, 0, 6); | 542 | memset(null_addr, 0, ETH_ALEN); |
543 | 543 | ||
544 | if (netdev->flags & IFF_PROMISC) { | 544 | if (netdev->flags & IFF_PROMISC) { |
545 | 545 | ||
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h index 7e8d68263963..899433778466 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge.h +++ b/drivers/net/ethernet/qlogic/qlge/qlge.h | |||
@@ -2149,7 +2149,7 @@ struct ql_adapter { | |||
2149 | struct timer_list timer; | 2149 | struct timer_list timer; |
2150 | atomic_t lb_count; | 2150 | atomic_t lb_count; |
2151 | /* Keep local copy of current mac address. */ | 2151 | /* Keep local copy of current mac address. */ |
2152 | char current_mac_addr[6]; | 2152 | char current_mac_addr[ETH_ALEN]; |
2153 | }; | 2153 | }; |
2154 | 2154 | ||
2155 | /* | 2155 | /* |