summaryrefslogtreecommitdiff
path: root/sys/dev/ic/if_wi.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-07-10 20:21:17 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-07-10 20:21:17 +0000
commitaf55ea6d8d0faa8e558acc4948995dcc65aec1f5 (patch)
tree2dddfd14a5f29348ea6b719c4a3cdd3b41fe283d /sys/dev/ic/if_wi.c
parenta9d36a15300d00a032a09acbf3e23685223599ab (diff)
use ifp->if_sadl whether possible.
Diffstat (limited to 'sys/dev/ic/if_wi.c')
-rw-r--r--sys/dev/ic/if_wi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index 2fa9c39a225..fecdd77aff2 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.73 2002/06/24 17:59:09 fgsch Exp $ */
+/* $OpenBSD: if_wi.c,v 1.74 2002/07/10 20:21:16 fgsch Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.73 2002/06/24 17:59:09 fgsch Exp $";
+ "$OpenBSD: if_wi.c,v 1.74 2002/07/10 20:21:16 fgsch Exp $";
#endif /* lint */
#ifdef foo
@@ -1315,19 +1315,15 @@ wi_setdef(sc, wreq)
struct wi_softc *sc;
struct wi_req *wreq;
{
- struct sockaddr_dl *sdl;
- struct ifaddr *ifa;
struct ifnet *ifp;
- extern struct ifaddr **ifnet_addrs;
int error = 0;
ifp = &sc->sc_arpcom.ac_if;
switch(wreq->wi_type) {
case WI_RID_MAC_NODE:
- ifa = ifnet_addrs[ifp->if_index];
- sdl = (struct sockaddr_dl *)ifa->ifa_addr;
- bcopy((char *)&wreq->wi_val, LLADDR(sdl), ETHER_ADDR_LEN);
+ bcopy((char *)&wreq->wi_val, LLADDR(ifp->if_sadl),
+ ETHER_ADDR_LEN);
bcopy((char *)&wreq->wi_val, (char *)&sc->sc_arpcom.ac_enaddr,
ETHER_ADDR_LEN);
break;