Unify the name of the device property to hold a MAC address - there was

no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
This commit is contained in:
martin 2010-01-22 08:56:04 +00:00
parent 739e259054
commit f9e1815aaf
17 changed files with 55 additions and 55 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.17 2008/04/28 20:23:10 martin Exp $ */
/* $NetBSD: autoconf.c,v 1.18 2010/01/22 08:56:04 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2008/04/28 20:23:10 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2010/01/22 08:56:04 martin Exp $");
#include "opt_algor_p4032.h"
#include "opt_algor_p5064.h"
@ -115,7 +115,7 @@ device_register(struct device *dev, void *aux)
algor_ethaddr, ETHER_ADDR_LEN);
KASSERT(pd != NULL);
if (prop_dictionary_set(device_properties(dev),
"mac-addr", pd) == false) {
"mac-address", pd) == false) {
printf("WARNING: unable to set mac-addr "
"property for %s\n", dev->dv_xname);
}

View File

@ -1,5 +1,5 @@
/* $Id: at91emac.c,v 1.7 2010/01/19 22:06:19 pooka Exp $ */
/* $NetBSD: at91emac.c,v 1.7 2010/01/19 22:06:19 pooka Exp $ */
/* $Id: at91emac.c,v 1.8 2010/01/22 08:56:04 martin Exp $ */
/* $NetBSD: at91emac.c,v 1.8 2010/01/22 08:56:04 martin Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.7 2010/01/19 22:06:19 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.8 2010/01/22 08:56:04 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -171,7 +171,7 @@ emac_attach(device_t parent, device_t self, void *aux)
EMAC_WRITE(ETH_RSR, (u & (ETH_RSR_OVR|ETH_RSR_REC|ETH_RSR_BNA)));
/* Fetch the Ethernet address from property if set. */
enaddr = prop_dictionary_get(device_properties(self), "mac-addr");
enaddr = prop_dictionary_get(device_properties(self), "mac-address");
if (enaddr != NULL) {
KASSERT(prop_object_type(enaddr) == PROP_TYPE_DATA);

View File

@ -1,4 +1,4 @@
/* $NetBSD: epe.c,v 1.23 2010/01/19 22:06:19 pooka Exp $ */
/* $NetBSD: epe.c,v 1.24 2010/01/22 08:56:04 martin Exp $ */
/*
* Copyright (c) 2004 Jesse Off
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.23 2010/01/19 22:06:19 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.24 2010/01/22 08:56:04 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -143,7 +143,7 @@ epe_attach(struct device *parent, struct device *self, void *aux)
panic("%s: Cannot map registers", self->dv_xname);
/* Fetch the Ethernet address from property if set. */
enaddr = prop_dictionary_get(device_properties(self), "mac-addr");
enaddr = prop_dictionary_get(device_properties(self), "mac-address");
if (enaddr != NULL) {
KASSERT(prop_object_type(enaddr) == PROP_TYPE_DATA);
KASSERT(prop_data_size(enaddr) == ETHER_ADDR_LEN);

View File

@ -1,4 +1,4 @@
/* $NetBSD: armadillo9_machdep.c,v 1.18 2009/12/26 16:01:23 uebayasi Exp $ */
/* $NetBSD: armadillo9_machdep.c,v 1.19 2010/01/22 08:56:04 martin Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@ -110,7 +110,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.18 2009/12/26 16:01:23 uebayasi Exp $");
__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.19 2010/01/22 08:56:04 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -315,7 +315,7 @@ armadillo9_device_register(device_t dev, void *aux)
armadillo9_ethaddr, ETHER_ADDR_LEN);
KASSERT(pd != NULL);
if (prop_dictionary_set(device_properties(dev),
"mac-addr", pd) == false) {
"mac-address", pd) == false) {
printf("WARNING: unable to set mac-addr property "
"for %s\n", dev->dv_xname);
}

View File

@ -1,5 +1,5 @@
/* $Id: mpcsa_machdep.c,v 1.3 2008/11/11 06:46:41 dyoung Exp $ */
/* $NetBSD: mpcsa_machdep.c,v 1.3 2008/11/11 06:46:41 dyoung Exp $ */
/* $Id: mpcsa_machdep.c,v 1.4 2010/01/22 08:56:05 martin Exp $ */
/* $NetBSD: mpcsa_machdep.c,v 1.4 2010/01/22 08:56:05 martin Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mpcsa_machdep.c,v 1.3 2008/11/11 06:46:41 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: mpcsa_machdep.c,v 1.4 2010/01/22 08:56:05 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -383,7 +383,7 @@ static void mpcsa_device_register(device_t dev, void *aux)
eth_addr, ETHER_ADDR_LEN);
KASSERT(pd != NULL);
if (prop_dictionary_set(device_properties(dev),
"mac-addr", pd) == FALSE) {
"mac-address", pd) == FALSE) {
printf("WARNING: unable to set mac-addr property "
"for %s\n", dev->dv_xname);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.3 2008/04/28 20:23:17 martin Exp $ */
/* $NetBSD: autoconf.c,v 1.4 2010/01/22 08:56:05 martin Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2008/04/28 20:23:17 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2010/01/22 08:56:05 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -113,10 +113,10 @@ device_register(struct device *dev, void *aux)
prop_object_release(po);
}
if (device_is_a(dev, "admsw") &&
(po = prop_dictionary_get(properties, "mac-addr")) != NULL) {
(po = prop_dictionary_get(properties, "mac-address")) != NULL) {
if (prop_dictionary_set(device_properties(dev),
"mac-addr", po) == FALSE) {
"mac-address", po) == FALSE) {
printf("WARNING: unable to set mac-addr "
"property for %s\n", dev->dv_xname);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.14 2009/12/14 00:46:00 matt Exp $ */
/* $NetBSD: machdep.c,v 1.15 2010/01/22 08:56:05 martin Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2009/12/14 00:46:00 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2010/01/22 08:56:05 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -290,7 +290,7 @@ parse_args(prop_dictionary_t properties, int argc, char **argv,
printf("%s: prop_data_create_data\n", __func__);
continue;
}
if (!prop_dictionary_set(properties, "mac-addr", pd)) {
if (!prop_dictionary_set(properties, "mac-address", pd)) {
printf("%s: prop_dictionary_set(mac)\n",
__func__);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.16 2008/04/28 20:23:17 martin Exp $ */
/* $NetBSD: autoconf.c,v 1.17 2010/01/22 08:56:05 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2008/04/28 20:23:17 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2010/01/22 08:56:05 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -119,7 +119,7 @@ device_register(struct device *dev, void *aux)
pd = prop_data_create_data(ethaddr, ETHER_ADDR_LEN);
KASSERT(pd != NULL);
if (prop_dictionary_set(device_properties(dev),
"mac-addr", pd) == false) {
"mac-address", pd) == false) {
printf("WARNING: unable to set mac-addr "
"property for %s\n", dev->dv_xname);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.11 2009/08/02 11:32:05 gavan Exp $ */
/* $NetBSD: autoconf.c,v 1.12 2010/01/22 08:56:05 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.11 2009/08/02 11:32:05 gavan Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2010/01/22 08:56:05 martin Exp $");
#include "opt_md.h"
@ -134,7 +134,7 @@ device_register(struct device *dev, void *aux)
ETHER_ADDR_LEN);
KASSERT(mac != NULL);
SETPROP("mac-addr", mac);
SETPROP("mac-address", mac);
SETPROP("i82543-cfg1", cfg1);
SETPROP("i82543-cfg2", cfg2);
SETPROP("i82543-swdpin", swdpin);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_admsw.c,v 1.6 2010/01/19 22:06:21 pooka Exp $ */
/* $NetBSD: if_admsw.c,v 1.7 2010/01/22 08:56:05 martin Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.6 2010/01/19 22:06:21 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.7 2010/01/22 08:56:05 martin Exp $");
#include <sys/param.h>
@ -341,7 +341,7 @@ admsw_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = aa->oba_dt;
sc->sc_st = aa->oba_st;
pd = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-addr");
pd = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-address");
if (pd == NULL) {
enaddr[0] = 0x02;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aumac.c,v 1.26 2010/01/19 22:06:21 pooka Exp $ */
/* $NetBSD: if_aumac.c,v 1.27 2010/01/22 08:56:05 martin Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.26 2010/01/19 22:06:21 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.27 2010/01/22 08:56:05 martin Exp $");
#include "rnd.h"
@ -238,7 +238,7 @@ aumac_attach(struct device *parent, struct device *self, void *aux)
sc->sc_st = aa->aa_st;
/* Get the MAC address. */
ea = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-addr");
ea = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-address");
if (ea == NULL) {
printf("%s: unable to get mac-addr property\n",
sc->sc_dev.dv_xname);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ar5312.c,v 1.5 2008/01/23 05:23:59 dyoung Exp $ */
/* $NetBSD: ar5312.c,v 1.6 2010/01/22 08:56:05 martin Exp $ */
/*
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@ -264,7 +264,7 @@ ar531x_device_register(struct device *dev, void *aux)
else
return;
addprop_data(dev, "mac-addr", enet, ETHER_ADDR_LEN);
addprop_data(dev, "mac-address", enet, ETHER_ADDR_LEN);
}
if (device_is_a(dev, "ath")) {
@ -277,7 +277,7 @@ ar531x_device_register(struct device *dev, void *aux)
else
return;
addprop_data(dev, "mac-addr", enet, ETHER_ADDR_LEN);
addprop_data(dev, "mac-address", enet, ETHER_ADDR_LEN);
addprop_integer(dev, "wmac-rev",
AR5312_REVISION_WMAC(GETSYSREG(AR5312_SYSREG_REVISION)));

View File

@ -1,4 +1,4 @@
/* $NetBSD: ar5315.c,v 1.6 2009/07/06 00:43:22 alc Exp $ */
/* $NetBSD: ar5315.c,v 1.7 2010/01/22 08:56:05 martin Exp $ */
/*
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@ -48,7 +48,7 @@
* family.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ar5315.c,v 1.6 2009/07/06 00:43:22 alc Exp $");
__KERNEL_RCSID(0, "$NetBSD: ar5315.c,v 1.7 2010/01/22 08:56:05 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -294,7 +294,7 @@ ar531x_device_register(struct device *dev, void *aux)
else
return;
addprop_data(dev, "mac-addr", enet, ETHER_ADDR_LEN);
addprop_data(dev, "mac-address", enet, ETHER_ADDR_LEN);
}
if (device_is_a(dev, "ath")) {
@ -305,7 +305,7 @@ ar531x_device_register(struct device *dev, void *aux)
else
return;
addprop_data(dev, "mac-addr", enet, ETHER_ADDR_LEN);
addprop_data(dev, "mac-address", enet, ETHER_ADDR_LEN);
addprop_integer(dev, "wmac-rev",
GETSYSREG(AR5315_SYSREG_SREV));

View File

@ -1,4 +1,4 @@
/* $Id: if_ae.c,v 1.17 2010/01/19 22:06:21 pooka Exp $ */
/* $Id: if_ae.c,v 1.18 2010/01/22 08:56:05 martin Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
* Copyright (c) 2006 Garrett D'Amore.
@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.17 2010/01/19 22:06:21 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.18 2010/01/22 08:56:05 martin Exp $");
#include <sys/param.h>
@ -235,7 +235,7 @@ ae_attach(device_t parent, device_t self, void *aux)
/*
* Try to get MAC address.
*/
ea = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-addr");
ea = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-address");
if (ea == NULL) {
printf("%s: unable to get mac-addr property\n",
sc->sc_dev.dv_xname);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_emac.c,v 1.34 2010/01/19 22:06:22 pooka Exp $ */
/* $NetBSD: if_emac.c,v 1.35 2010/01/22 08:56:05 martin Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.34 2010/01/19 22:06:22 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.35 2010/01/22 08:56:05 martin Exp $");
#include <sys/param.h>
@ -395,7 +395,7 @@ emac_attach(struct device *parent, struct device *self, void *aux)
emac_reset(sc);
/* Fetch the Ethernet address. */
ea = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-addr");
ea = prop_dictionary_get(device_properties(&sc->sc_dev), "mac-address");
if (ea == NULL) {
printf("%s: unable to get mac-addr property\n",
sc->sc_dev.dv_xname);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ibm4xx_autoconf.c,v 1.11 2007/02/22 16:57:56 thorpej Exp $ */
/* $NetBSD: ibm4xx_autoconf.c,v 1.12 2010/01/22 08:56:06 martin Exp $ */
/* Original Tag: ibm4xxgpx_autoconf.c,v 1.2 2004/10/23 17:12:22 thorpej Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ibm4xx_autoconf.c,v 1.11 2007/02/22 16:57:56 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ibm4xx_autoconf.c,v 1.12 2010/01/22 08:56:06 martin Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -70,7 +70,7 @@ ibm4xx_device_register(struct device *dev, void *aux)
return;
}
if (prop_dictionary_set(device_properties(dev),
"mac-addr", pd) == false) {
"mac-address", pd) == false) {
printf("WARNING: unable to set mac-addr "
"property for %s\n", dev->dv_xname);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wm.c,v 1.194 2010/01/21 08:52:20 msaitoh Exp $ */
/* $NetBSD: if_wm.c,v 1.195 2010/01/22 08:56:06 martin Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.194 2010/01/21 08:52:20 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.195 2010/01/22 08:56:06 martin Exp $");
#include "rnd.h"
@ -1452,7 +1452,7 @@ wm_attach(device_t parent, device_t self, void *aux)
* Read the Ethernet address from the EEPROM, if not first found
* in device properties.
*/
ea = prop_dictionary_get(dict, "mac-addr");
ea = prop_dictionary_get(dict, "mac-address");
if (ea != NULL) {
KASSERT(prop_object_type(ea) == PROP_TYPE_DATA);
KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN);