summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2005-08-21 18:40:17 +0000
committerreyk <reyk@openbsd.org>2005-08-21 18:40:17 +0000
commit815e3cedaab589590d3542dcf610405f26abd029 (patch)
treeb734e0fb06ea91fce8ae7da828992a5eed9d32f1
parentcatch QUIT, HUP, KILL, TERM along with INT, remove the temp dirs, then die. (diff)
downloadwireguard-openbsd-815e3cedaab589590d3542dcf610405f26abd029.tar.xz
wireguard-openbsd-815e3cedaab589590d3542dcf610405f26abd029.zip
update the 802.11 station address if the ethernet lladdr has been changed.
pointed out by Nick Holmes and Justin Reigle.
-rw-r--r--sys/dev/ic/ath.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 1ae2958cdb2..073a9a4d1e5 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.34 2005/08/21 11:17:51 reyk Exp $ */
+/* $OpenBSD: ath.c,v 1.35 2005/08/21 18:40:17 reyk Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -701,6 +701,12 @@ ath_init1(struct ath_softc *sc)
ath_stop(ifp);
/*
+ * Reset the link layer address to the latest value.
+ */
+ IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl));
+ ath_hal_set_lladdr(ah, ic->ic_myaddr);
+
+ /*
* The basic interface to setting the hardware in a good
* state is ``reset''. On return the hardware is known to
* be powered up and with interrupts disabled. This must