diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-08-25 08:18:55 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-08-25 08:18:55 +0000 |
commit | 00480f5d7b5a5da9d60bbcd1a6e41edb687f7e78 (patch) | |
tree | 32bd0073eaaf49b3ed855dfa72d130334fa01abc | |
parent | 446d86e01f48fc6149c40c557618fa0efa3adcfa (diff) |
if_init support, required by ieee80211.
deraadt@ ok.
-rw-r--r-- | sys/net/if.c | 10 | ||||
-rw-r--r-- | sys/net/if.h | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 458e8af9bdd..8101114984c 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.68 2003/08/15 20:32:19 tedu Exp $ */ +/* $OpenBSD: if.c,v 1.69 2003/08/25 08:18:54 fgsch Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -117,6 +117,7 @@ int netisr; void if_detach_queues(struct ifnet *, struct ifqueue *); void if_detached_start(struct ifnet *); int if_detached_ioctl(struct ifnet *, u_long, caddr_t); +int if_detached_init(struct ifnet *); void if_detached_watchdog(struct ifnet *); /* @@ -417,6 +418,7 @@ if_detach(ifp) ifp->if_flags &= ~IFF_OACTIVE; ifp->if_start = if_detached_start; ifp->if_ioctl = if_detached_ioctl; + ifp->if_init = if_detached_init; ifp->if_watchdog = if_detached_watchdog; #if NBRIDGE > 0 @@ -1192,6 +1194,12 @@ if_detached_ioctl(struct ifnet *ifp, u_long a, caddr_t b) return ENODEV; } +int +if_detached_init(struct ifnet *ifp) +{ + return (ENXIO); +} + void if_detached_watchdog(struct ifnet *ifp) { diff --git a/sys/net/if.h b/sys/net/if.h index 010aa25f461..716a158c88e 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.41 2003/06/02 23:28:11 millert Exp $ */ +/* $OpenBSD: if.h,v 1.42 2003/08/25 08:18:54 fgsch Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -163,6 +163,8 @@ struct ifnet { /* and the entries */ void (*if_start)(struct ifnet *); /* ioctl routine */ int (*if_ioctl)(struct ifnet *, u_long, caddr_t); + /* init routine */ + int (*if_init)(struct ifnet *); /* XXX bus reset routine */ int (*if_reset)(struct ifnet *); /* timer routine */ |