aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/8390/8390.h2
-rw-r--r--drivers/net/ethernet/8390/apne.c2
-rw-r--r--drivers/net/ethernet/8390/ax88796.c5
-rw-r--r--drivers/net/ethernet/8390/es3210.c2
-rw-r--r--drivers/net/ethernet/8390/hp-plus.c2
-rw-r--r--drivers/net/ethernet/8390/hp.c2
-rw-r--r--drivers/net/ethernet/8390/hydra.c2
-rw-r--r--drivers/net/ethernet/8390/lne390.c4
-rw-r--r--drivers/net/ethernet/8390/ne-h8300.c2
-rw-r--r--drivers/net/ethernet/8390/ne.c4
-rw-r--r--drivers/net/ethernet/8390/ne2.c2
-rw-r--r--drivers/net/ethernet/8390/ne3210.c2
-rw-r--r--drivers/net/ethernet/8390/stnic.c2
-rw-r--r--drivers/net/ethernet/8390/zorro8390.c2
-rw-r--r--drivers/net/ethernet/amd/nmclan_cs.c12
-rw-r--r--drivers/net/ethernet/broadcom/sb1250-mac.c3
16 files changed, 22 insertions, 28 deletions
diff --git a/drivers/net/ethernet/8390/8390.h b/drivers/net/ethernet/8390/8390.h
index 58a12e4c78f9..ef325ffa1b5a 100644
--- a/drivers/net/ethernet/8390/8390.h
+++ b/drivers/net/ethernet/8390/8390.h
@@ -14,8 +14,6 @@
14 14
15#define TX_PAGES 12 /* Two Tx slots */ 15#define TX_PAGES 12 /* Two Tx slots */
16 16
17#define ETHER_ADDR_LEN 6
18
19/* The 8390 specific per-packet-header format. */ 17/* The 8390 specific per-packet-header format. */
20struct e8390_pkt_hdr { 18struct e8390_pkt_hdr {
21 unsigned char status; /* status */ 19 unsigned char status; /* status */
diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c
index 547737340cbb..3ad5d2f9a49c 100644
--- a/drivers/net/ethernet/8390/apne.c
+++ b/drivers/net/ethernet/8390/apne.c
@@ -318,7 +318,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
318 i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev); 318 i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev);
319 if (i) return i; 319 if (i) return i;
320 320
321 for(i = 0; i < ETHER_ADDR_LEN; i++) 321 for (i = 0; i < ETH_ALEN; i++)
322 dev->dev_addr[i] = SA_prom[i]; 322 dev->dev_addr[i] = SA_prom[i];
323 323
324 printk(" %pM\n", dev->dev_addr); 324 printk(" %pM\n", dev->dev_addr);
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index e9f8432f55b4..2a3b8c2676bd 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -735,15 +735,14 @@ static int ax_init_dev(struct net_device *dev)
735 if (ax->plat->flags & AXFLG_MAC_FROMDEV) { 735 if (ax->plat->flags & AXFLG_MAC_FROMDEV) {
736 ei_outb(E8390_NODMA + E8390_PAGE1 + E8390_STOP, 736 ei_outb(E8390_NODMA + E8390_PAGE1 + E8390_STOP,
737 ei_local->mem + E8390_CMD); /* 0x61 */ 737 ei_local->mem + E8390_CMD); /* 0x61 */
738 for (i = 0; i < ETHER_ADDR_LEN; i++) 738 for (i = 0; i < ETH_ALEN; i++)
739 dev->dev_addr[i] = 739 dev->dev_addr[i] =
740 ei_inb(ioaddr + EN1_PHYS_SHIFT(i)); 740 ei_inb(ioaddr + EN1_PHYS_SHIFT(i));
741 } 741 }
742 742
743 if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) && 743 if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) &&
744 ax->plat->mac_addr) 744 ax->plat->mac_addr)
745 memcpy(dev->dev_addr, ax->plat->mac_addr, 745 memcpy(dev->dev_addr, ax->plat->mac_addr, ETH_ALEN);
746 ETHER_ADDR_LEN);
747 746
748 ax_reset_8390(dev); 747 ax_reset_8390(dev);
749 748
diff --git a/drivers/net/ethernet/8390/es3210.c b/drivers/net/ethernet/8390/es3210.c
index 7a09575ecff0..6428f9e7a554 100644
--- a/drivers/net/ethernet/8390/es3210.c
+++ b/drivers/net/ethernet/8390/es3210.c
@@ -195,7 +195,7 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
195 goto out; 195 goto out;
196 } 196 }
197 197
198 for (i = 0; i < ETHER_ADDR_LEN ; i++) 198 for (i = 0; i < ETH_ALEN ; i++)
199 dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i); 199 dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i);
200 200
201/* Check the Racal vendor ID as well. */ 201/* Check the Racal vendor ID as well. */
diff --git a/drivers/net/ethernet/8390/hp-plus.c b/drivers/net/ethernet/8390/hp-plus.c
index eeac843dcd2d..d42938b6b596 100644
--- a/drivers/net/ethernet/8390/hp-plus.c
+++ b/drivers/net/ethernet/8390/hp-plus.c
@@ -202,7 +202,7 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
202 /* Retrieve and checksum the station address. */ 202 /* Retrieve and checksum the station address. */
203 outw(MAC_Page, ioaddr + HP_PAGING); 203 outw(MAC_Page, ioaddr + HP_PAGING);
204 204
205 for(i = 0; i < ETHER_ADDR_LEN; i++) { 205 for(i = 0; i < ETH_ALEN; i++) {
206 unsigned char inval = inb(ioaddr + 8 + i); 206 unsigned char inval = inb(ioaddr + 8 + i);
207 dev->dev_addr[i] = inval; 207 dev->dev_addr[i] = inval;
208 checksum += inval; 208 checksum += inval;
diff --git a/drivers/net/ethernet/8390/hp.c b/drivers/net/ethernet/8390/hp.c
index 18564d4a7c04..113f1e075a26 100644
--- a/drivers/net/ethernet/8390/hp.c
+++ b/drivers/net/ethernet/8390/hp.c
@@ -156,7 +156,7 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr)
156 156
157 printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr); 157 printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr);
158 158
159 for(i = 0; i < ETHER_ADDR_LEN; i++) 159 for(i = 0; i < ETH_ALEN; i++)
160 dev->dev_addr[i] = inb(ioaddr + i); 160 dev->dev_addr[i] = inb(ioaddr + i);
161 161
162 printk(" %pM", dev->dev_addr); 162 printk(" %pM", dev->dev_addr);
diff --git a/drivers/net/ethernet/8390/hydra.c b/drivers/net/ethernet/8390/hydra.c
index 3dac937a67c4..5370c884620b 100644
--- a/drivers/net/ethernet/8390/hydra.c
+++ b/drivers/net/ethernet/8390/hydra.c
@@ -129,7 +129,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
129 if (!dev) 129 if (!dev)
130 return -ENOMEM; 130 return -ENOMEM;
131 131
132 for(j = 0; j < ETHER_ADDR_LEN; j++) 132 for (j = 0; j < ETH_ALEN; j++)
133 dev->dev_addr[j] = *((u8 *)(board + HYDRA_ADDRPROM + 2*j)); 133 dev->dev_addr[j] = *((u8 *)(board + HYDRA_ADDRPROM + 2*j));
134 134
135 /* We must set the 8390 for word mode. */ 135 /* We must set the 8390 for word mode. */
diff --git a/drivers/net/ethernet/8390/lne390.c b/drivers/net/ethernet/8390/lne390.c
index f9888d20177b..69490ae018ea 100644
--- a/drivers/net/ethernet/8390/lne390.c
+++ b/drivers/net/ethernet/8390/lne390.c
@@ -191,14 +191,14 @@ static int __init lne390_probe1(struct net_device *dev, int ioaddr)
191 || inb(ioaddr + LNE390_SA_PROM + 1) != LNE390_ADDR1 191 || inb(ioaddr + LNE390_SA_PROM + 1) != LNE390_ADDR1
192 || inb(ioaddr + LNE390_SA_PROM + 2) != LNE390_ADDR2 ) { 192 || inb(ioaddr + LNE390_SA_PROM + 2) != LNE390_ADDR2 ) {
193 printk("lne390.c: card not found"); 193 printk("lne390.c: card not found");
194 for(i = 0; i < ETHER_ADDR_LEN; i++) 194 for (i = 0; i < ETH_ALEN; i++)
195 printk(" %02x", inb(ioaddr + LNE390_SA_PROM + i)); 195 printk(" %02x", inb(ioaddr + LNE390_SA_PROM + i));
196 printk(" (invalid prefix).\n"); 196 printk(" (invalid prefix).\n");
197 return -ENODEV; 197 return -ENODEV;
198 } 198 }
199#endif 199#endif
200 200
201 for(i = 0; i < ETHER_ADDR_LEN; i++) 201 for (i = 0; i < ETH_ALEN; i++)
202 dev->dev_addr[i] = inb(ioaddr + LNE390_SA_PROM + i); 202 dev->dev_addr[i] = inb(ioaddr + LNE390_SA_PROM + i);
203 printk("lne390.c: LNE390%X in EISA slot %d, address %pM.\n", 203 printk("lne390.c: LNE390%X in EISA slot %d, address %pM.\n",
204 0xa+revision, ioaddr/0x1000, dev->dev_addr); 204 0xa+revision, ioaddr/0x1000, dev->dev_addr);
diff --git a/drivers/net/ethernet/8390/ne-h8300.c b/drivers/net/ethernet/8390/ne-h8300.c
index cd36a6a5f408..9b9c77d5a65c 100644
--- a/drivers/net/ethernet/8390/ne-h8300.c
+++ b/drivers/net/ethernet/8390/ne-h8300.c
@@ -312,7 +312,7 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
312 312
313 dev->base_addr = ioaddr; 313 dev->base_addr = ioaddr;
314 314
315 for(i = 0; i < ETHER_ADDR_LEN; i++) 315 for (i = 0; i < ETH_ALEN; i++)
316 dev->dev_addr[i] = SA_prom[i]; 316 dev->dev_addr[i] = SA_prom[i];
317 printk(" %pM\n", dev->dev_addr); 317 printk(" %pM\n", dev->dev_addr);
318 318
diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c
index 1063093b3afc..f92ea2a65a57 100644
--- a/drivers/net/ethernet/8390/ne.c
+++ b/drivers/net/ethernet/8390/ne.c
@@ -503,12 +503,12 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
503#ifdef CONFIG_PLAT_MAPPI 503#ifdef CONFIG_PLAT_MAPPI
504 outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP, 504 outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP,
505 ioaddr + E8390_CMD); /* 0x61 */ 505 ioaddr + E8390_CMD); /* 0x61 */
506 for (i = 0 ; i < ETHER_ADDR_LEN ; i++) { 506 for (i = 0; i < ETH_ALEN; i++) {
507 dev->dev_addr[i] = SA_prom[i] 507 dev->dev_addr[i] = SA_prom[i]
508 = inb_p(ioaddr + EN1_PHYS_SHIFT(i)); 508 = inb_p(ioaddr + EN1_PHYS_SHIFT(i));
509 } 509 }
510#else 510#else
511 for(i = 0; i < ETHER_ADDR_LEN; i++) { 511 for (i = 0; i < ETH_ALEN; i++) {
512 dev->dev_addr[i] = SA_prom[i]; 512 dev->dev_addr[i] = SA_prom[i];
513 } 513 }
514#endif 514#endif
diff --git a/drivers/net/ethernet/8390/ne2.c b/drivers/net/ethernet/8390/ne2.c
index 70cdc6996342..922b32036c63 100644
--- a/drivers/net/ethernet/8390/ne2.c
+++ b/drivers/net/ethernet/8390/ne2.c
@@ -460,7 +460,7 @@ static int __init ne2_probe1(struct net_device *dev, int slot)
460 460
461 dev->base_addr = base_addr; 461 dev->base_addr = base_addr;
462 462
463 for(i = 0; i < ETHER_ADDR_LEN; i++) 463 for (i = 0; i < ETH_ALEN; i++)
464 dev->dev_addr[i] = SA_prom[i]; 464 dev->dev_addr[i] = SA_prom[i];
465 465
466 printk(" %pM\n", dev->dev_addr); 466 printk(" %pM\n", dev->dev_addr);
diff --git a/drivers/net/ethernet/8390/ne3210.c b/drivers/net/ethernet/8390/ne3210.c
index 243ed2aee88e..2a3e8057feae 100644
--- a/drivers/net/ethernet/8390/ne3210.c
+++ b/drivers/net/ethernet/8390/ne3210.c
@@ -125,7 +125,7 @@ static int __init ne3210_eisa_probe (struct device *device)
125#endif 125#endif
126 126
127 port_index = inb(ioaddr + NE3210_CFG2) >> 6; 127 port_index = inb(ioaddr + NE3210_CFG2) >> 6;
128 for(i = 0; i < ETHER_ADDR_LEN; i++) 128 for (i = 0; i < ETH_ALEN; i++)
129 dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i); 129 dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i);
130 printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr: %pM.\n", 130 printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr: %pM.\n",
131 edev->slot, ifmap[port_index], dev->dev_addr); 131 edev->slot, ifmap[port_index], dev->dev_addr);
diff --git a/drivers/net/ethernet/8390/stnic.c b/drivers/net/ethernet/8390/stnic.c
index d85f0a84bc7b..3b903759980a 100644
--- a/drivers/net/ethernet/8390/stnic.c
+++ b/drivers/net/ethernet/8390/stnic.c
@@ -114,7 +114,7 @@ static int __init stnic_probe(void)
114#ifdef CONFIG_SH_STANDARD_BIOS 114#ifdef CONFIG_SH_STANDARD_BIOS
115 sh_bios_get_node_addr (stnic_eadr); 115 sh_bios_get_node_addr (stnic_eadr);
116#endif 116#endif
117 for (i = 0; i < ETHER_ADDR_LEN; i++) 117 for (i = 0; i < ETH_ALEN; i++)
118 dev->dev_addr[i] = stnic_eadr[i]; 118 dev->dev_addr[i] = stnic_eadr[i];
119 119
120 /* Set the base address to point to the NIC, not the "real" base! */ 120 /* Set the base address to point to the NIC, not the "real" base! */
diff --git a/drivers/net/ethernet/8390/zorro8390.c b/drivers/net/ethernet/8390/zorro8390.c
index 3aa9fe9999b5..bcd27323b203 100644
--- a/drivers/net/ethernet/8390/zorro8390.c
+++ b/drivers/net/ethernet/8390/zorro8390.c
@@ -365,7 +365,7 @@ static int __devinit zorro8390_init(struct net_device *dev,
365 if (i) 365 if (i)
366 return i; 366 return i;
367 367
368 for (i = 0; i < ETHER_ADDR_LEN; i++) 368 for (i = 0; i < ETH_ALEN; i++)
369 dev->dev_addr[i] = SA_prom[i]; 369 dev->dev_addr[i] = SA_prom[i];
370 370
371 pr_debug("Found ethernet address: %pM\n", dev->dev_addr); 371 pr_debug("Found ethernet address: %pM\n", dev->dev_addr);
diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
index 3d7be5aa49eb..6be0dd67631a 100644
--- a/drivers/net/ethernet/amd/nmclan_cs.c
+++ b/drivers/net/ethernet/amd/nmclan_cs.c
@@ -160,8 +160,6 @@ Include Files
160Defines 160Defines
161---------------------------------------------------------------------------- */ 161---------------------------------------------------------------------------- */
162 162
163#define ETHER_ADDR_LEN ETH_ALEN
164 /* 6 bytes in an Ethernet Address */
165#define MACE_LADRF_LEN 8 163#define MACE_LADRF_LEN 8
166 /* 8 bytes in Logical Address Filter */ 164 /* 8 bytes in Logical Address Filter */
167 165
@@ -600,7 +598,7 @@ static int mace_init(mace_private *lp, unsigned int ioaddr, char *enet_addr)
600 } 598 }
601 } 599 }
602 /* Set PADR register */ 600 /* Set PADR register */
603 for (i = 0; i < ETHER_ADDR_LEN; i++) 601 for (i = 0; i < ETH_ALEN; i++)
604 mace_write(lp, ioaddr, MACE_PADR, enet_addr[i]); 602 mace_write(lp, ioaddr, MACE_PADR, enet_addr[i]);
605 603
606 /* MAC Configuration Control Register should be written last */ 604 /* MAC Configuration Control Register should be written last */
@@ -639,11 +637,11 @@ static int nmclan_config(struct pcmcia_device *link)
639 637
640 /* Read the ethernet address from the CIS. */ 638 /* Read the ethernet address from the CIS. */
641 len = pcmcia_get_tuple(link, 0x80, &buf); 639 len = pcmcia_get_tuple(link, 0x80, &buf);
642 if (!buf || len < ETHER_ADDR_LEN) { 640 if (!buf || len < ETH_ALEN) {
643 kfree(buf); 641 kfree(buf);
644 goto failed; 642 goto failed;
645 } 643 }
646 memcpy(dev->dev_addr, buf, ETHER_ADDR_LEN); 644 memcpy(dev->dev_addr, buf, ETH_ALEN);
647 kfree(buf); 645 kfree(buf);
648 646
649 /* Verify configuration by reading the MACE ID. */ 647 /* Verify configuration by reading the MACE ID. */
@@ -1421,7 +1419,7 @@ Output
1421static void set_multicast_list(struct net_device *dev) 1419static void set_multicast_list(struct net_device *dev)
1422{ 1420{
1423 mace_private *lp = netdev_priv(dev); 1421 mace_private *lp = netdev_priv(dev);
1424 int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */ 1422 int adr[ETH_ALEN] = {0}; /* Ethernet address */
1425 struct netdev_hw_addr *ha; 1423 struct netdev_hw_addr *ha;
1426 1424
1427#ifdef PCMCIA_DEBUG 1425#ifdef PCMCIA_DEBUG
@@ -1443,7 +1441,7 @@ static void set_multicast_list(struct net_device *dev)
1443 /* Calculate multicast logical address filter */ 1441 /* Calculate multicast logical address filter */
1444 memset(lp->multicast_ladrf, 0, MACE_LADRF_LEN); 1442 memset(lp->multicast_ladrf, 0, MACE_LADRF_LEN);
1445 netdev_for_each_mc_addr(ha, dev) { 1443 netdev_for_each_mc_addr(ha, dev) {
1446 memcpy(adr, ha->addr, ETHER_ADDR_LEN); 1444 memcpy(adr, ha->addr, ETH_ALEN);
1447 BuildLAF(lp->multicast_ladrf, adr); 1445 BuildLAF(lp->multicast_ladrf, adr);
1448 } 1446 }
1449 } 1447 }
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 0a1d7f279fc8..aa58f9e3f913 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -163,7 +163,6 @@ enum sbmac_state {
163#define SBMAC_MAX_TXDESCR 256 163#define SBMAC_MAX_TXDESCR 256
164#define SBMAC_MAX_RXDESCR 256 164#define SBMAC_MAX_RXDESCR 256
165 165
166#define ETHER_ADDR_LEN 6
167#define ENET_PACKET_SIZE 1518 166#define ENET_PACKET_SIZE 1518
168/*#define ENET_PACKET_SIZE 9216 */ 167/*#define ENET_PACKET_SIZE 9216 */
169 168
@@ -266,7 +265,7 @@ struct sbmac_softc {
266 int sbm_pause; /* current pause setting */ 265 int sbm_pause; /* current pause setting */
267 int sbm_link; /* current link state */ 266 int sbm_link; /* current link state */
268 267
269 unsigned char sbm_hwaddr[ETHER_ADDR_LEN]; 268 unsigned char sbm_hwaddr[ETH_ALEN];
270 269
271 struct sbmacdma sbm_txdma; /* only channel 0 for now */ 270 struct sbmacdma sbm_txdma; /* only channel 0 for now */
272 struct sbmacdma sbm_rxdma; 271 struct sbmacdma sbm_rxdma;