summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-03-29 17:59:14 +0000
committersam <sam@FreeBSD.org>2009-03-29 17:59:14 +0000
commit7edd0aa8efc500847d789aedf8904ab96a6fe234 (patch)
tree8bb42581e6c46229c54ff76ee3fd9dd1e507f939 /sys/net80211/ieee80211.c
parentcb768e2631a7f373d03c4b3c7fb251e76badc6a7 (diff)
downloadFreeBSD-src-7edd0aa8efc500847d789aedf8904ab96a6fe234.zip
FreeBSD-src-7edd0aa8efc500847d789aedf8904ab96a6fe234.tar.gz
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
Diffstat (limited to 'sys/net80211/ieee80211.c')
-rw-r--r--sys/net80211/ieee80211.c5
1 files changed, 3 insertions, 2 deletions
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);
}
/*
OpenPOWER on IntegriCloud