global: Cleanup usage of "ETH_ALEN"

The value of "ETH_ALEN" is defined to 6 in <linux/if_ether.h>. This file
is included in <net.h>. In the places where we had ETH_ALEN but no
direct include of <net.h>, add <linux/if_ether.h>. In the places where
we had a custom name used, make use of ETH_ALEN instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini 2025-05-21 16:51:22 -06:00
parent 2266595bf8
commit 824f8f52a1
12 changed files with 12 additions and 10 deletions

View File

@ -5,6 +5,7 @@
#include <fdtdec.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include <asm/arch-tegra/cboot.h>
#include <asm/arch-tegra/gpu.h>

View File

@ -29,6 +29,7 @@
#include <linux/bitops.h>
#include <linux/bitrev.h>
#include <linux/delay.h>
#include <linux/if_ether.h>
#include <u-boot/crc.h>
#include "../drivers/ddr/marvell/a38x/ddr3_init.h"

View File

@ -20,6 +20,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <linux/delay.h>
#include <linux/if_ether.h>
DECLARE_GLOBAL_DATA_PTR;

View File

@ -8,6 +8,8 @@
#ifndef __SYNO_LEGACY_H
#define __SYNO_LEGACY_H
#include <linux/if_ether.h>
/* Marvell uboot parameters */
#define ATAG_MV_UBOOT 0x41000403
#define VER_NUM 0x03040400 /* 3.4.4 */

View File

@ -14,6 +14,8 @@
#ifndef _BOARD_H_
#define _BOARD_H_
#include <linux/if_ether.h>
/* Definition to control the GPIOs (for LEDs and Reset) */
#define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
@ -146,7 +148,6 @@ static inline int board_is_series(void)
#define RESET_MASK (0x1 << 29)
#define HDR_MAGIC 0x43485342
#define HDR_ETH_ALEN 6
#define HDR_NAME_LEN 8
#define HDR_REV_LEN 8
#define HDR_SER_LEN 16
@ -176,7 +177,7 @@ struct shc_eeprom {
u32 magic;
u16 version;
u16 lenght;
uint8_t mac_addr[HDR_ETH_ALEN];
uint8_t mac_addr[ETH_ALEN];
};
void enable_uart0_pin_mux(void);

View File

@ -10,6 +10,8 @@
/* TI EEPROM MAGIC Header identifier */
#include <linux/bitops.h>
#include <linux/if_ether.h>
#define TI_EEPROM_HEADER_MAGIC 0xEE3355AA
#define TI_DEAD_EEPROM_MAGIC 0xADEAD12C
@ -18,7 +20,7 @@
#define TI_EEPROM_HDR_SERIAL_LEN 12
#define TI_EEPROM_HDR_CONFIG_LEN 32
#define TI_EEPROM_HDR_NO_OF_MAC_ADDR 3
#define TI_EEPROM_HDR_ETH_ALEN 6
#define TI_EEPROM_HDR_ETH_ALEN ETH_ALEN
/**
* struct ti_am_eeprom - This structure holds data read in from the

View File

@ -222,7 +222,6 @@
#define CPU_PORT 53
#define IFH_LEN 7
#define JR2_BUF_CELL_SZ 60
#define ETH_ALEN 6
#define PGID_BROADCAST 510
#define PGID_UNICAST 511

View File

@ -132,7 +132,6 @@
#define CPU_PORT 26
#define INTERNAL_PORT_MSK 0xFFFFFF
#define IFH_LEN 2
#define ETH_ALEN 6
#define PGID_BROADCAST 28
#define PGID_UNICAST 29
#define PGID_SRC 80

View File

@ -126,7 +126,6 @@
#define CPU_PORT 11
#define INTERNAL_PORT_MSK 0x2FF
#define IFH_LEN 4
#define ETH_ALEN 6
#define PGID_BROADCAST 13
#define PGID_UNICAST 14
#define PGID_SRC 80

View File

@ -111,7 +111,6 @@
#define CPU_PORT 11
#define INTERNAL_PORT_MSK 0xFF
#define IFH_LEN 4
#define ETH_ALEN 6
#define PGID_BROADCAST 13
#define PGID_UNICAST 14

View File

@ -88,7 +88,6 @@
#define MAC_VID 0
#define CPU_PORT 11
#define IFH_LEN 7
#define ETH_ALEN 6
#define PGID_BROADCAST 50
#define PGID_UNICAST 51

View File

@ -9,8 +9,7 @@
#ifndef _LINUX_VIRTIO_NET_H
#define _LINUX_VIRTIO_NET_H
/* TODO: needs to be removed! */
#define ETH_ALEN 6
#include <linux/if_ether.h>
/* The feature bitmap for virtio net */