Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 104bf3fb authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

ethernet: Convert ETHER_ADDR_LEN uses to ETH_ALEN



Reduce the number of #defines, use the normal #define from if_ether.h

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a3c910c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@

#define TX_PAGES 12	/* Two Tx slots */

#define ETHER_ADDR_LEN 6

/* The 8390 specific per-packet-header format. */
struct e8390_pkt_hdr {
  unsigned char status; /* status */
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
    i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev);
    if (i) return i;

    for(i = 0; i < ETHER_ADDR_LEN; i++)
    for (i = 0; i < ETH_ALEN; i++)
	dev->dev_addr[i] = SA_prom[i];

    printk(" %pM\n", dev->dev_addr);
+2 −3
Original line number Diff line number Diff line
@@ -735,15 +735,14 @@ static int ax_init_dev(struct net_device *dev)
	if (ax->plat->flags & AXFLG_MAC_FROMDEV) {
		ei_outb(E8390_NODMA + E8390_PAGE1 + E8390_STOP,
			ei_local->mem + E8390_CMD); /* 0x61 */
		for (i = 0; i < ETHER_ADDR_LEN; i++)
		for (i = 0; i < ETH_ALEN; i++)
			dev->dev_addr[i] =
				ei_inb(ioaddr + EN1_PHYS_SHIFT(i));
	}

	if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) &&
	    ax->plat->mac_addr)
		memcpy(dev->dev_addr, ax->plat->mac_addr,
		       ETHER_ADDR_LEN);
		memcpy(dev->dev_addr, ax->plat->mac_addr, ETH_ALEN);

	ax_reset_8390(dev);

+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
		goto out;
	}

	for (i = 0; i < ETHER_ADDR_LEN ; i++)
	for (i = 0; i < ETH_ALEN ; i++)
		dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i);

/*	Check the Racal vendor ID as well. */
+1 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
	/* Retrieve and checksum the station address. */
	outw(MAC_Page, ioaddr + HP_PAGING);

	for(i = 0; i < ETHER_ADDR_LEN; i++) {
	for(i = 0; i < ETH_ALEN; i++) {
		unsigned char inval = inb(ioaddr + 8 + i);
		dev->dev_addr[i] = inval;
		checksum += inval;
Loading