diff options
author | wpaul <wpaul@FreeBSD.org> | 2005-05-05 06:14:59 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2005-05-05 06:14:59 +0000 |
commit | 077b71e0fa3ad5840a2b555ba5e3a6a921112309 (patch) | |
tree | 410c6511abb92016ae44b5b4c2a55f0549a00b7b /sys/dev/if_ndis | |
parent | bb2b136388b6487eb1e2e1fe0e86f28e49864d25 (diff) | |
download | FreeBSD-src-077b71e0fa3ad5840a2b555ba5e3a6a921112309.zip FreeBSD-src-077b71e0fa3ad5840a2b555ba5e3a6a921112309.tar.gz |
Avoid sleeping with mutex held in kern_ndis.c.
Remove unused fields from ndis_miniport_block.
Fix a bug in KeFlushQueuedDpcs() (we weren't calculating the kq pointer
correctly).
In if_ndis.c, clear the IFF_RUNNING flag before calling ndis_halt_nic().
Add some guards in kern_ndis.c to avoid letting anyone invoke ndis_get_info()
or ndis_set_info() if the NIC isn't fully initialized. Apparently, mdnsd
will sometimes try to invoke the ndis_ioctl() routine at exactly the
wrong moment (to futz with its multicast filters) when the interface
comes up, and can trigger a crash unless we guard against it.
Diffstat (limited to 'sys/dev/if_ndis')
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 072146c..e09250d 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -2768,14 +2768,14 @@ ndis_stop(sc) ifp = &sc->arpcom.ac_if; untimeout(ndis_tick, sc, sc->ndis_stat_ch); - ndis_halt_nic(sc); - NDIS_LOCK(sc); ifp->if_timer = 0; sc->ndis_link = 0; ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); NDIS_UNLOCK(sc); + ndis_halt_nic(sc); + return; } |