summaryrefslogtreecommitdiffstats
path: root/sys/dev/if_ndis
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2007-12-09 20:14:01 +0000
committerthompsa <thompsa@FreeBSD.org>2007-12-09 20:14:01 +0000
commit8b2f43475d885e4eeb18201bf6f52eb574488739 (patch)
treedb56abc8a3bd5070c3c67ada3ab2386aef60a159 /sys/dev/if_ndis
parent0ae05e01f73ffa09519d275867f7f83a7911852d (diff)
downloadFreeBSD-src-8b2f43475d885e4eeb18201bf6f52eb574488739.zip
FreeBSD-src-8b2f43475d885e4eeb18201bf6f52eb574488739.tar.gz
sc->ndis_tq variable is only initialized when a driver module is for wireless
NICs. PR: kern/118439 Submitted by: Weongyo Jeong
Diffstat (limited to 'sys/dev/if_ndis')
-rw-r--r--sys/dev/if_ndis/if_ndis.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c
index c5bde2e..b27d46f 100644
--- a/sys/dev/if_ndis/if_ndis.c
+++ b/sys/dev/if_ndis/if_ndis.c
@@ -958,7 +958,8 @@ ndis_detach(dev)
} else
NDIS_UNLOCK(sc);
- taskqueue_drain(sc->ndis_tq, &sc->ndis_scantask);
+ if (sc->ndis_80211)
+ taskqueue_drain(sc->ndis_tq, &sc->ndis_scantask);
if (sc->ndis_tickitem != NULL)
IoFreeWorkItem(sc->ndis_tickitem);
@@ -1017,7 +1018,8 @@ ndis_detach(dev)
if (sc->ndis_iftype == PCIBus)
bus_dma_tag_destroy(sc->ndis_parent_tag);
- taskqueue_free(sc->ndis_tq);
+ if (sc->ndis_80211)
+ taskqueue_free(sc->ndis_tq);
return(0);
}
OpenPOWER on IntegriCloud