aboutsummaryrefslogtreecommitdiff
path: root/sys/net/iflib_clone.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/iflib_clone.c')
-rw-r--r--sys/net/iflib_clone.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/iflib_clone.c b/sys/net/iflib_clone.c
index dc4ccbee659f..975873c4a19c 100644
--- a/sys/net/iflib_clone.c
+++ b/sys/net/iflib_clone.c
@@ -81,13 +81,11 @@ int
iflib_pseudo_detach(device_t dev)
{
if_ctx_t ctx;
- uint32_t ifc_flags;
ctx = device_get_softc(dev);
- ifc_flags = iflib_get_flags(ctx);
- if ((ifc_flags & IFC_INIT_DONE) == 0)
- return (0);
- return (IFDI_DETACH(ctx));
+ if ((iflib_get_flags(ctx) & IFC_IN_DETACH) == 0)
+ return (EBUSY);
+ return (0);
}
static device_t iflib_pseudodev;