PERFORCE change 133366 for review
Sam Leffler
sam at FreeBSD.org
Tue Jan 15 15:19:17 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=133366
Change 133366 by sam at sam_ebb on 2008/01/15 23:19:08
don't see a reason to hookup ether stuff for the device; doing
it caused the ifnet mutex's to get double-initialized anyway
Affected files ...
.. //depot/projects/vap/sys/net80211/ieee80211.c#21 edit
Differences ...
==== //depot/projects/vap/sys/net80211/ieee80211.c#21 (text+ko) ====
@@ -192,8 +192,6 @@
struct sockaddr_dl *sdl;
struct ifaddr *ifa;
- ether_ifattach(ifp, ic->ic_myaddr);
-
IEEE80211_LOCK_INIT(ic, "ieee80211com");
TAILQ_INIT(&ic->ic_vaps);
/*
@@ -225,15 +223,15 @@
ifp->if_addrlen = IEEE80211_ADDR_LEN;
ifp->if_hdrlen = 0;
if_attach(ifp);
- /* NB: must do after 'cuz if_attach resets state */
ifp->if_mtu = IEEE80211_MTU_MAX;
+ ifp->if_broadcastaddr = ieee80211broadcastaddr;
+
ifa = ifaddr_byindex(ifp->if_index);
KASSERT(ifa != NULL, ("%s: no lladdr!\n", __func__));
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);
- ifp->if_broadcastaddr = ieee80211broadcastaddr;
}
/*
@@ -263,9 +261,6 @@
ieee80211_node_detach(ic);
ifmedia_removeall(&ic->ic_media);
- bpfdetach(ifp);
- ether_ifdetach(ifp);
-
IEEE80211_LOCK_DESTROY(ic);
if_detach(ifp);
}
More information about the p4-projects
mailing list