[ros-diffs] [cgutman] 45437: - Fix some epic fail in NdisMRegisterMiniport - We were checking to see if there were valid NDIS 5.1-specific characteristics if 5.1 was specified as the version but we didn't actually copy them into our local buffer - Now NdisCancelPackets will actually do something if the miniport implements a MiniportCancelSendPackets handler and PnP event notifications will get through to the miniport if it implements a MiniportPnPEventNotify handler

cgutman at svn.reactos.org cgutman at svn.reactos.org
Fri Feb 5 09:33:49 CET 2010


Author: cgutman
Date: Fri Feb  5 09:33:48 2010
New Revision: 45437

URL: http://svn.reactos.org/svn/reactos?rev=45437&view=rev
Log:
 - Fix some epic fail in NdisMRegisterMiniport
 - We were checking to see if there were valid NDIS 5.1-specific characteristics if 5.1 was specified as the version but we didn't actually copy them into our local buffer
 - Now NdisCancelPackets will actually do something if the miniport implements a MiniportCancelSendPackets handler and PnP event notifications will get through to the miniport if it implements a MiniportPnPEventNotify handler

Modified:
    branches/aicom-network-branch/drivers/network/ndis/ndis/miniport.c

Modified: branches/aicom-network-branch/drivers/network/ndis/ndis/miniport.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/drivers/network/ndis/ndis/miniport.c?rev=45437&r1=45436&r2=45437&view=diff
==============================================================================
--- branches/aicom-network-branch/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ branches/aicom-network-branch/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Fri Feb  5 09:33:48 2010
@@ -2325,7 +2325,20 @@
         break;
 
       case 0x05:
-        MinSize = sizeof(NDIS50_MINIPORT_CHARACTERISTICS);
+        switch (MiniportCharacteristics->MinorNdisVersion)
+        {
+           case 0x00:
+             MinSize = sizeof(NDIS50_MINIPORT_CHARACTERISTICS);
+             break;
+
+           case 0x01:
+             MinSize = sizeof(NDIS51_MINIPORT_CHARACTERISTICS);
+             break;
+
+           default:
+             NDIS_DbgPrint(MIN_TRACE, ("Bad minor miniport characteristics version.\n"));
+             return NDIS_STATUS_BAD_VERSION;
+        }
         break;
 
       default:




More information about the Ros-diffs mailing list