Date: Fri, 19 Dec 2025 00:02:30 +0000 From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8c64625d9079 - main - aq(4): Use standard ETHER_ADDR_LEN definition Message-ID: <69449616.f9fd.a3105e1@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8c64625d90792462289686e0209a9f3fff67fc9b commit 8c64625d90792462289686e0209a9f3fff67fc9b Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2025-11-13 22:20:13 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2025-12-19 00:01:14 +0000 aq(4): Use standard ETHER_ADDR_LEN definition No need for a bespoke #define. --- sys/dev/aq/aq_common.h | 2 -- sys/dev/aq/aq_fw1x.c | 2 +- sys/dev/aq/aq_fw2x.c | 2 +- sys/dev/aq/aq_hw.h | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/aq/aq_common.h b/sys/dev/aq/aq_common.h index 17dcc5f23fb1..5f52ce915bc5 100644 --- a/sys/dev/aq/aq_common.h +++ b/sys/dev/aq/aq_common.h @@ -37,8 +37,6 @@ #include <sys/types.h> -#define ETH_MAC_LEN 6 - #define s8 __int8_t #define u8 __uint8_t #define u16 __uint16_t diff --git a/sys/dev/aq/aq_fw1x.c b/sys/dev/aq/aq_fw1x.c index 02b3f649201c..2aec2cc6f0a5 100644 --- a/sys/dev/aq/aq_fw1x.c +++ b/sys/dev/aq/aq_fw1x.c @@ -272,7 +272,7 @@ int fw1x_get_mac_addr(struct aq_hw* hw, u8* mac) mac_addr[0] = bswap32(mac_addr[0]); mac_addr[1] = bswap32(mac_addr[1]); - memcpy(mac, (u8*)mac_addr, ETH_MAC_LEN); + memcpy(mac, (u8*)mac_addr, ETHER_ADDR_LEN); trace(dbg_init, "fw1x> eFUSE MAC addr -> %02x-%02x-%02x-%02x-%02x-%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); diff --git a/sys/dev/aq/aq_fw2x.c b/sys/dev/aq/aq_fw2x.c index b532977b748f..19de3b7a2746 100644 --- a/sys/dev/aq/aq_fw2x.c +++ b/sys/dev/aq/aq_fw2x.c @@ -372,7 +372,7 @@ int fw2x_get_mac_addr(struct aq_hw* hw, u8* mac) mac_addr[0] = bswap32(mac_addr[0]); mac_addr[1] = bswap32(mac_addr[1]); - memcpy(mac, (u8*)mac_addr, ETH_MAC_LEN); + memcpy(mac, (u8*)mac_addr, ETHER_ADDR_LEN); AQ_DBG_EXIT(EOK); return (EOK); diff --git a/sys/dev/aq/aq_hw.h b/sys/dev/aq/aq_hw.h index 97744de118b8..86689fce832e 100644 --- a/sys/dev/aq/aq_hw.h +++ b/sys/dev/aq/aq_hw.h @@ -39,6 +39,7 @@ #include <sys/cdefs.h> #include <machine/cpufunc.h> #include <sys/endian.h> +#include <net/ethernet.h> #include "aq_common.h" #define AQ_WRITE_REG(hw, reg, value) writel(((hw)->hw_addr + (reg)), htole32(value)) @@ -138,7 +139,7 @@ struct aq_hw { u8 *hw_addr; u32 regs_size; - u8 mac_addr[ETH_MAC_LEN]; + u8 mac_addr[ETHER_ADDR_LEN]; enum aq_hw_irq_type irq_type;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69449616.f9fd.a3105e1>
