PERFORCE change 141633 for review
Julian Elischer
julian at FreeBSD.org
Thu May 15 07:14:08 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=141633
Change 141633 by julian at julian_trafmon1 on 2008/05/15 07:13:15
a bit further towards compiling
Affected files ...
.. //depot/projects/vimage/src/sys/net/route.c#17 edit
.. //depot/projects/vimage/src/sys/net80211/ieee80211.c#12 edit
.. //depot/projects/vimage/src/sys/net80211/ieee80211_freebsd.c#8 edit
.. //depot/projects/vimage/src/sys/net80211/ieee80211_var.h#10 edit
Differences ...
==== //depot/projects/vimage/src/sys/net/route.c#17 (text+ko) ====
@@ -107,9 +107,6 @@
static void rt_maskedcopy(struct sockaddr *,
struct sockaddr *, struct sockaddr *);
-#ifdef VIMAGE
-static int rtable_idetach(const void *);
-#endif
/* compare two sockaddr structures */
#define sa_equal(a1, a2) (bcmp((a1), (a2), (a1)->sa_len) == 0)
@@ -151,7 +148,6 @@
SYSCTL_PROC(_net, OID_AUTO, my_fibnum, CTLTYPE_INT|CTLFLAG_RD,
NULL, 0, &sysctl_my_fibnum, "I", "default FIB of caller");
-#ifdef VIMAGE
static int
rtable_init(const void *unused)
{
@@ -185,15 +181,15 @@
return 0;
}
+#ifdef VIMAGE
static int
-rtable_idetach(const void *unused);
+rtable_idetach(const void *unused)
{
int table;
int fam;
struct domain *dom;
INIT_VNET_NET(curvnet);
- struct domain *dom;
for (dom = domains; dom; dom = dom->dom_next) {
if (dom->dom_rtdetach) {
for (table = 0; table < rt_numfibs; table++) {
@@ -218,11 +214,8 @@
static void
route_init(void)
{
- int table;
- struct domain *dom;
- int fam;
- /* whack the tunable ints into line. */
+ /* whack the tunable ints into line. */
if (rt_numfibs > RT_MAXFIBS)
rt_numfibs = RT_MAXFIBS;
if (rt_numfibs == 0)
@@ -234,28 +227,7 @@
#ifdef VIMAGE
vnet_mod_register(&vnet_rtable_modinfo);
#else
- for (dom = domains; dom; dom = dom->dom_next) {
- if (dom->dom_rtattach) {
- for (table = 0; table < rt_numfibs; table++) {
- if ( (fam = dom->dom_family) == AF_INET ||
- table == 0) {
- /* for now only AF_INET has > 1 table */
- /* XXX MRT
- * rtattach will be also called
- * from vfs_export.c but the
- * offset will be 0
- * (only for AF_INET and AF_INET6
- * which don't need it anyhow)
- */
- dom->dom_rtattach(
- (void **)&V_rt_tables[table][fam],
- dom->dom_rtoffset);
- } else {
- break;
- }
- }
- }
- }
+ rtable_init(NULL);
#endif
}
==== //depot/projects/vimage/src/sys/net80211/ieee80211.c#12 (text+ko) ====
@@ -47,6 +47,7 @@
#include <net/if_types.h>
#include <net/if_var.h>
#include <net/ethernet.h>
+#include <net/vnet.h>
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_regdomain.h>
@@ -208,6 +209,7 @@
void
ieee80211_ifattach(struct ieee80211com *ic)
{
+ INIT_VNET_NET(curvnet);
struct ifnet *ifp = ic->ic_ifp;
struct sockaddr_dl *sdl;
struct ifaddr *ifa;
@@ -672,16 +674,16 @@
#ifdef VIMAGE
void
-ieee80211_reassign(struct ieee80211com *ic, struct vnet *vnet, char *dname)
+ieee80211_reassign( struct ieee80211vap *vap, struct vnet *vnet, char *dname)
{
+ struct ifnet *ifp = vap->iv_ifp;
u_char eaddr[6];
- struct ifnet *ifp = ic->ic_ifp;
bcopy(IF_LLADDR(ifp), eaddr, 6);
bpfdetach(ifp);
ether_ifdetach(ifp);
ifp->if_bpf = NULL;
- ic->ic_rawbpf = NULL;
+ vap->iv_rawbpf = NULL;
if_reassign_common(ifp, vnet, ifp->if_dname);
if (dname)
snprintf(ifp->if_xname, IFNAMSIZ, "%s", dname);
@@ -689,7 +691,7 @@
CURVNET_SET_QUIET(vnet);
ether_ifattach(ifp, eaddr);
bpfattach2(ifp, DLT_IEEE802_11,
- sizeof(struct ieee80211_frame_addr4), &ic->ic_rawbpf);
+ sizeof(struct ieee80211_frame_addr4), &vap->iv_rawbpf);
CURVNET_RESTORE();
}
#endif
==== //depot/projects/vimage/src/sys/net80211/ieee80211_freebsd.c#8 (text+ko) ====
@@ -461,6 +461,7 @@
struct ieee80211vap *vap = ni->ni_vap;
struct ifnet *ifp = vap->iv_ifp;
+ CURVNET_SET_QUIET(ifp->if_vnet);
IEEE80211_NOTE(vap, IEEE80211_MSG_NODE, ni, "%snode join",
(ni == vap->iv_bss) ? "bss " : "");
==== //depot/projects/vimage/src/sys/net80211/ieee80211_var.h#10 (text+ko) ====
@@ -536,7 +536,7 @@
int ieee80211_vap_attach(struct ieee80211vap *,
ifm_change_cb_t, ifm_stat_cb_t);
void ieee80211_vap_detach(struct ieee80211vap *);
-void ieee80211_reassign(struct ieee80211com *, struct vnet *, char *);
+void ieee80211_reassign(struct ieee80211vap *, struct vnet *, char *);
const struct ieee80211_rateset *ieee80211_get_suprates(struct ieee80211com *ic,
const struct ieee80211_channel *);
More information about the p4-projects
mailing list