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

Commit ba5082c7 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'eth_alen'



Joe Perches says:

====================
Convert the uses mac addresses to ETH_ALEN so
it's easier to find and verify where mac addresses
need to be __aligned(2)

Change in V2:
- Remove include/acpi/actbl2.h conversion
  It's a file copied from outside ACPI sources

Changes in V3:
- Don't move the pasemi_mac.h mac address to be aligned(2)
  Just note that it's unaligned.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bd3f5433 1409a932
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -707,7 +707,7 @@ static int ax_init_dev(struct net_device *dev)


#ifdef CONFIG_AX88796_93CX6
#ifdef CONFIG_AX88796_93CX6
	if (ax->plat->flags & AXFLG_HAS_93CX6) {
	if (ax->plat->flags & AXFLG_HAS_93CX6) {
		unsigned char mac_addr[6];
		unsigned char mac_addr[ETH_ALEN];
		struct eeprom_93cx6 eeprom;
		struct eeprom_93cx6 eeprom;


		eeprom.data = ei_local;
		eeprom.data = ei_local;
@@ -719,7 +719,7 @@ static int ax_init_dev(struct net_device *dev)
				       (__le16 __force *)mac_addr,
				       (__le16 __force *)mac_addr,
				       sizeof(mac_addr) >> 1);
				       sizeof(mac_addr) >> 1);


		memcpy(dev->dev_addr, mac_addr, 6);
		memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
	}
	}
#endif
#endif
	if (ax->plat->wordlength == 2) {
	if (ax->plat->wordlength == 2) {
+3 −3
Original line number Original line Diff line number Diff line
@@ -1521,7 +1521,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
	char *chipname;
	char *chipname;
	struct net_device *dev;
	struct net_device *dev;
	const struct pcnet32_access *a = NULL;
	const struct pcnet32_access *a = NULL;
	u8 promaddr[6];
	u8 promaddr[ETH_ALEN];
	int ret = -ENODEV;
	int ret = -ENODEV;


	/* reset the chip */
	/* reset the chip */
@@ -1665,10 +1665,10 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
	}
	}


	/* read PROM address and compare with CSR address */
	/* read PROM address and compare with CSR address */
	for (i = 0; i < 6; i++)
	for (i = 0; i < ETH_ALEN; i++)
		promaddr[i] = inb(ioaddr + i);
		promaddr[i] = inb(ioaddr + i);


	if (memcmp(promaddr, dev->dev_addr, 6) ||
	if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
	    !is_valid_ether_addr(dev->dev_addr)) {
	    !is_valid_ether_addr(dev->dev_addr)) {
		if (is_valid_ether_addr(promaddr)) {
		if (is_valid_ether_addr(promaddr)) {
			if (pcnet32_debug & NETIF_MSG_PROBE) {
			if (pcnet32_debug & NETIF_MSG_PROBE) {
+3 −3
Original line number Original line Diff line number Diff line
@@ -238,8 +238,8 @@ struct cnic_sock {
	u16	src_port;
	u16	src_port;
	u16	dst_port;
	u16	dst_port;
	u16	vlan_id;
	u16	vlan_id;
	unsigned char old_ha[6];
	unsigned char old_ha[ETH_ALEN];
	unsigned char ha[6];
	unsigned char ha[ETH_ALEN];
	u32	mtu;
	u32	mtu;
	u32	cid;
	u32	cid;
	u32	l5_cid;
	u32	l5_cid;
@@ -308,7 +308,7 @@ struct cnic_dev {
#define CNIC_F_BNX2_CLASS	3
#define CNIC_F_BNX2_CLASS	3
#define CNIC_F_BNX2X_CLASS	4
#define CNIC_F_BNX2X_CLASS	4
	atomic_t	ref_count;
	atomic_t	ref_count;
	u8		mac_addr[6];
	u8		mac_addr[ETH_ALEN];


	int		max_iscsi_conn;
	int		max_iscsi_conn;
	int		max_fcoe_conn;
	int		max_fcoe_conn;
+5 −3
Original line number Original line Diff line number Diff line
@@ -1304,7 +1304,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
{
	struct tulip_private *tp;
	struct tulip_private *tp;
	/* See note below on the multiport cards. */
	/* 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 last_irq;
	static int multiport_cnt;	/* For four-port boards w/one EEPROM */
	static int multiport_cnt;	/* For four-port boards w/one EEPROM */
	int i, irq;
	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;
		dev->dev_addr[i] = last_phys_addr[i] + 1;
#if defined(CONFIG_SPARC)
#if defined(CONFIG_SPARC)
		addr = of_get_property(dp, "local-mac-address", &len);
		addr = of_get_property(dp, "local-mac-address", &len);
		if (addr && len == 6)
		if (addr && len == ETH_ALEN)
			memcpy(dev->dev_addr, addr, 6);
			memcpy(dev->dev_addr, addr, ETH_ALEN);
#endif
#endif
#if defined(__i386__) || defined(__x86_64__)	/* Patch up x86 BIOS bug. */
#if defined(__i386__) || defined(__x86_64__)	/* Patch up x86 BIOS bug. */
		if (last_irq)
		if (last_irq)
+2 −2
Original line number Original line Diff line number Diff line
@@ -133,8 +133,8 @@ struct rfd_struct
  unsigned char  last;		/* Bit15,Last Frame on List / Bit14,suspend */
  unsigned char  last;		/* Bit15,Last Frame on List / Bit14,suspend */
  unsigned short next;		/* linkoffset to next RFD */
  unsigned short next;		/* linkoffset to next RFD */
  unsigned short rbd_offset;	/* pointeroffset to RBD-buffer */
  unsigned short rbd_offset;	/* pointeroffset to RBD-buffer */
  unsigned char  dest[6];	/* ethernet-address, destination */
  unsigned char  dest[ETH_ALEN];	/* ethernet-address, destination */
  unsigned char  source[6];	/* ethernet-address, source */
  unsigned char  source[ETH_ALEN];	/* ethernet-address, source */
  unsigned short length;	/* 802.3 frame-length */
  unsigned short length;	/* 802.3 frame-length */
  unsigned short zero_dummy;	/* dummy */
  unsigned short zero_dummy;	/* dummy */
};
};
Loading