1- /* $NetBSD: if_aumac.c,v 1.53 2024/06/29 12:11:11 riastradh Exp $ */
1+ /* $NetBSD: if_aumac.c,v 1.54 2025/10/15 01:32:44 thorpej Exp $ */
22
33/*
44 * Copyright (c) 2001 Wasabi Systems, Inc.
4646 */
4747
4848#include <sys/cdefs.h>
49- __KERNEL_RCSID (0 , "$NetBSD: if_aumac.c,v 1.53 2024/06/29 12:11:11 riastradh Exp $" );
49+ __KERNEL_RCSID (0 , "$NetBSD: if_aumac.c,v 1.54 2025/10/15 01:32:44 thorpej Exp $" );
5050
5151
5252
@@ -214,8 +214,6 @@ aumac_match(device_t parent, struct cfdata *cf, void *aux)
214214static void
215215aumac_attach (device_t parent , device_t self , void * aux )
216216{
217- const uint8_t * enaddr ;
218- prop_data_t ea ;
219217 struct aumac_softc * sc = device_private (self );
220218 struct aubus_attach_args * aa = aux ;
221219 struct ifnet * ifp = & sc -> sc_ethercom .ec_if ;
@@ -224,6 +222,7 @@ aumac_attach(device_t parent, device_t self, void *aux)
224222 paddr_t bufaddr ;
225223 vaddr_t vbufaddr ;
226224 int i ;
225+ uint8_t enaddr [ETHER_ADDR_LEN ];
227226
228227 callout_init (& sc -> sc_tick_ch , 0 );
229228
@@ -234,14 +233,10 @@ aumac_attach(device_t parent, device_t self, void *aux)
234233 sc -> sc_st = aa -> aa_st ;
235234
236235 /* Get the MAC address. */
237- ea = prop_dictionary_get (device_properties (self ), "mac-address" );
238- if (ea == NULL ) {
239- aprint_error_dev (self , "unable to get mac-addr property\n" );
236+ if (! ether_getaddr (self , enaddr )) {
237+ aprint_error_dev (self , "unable to get MAC address\n" );
240238 return ;
241239 }
242- KASSERT (prop_object_type (ea ) == PROP_TYPE_DATA );
243- KASSERT (prop_data_size (ea ) == ETHER_ADDR_LEN );
244- enaddr = prop_data_data_nocopy (ea );
245240
246241 aprint_normal_dev (self , "Ethernet address %s\n" , ether_sprintf (enaddr ));
247242
0 commit comments