diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2025-11-13 22:20:13 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2025-12-19 00:01:14 +0000 |
| commit | 8c64625d90792462289686e0209a9f3fff67fc9b (patch) | |
| tree | 5f2d2a58cb24f93bdafa38d90a9ab79e76638647 | |
| parent | 391e8709315d4a0e8f5ba91912e370571ab6841b (diff) | |
aq(4): Use standard ETHER_ADDR_LEN definition
No need for a bespoke #define.
| -rw-r--r-- | sys/dev/aq/aq_common.h | 2 | ||||
| -rw-r--r-- | sys/dev/aq/aq_fw1x.c | 2 | ||||
| -rw-r--r-- | sys/dev/aq/aq_fw2x.c | 2 | ||||
| -rw-r--r-- | 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; |
