]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
global: Cleanup usage of "ETH_ALEN"
authorTom Rini <trini@konsulko.com>
Wed, 21 May 2025 22:51:22 +0000 (16:51 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 2 Jun 2025 23:26:16 +0000 (17:26 -0600)
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>
12 files changed:
arch/arm/mach-tegra/dt-setup.c
board/CZ.NIC/turris_omnia/turris_omnia.c
board/Marvell/mvebu_armada-37xx/board.c
board/Synology/common/legacy.h
board/bosch/shc/board.h
board/ti/common/board_detect.h
drivers/net/mscc_eswitch/jr2_switch.c
drivers/net/mscc_eswitch/luton_switch.c
drivers/net/mscc_eswitch/ocelot_switch.c
drivers/net/mscc_eswitch/serval_switch.c
drivers/net/mscc_eswitch/servalt_switch.c
drivers/virtio/virtio_net.h

index f4ae602d523965fd2f5d47ea70bf18df69df8654..7f1c3538ebebd42af4cf997233d915e9a6419a66 100644 (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>
 
index b7588fa4eec944efed3804c3f1f4e2b52dc812d1..baee5afa46d28aa5b279b1f281d9fe5984f50d91 100644 (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"
index df3fb6d21645ee460970f7ad7b798afccf8952bc..e44b713f96d7d648ee21df79addebb497c69b1b3 100644 (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;
 
index 0a814324d097774fc8b12f6dbc35b19393a504a2..f7ba225bd2ba5d1aa4c1c270673ea19faf7ab429 100644 (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 */
index a5e58186c9c1a41d5d40ca2db3c28a308ee6d17e..8ff68f5a64b9ef7f0ecb97b9180114f7bd8840f2 100644 (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);
index ca1aa80f2f049bfdec9a4acd300559476506d164..b057f3b2269bd7ab6c2c586d787d85a2c9f3fead 100644 (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
index 925888e0765a214fedded4673b2cde8f6b4ed72c..f0404209116357142db756a620f9007e517159c2 100644 (file)
 #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
 
index 1c584373b8bc0c6c4c0941e6ba3f1ce49eee967d..be78afc3f79471381821425ee30dc21e215b47db 100644 (file)
 #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
index 30bb4b5bad8b593967f24779412623c22b67cd95..b7a8b60587df3f997fe21e0e1c3437c756dbc627 100644 (file)
 #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
index 8eab41df99ae5c520c81e9283f0843f2b7dfbbf2..02f197aa339838e6510001c3522d1db821ac7c40 100644 (file)
 #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
 
index 61547d7933e4f76a5c8337f845f52a709a53aaec..4b073c0781ef39b6e57e3901b19d814297c4bab7 100644 (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
 
index c92bae526906e2e80e600feaba9dfac6d8e6ee70..3adcb19aead299d3fa28c747a292ee39ef68f6f8 100644 (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 */