diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-07-01 19:30:52 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-07-01 19:30:52 +0000 |
commit | 38a47693198e366d96f1d246c6c0c2b2e0413d51 (patch) | |
tree | 857beb9ad88663d3daef3c73ccff80f760581f76 /sys/dev/ic/if_wi.c | |
parent | 8aa8e5cf64c4d28dc2dc932245c104df37a3ab09 (diff) |
update the 802.11 address as well if the interface mac address has
been changed by the user, ie. with the ifconfig lladdr command. this
also replaces the old wicontrol -m option.
this closes pr 5159 from peter philipp at freenet dot de.
Diffstat (limited to 'sys/dev/ic/if_wi.c')
-rw-r--r-- | sys/dev/ic/if_wi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index be80a746fa4..d3edc64a5ab 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.131 2006/06/27 20:55:51 reyk Exp $ */ +/* $OpenBSD: if_wi.c,v 1.132 2006/07/01 19:30:51 reyk Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -127,7 +127,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.131 2006/06/27 20:55:51 reyk Exp $"; + "$OpenBSD: if_wi.c,v 1.132 2006/07/01 19:30:51 reyk Exp $"; #endif /* lint */ #ifdef foo @@ -2148,8 +2148,10 @@ wi_init_io(struct wi_softc *sc) /* Set our MAC address. */ mac.wi_len = 4; mac.wi_type = WI_RID_MAC_NODE; + bcopy(LLADDR(ifp->if_sadl), + (char *)&sc->sc_ic.ic_myaddr, ETHER_ADDR_LEN); bcopy((char *)&sc->sc_ic.ic_myaddr, - (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN); + (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN); wi_write_record(sc, (struct wi_ltv_gen *)&mac); /* |