diff options
| author | Warner Losh <imp@FreeBSD.org> | 2005-01-27 04:51:44 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2005-01-27 04:51:44 +0000 |
| commit | 221db7416de5100ca57e847aac9a949dce35e28d (patch) | |
| tree | fbafcf5be882bfacebecf9d49426a05b2a944467 /sys/dev/cs/if_cs.c | |
| parent | 118c73087b16ab33e972ab5e7c4584fe0f51b7db (diff) | |
Notes
Diffstat (limited to 'sys/dev/cs/if_cs.c')
| -rw-r--r-- | sys/dev/cs/if_cs.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c index a8f058068f53..01f4d7bfbaa4 100644 --- a/sys/dev/cs/if_cs.c +++ b/sys/dev/cs/if_cs.c @@ -689,6 +689,22 @@ cs_attach(device_t dev) return (0); } +int +cs_detach(device_t dev) +{ + struct cs_softc *sc; + struct ifnet *ifp; + + sc = device_get_softc(dev); + ifp = &sc->arpcom.ac_if; + + cs_stop(sc); + ifp->if_flags &= ~IFF_RUNNING; + ether_ifdetach(ifp); + cs_release_resources(dev); + return (0); +} + /* * Initialize the board */ |
