From 7edd0aa8efc500847d789aedf8904ab96a6fe234 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 29 Mar 2009 17:59:14 +0000 Subject: Eliminate ic_myaddr so changing the mac address of a device works correctly: o remove ic_myaddr from ieee80211com o change ieee80211_ifattach to take the mac address of the physical device and use that to setup the lladdr. o replace all references to ic_myaddr in drivers by IF_LLADDR o related cleanups (e.g. kill dead code) PR: kern/133178 Reviewed by: thompsa, rpaulo --- sys/net80211/ieee80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net80211/ieee80211.c') diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 40af9bb..71c9516 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -239,7 +239,8 @@ null_input(struct ifnet *ifp, struct mbuf *m) * the driver on attach to prior to creating any vap's. */ void -ieee80211_ifattach(struct ieee80211com *ic) +ieee80211_ifattach(struct ieee80211com *ic, + const uint8_t macaddr[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct sockaddr_dl *sdl; @@ -290,7 +291,7 @@ ieee80211_ifattach(struct ieee80211com *ic) sdl = (struct sockaddr_dl *)ifa->ifa_addr; sdl->sdl_type = IFT_ETHER; /* XXX IFT_IEEE80211? */ sdl->sdl_alen = IEEE80211_ADDR_LEN; - IEEE80211_ADDR_COPY(LLADDR(sdl), ic->ic_myaddr); + IEEE80211_ADDR_COPY(LLADDR(sdl), macaddr); } /* -- cgit v1.1