mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
In NDIS 5.1 miniport drivers, the shutdown handler function pointer
is provided to NDIS via the the miniport characteristics structure supplied in the call to NdisMRegisterMiniport(). But in NDIS 5.0 and earlier, you had to call NdisMRegisterAdapterShutdownHandler() and supply both a function pointer and context pointer. We try to handle both cases in ndis_shutdown_nic(). If the driver registered a shutdown routine and a context,then used that context, otherwise pass it the adapter context from NdisMSetAttributesEx(). This fixes a panic on shutdown with the sample Intel 82559 e100bex.sys driver from the Windows DDK. function pointer
This commit is contained in:
parent
c42411d56f
commit
d7e92f7b85
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123485
@ -770,7 +770,10 @@ ndis_shutdown_nic(arg)
|
||||
if (shutdownfunc == NULL)
|
||||
return(EINVAL);
|
||||
|
||||
shutdownfunc(sc->ndis_chars.nmc_rsvd0);
|
||||
if (sc->ndis_chars.nmc_rsvd0 == NULL)
|
||||
shutdownfunc(adapter);
|
||||
else
|
||||
shutdownfunc(sc->ndis_chars.nmc_rsvd0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user