mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
- Fix our handler checks
- Now XP's intermediate miniport drivers can load on ROS's NDIS - More work still needs to be done to get them working though svn path=/trunk/; revision=41346
This commit is contained in:
parent
f088b72ab8
commit
3f12788efc
1 changed files with 36 additions and 6 deletions
|
@ -2345,15 +2345,33 @@ NdisMRegisterMiniport(
|
|||
|
||||
/* Check if mandatory MiniportXxx functions are specified */
|
||||
if ((!MiniportCharacteristics->HaltHandler) ||
|
||||
(!MiniportCharacteristics->InitializeHandler)||
|
||||
(!MiniportCharacteristics->QueryInformationHandler) ||
|
||||
(!MiniportCharacteristics->ResetHandler) ||
|
||||
(!MiniportCharacteristics->SetInformationHandler))
|
||||
(!MiniportCharacteristics->InitializeHandler)||
|
||||
(!MiniportCharacteristics->ResetHandler))
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Bad miniport characteristics.\n"));
|
||||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
|
||||
if (MiniportCharacteristics->MajorNdisVersion < 0x05)
|
||||
{
|
||||
if ((!MiniportCharacteristics->QueryInformationHandler) ||
|
||||
(!MiniportCharacteristics->SetInformationHandler))
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Bad miniport characteristics. (Set/Query)\n"));
|
||||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((!MiniportCharacteristics->QueryInformationHandler) ||
|
||||
(!MiniportCharacteristics->SetInformationHandler)) &&
|
||||
(!MiniportCharacteristics->CoRequestHandler))
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Bad miniport characteristics. (Set/Query)\n"));
|
||||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
|
||||
if (MiniportCharacteristics->MajorNdisVersion == 0x03)
|
||||
{
|
||||
if (!MiniportCharacteristics->SendHandler)
|
||||
|
@ -2362,9 +2380,9 @@ NdisMRegisterMiniport(
|
|||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
else if (MiniportCharacteristics->MajorNdisVersion >= 0x04)
|
||||
else if (MiniportCharacteristics->MajorNdisVersion == 0x04)
|
||||
{
|
||||
/* NDIS 4.0+ */
|
||||
/* NDIS 4.0 */
|
||||
if ((!MiniportCharacteristics->SendHandler) &&
|
||||
(!MiniportCharacteristics->SendPacketsHandler))
|
||||
{
|
||||
|
@ -2372,6 +2390,18 @@ NdisMRegisterMiniport(
|
|||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
else if (MiniportCharacteristics->MajorNdisVersion == 0x05)
|
||||
{
|
||||
/* TODO: Add more checks here */
|
||||
|
||||
if ((!MiniportCharacteristics->SendHandler) &&
|
||||
(!MiniportCharacteristics->SendPacketsHandler) &&
|
||||
(!MiniportCharacteristics->CoSendPacketsHandler))
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Bad miniport characteristics. (NDIS 5.0)\n"));
|
||||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: verify NDIS5 and NDIS5.1 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue