fix a bug to handling the argument that it passed `device_t' but it's
handled as `struct ndis_softc'. It'll cause a panic when the driver is detached.
This commit is contained in:
parent
511080ae53
commit
e3a7c990ff
@ -1205,11 +1205,13 @@ ndis_pnpevent_nic(arg, type)
|
||||
void *arg;
|
||||
int type;
|
||||
{
|
||||
device_t dev;
|
||||
struct ndis_softc *sc;
|
||||
ndis_handle adapter;
|
||||
ndis_pnpevent_handler pnpeventfunc;
|
||||
|
||||
sc = arg;
|
||||
dev = arg;
|
||||
sc = device_get_softc(arg);
|
||||
NDIS_LOCK(sc);
|
||||
adapter = sc->ndis_block->nmb_miniportadapterctx;
|
||||
pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler;
|
||||
|
Loading…
x
Reference in New Issue
Block a user