Cameron Gutman [Fri, 3 Oct 2008 09:49:37 +0000 (09:49 +0000)]
- Implement NdisMIndicateStatus
svn path=/branches/aicom-network-fixes/; revision=36631
Cameron Gutman [Thu, 2 Oct 2008 02:13:19 +0000 (02:13 +0000)]
- Adapter is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
svn path=/branches/aicom-network-fixes/; revision=36621
Cameron Gutman [Thu, 2 Oct 2008 02:04:57 +0000 (02:04 +0000)]
- Only call MiniportISR if the miniport driver called NdisMRegisterInterrupt with RequestIsr TRUE
- If RequestIsr is FALSE call the MiniportDisableInterrupt handler
svn path=/branches/aicom-network-fixes/; revision=36620
Cameron Gutman [Wed, 1 Oct 2008 23:10:00 +0000 (23:10 +0000)]
- Adapter not NdisMiniportBlock is passed to ServiceRoutine
svn path=/branches/aicom-network-fixes/; revision=36619
Cameron Gutman [Tue, 30 Sep 2008 00:09:23 +0000 (00:09 +0000)]
- Send the packet immediately if the miniport is not busy
- Change KeAcquireSpinLockAtDpcLevel/KeReleaseSpinLockFromDpcLevel to KeAcquireSpinLock/KeReleaseSpinLock since we aren't at DISPATCH_LEVEL
- Fix some comments
svn path=/branches/aicom-network-fixes/; revision=36594
Cameron Gutman [Tue, 30 Sep 2008 00:04:52 +0000 (00:04 +0000)]
- Code cleanup
svn path=/branches/aicom-network-fixes/; revision=36593
Cameron Gutman [Tue, 30 Sep 2008 00:02:53 +0000 (00:02 +0000)]
- Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=36592
Cameron Gutman [Mon, 29 Sep 2008 23:57:32 +0000 (23:57 +0000)]
- Use the proper flags so NDIS knows that our NIC doesn't have hardware loopback support
- Fixes the loopback adapter
svn path=/branches/aicom-network-fixes/; revision=36591
Cameron Gutman [Sun, 28 Sep 2008 20:05:38 +0000 (20:05 +0000)]
- Call the ProtocolReceive handler at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36581
Cameron Gutman [Sun, 28 Sep 2008 19:58:09 +0000 (19:58 +0000)]
- Raise IRQL to DISPATCH_LEVEL before using KeAcquireSpinLockAtDpcLevel/KeReleaseSpinLockFromDpcLevel
svn path=/branches/aicom-network-fixes/; revision=36580
Cameron Gutman [Sat, 27 Sep 2008 19:54:58 +0000 (19:54 +0000)]
- Set MiniportBusy to TRUE if a request is pending
- Hold spin lock when setting MiniportBusy (forgot one from last time)
svn path=/branches/aicom-network-fixes/; revision=36558
Cameron Gutman [Sat, 27 Sep 2008 19:26:17 +0000 (19:26 +0000)]
- Don't add the protocol to the protocol list if binding failed
svn path=/branches/aicom-network-fixes/; revision=36557
Cameron Gutman [Sat, 27 Sep 2008 19:00:47 +0000 (19:00 +0000)]
- Protect MiniportBusy with a spin lock
- Adapter is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
- Make sure memory allocation was successful
- Cleanup code in ProRequest
svn path=/branches/aicom-network-fixes/; revision=36556
Cameron Gutman [Sat, 27 Sep 2008 18:30:11 +0000 (18:30 +0000)]
- Call ResetHandler directly
svn path=/branches/aicom-network-fixes/; revision=36552
Cameron Gutman [Sat, 27 Sep 2008 18:00:08 +0000 (18:00 +0000)]
- Queue a work item in MiniReset if the adapter is currently busy
- Handle NdisWorkItemResetRequested in MiniportWorker
- Remove a fixme
svn path=/branches/aicom-network-fixes/; revision=36551
Cameron Gutman [Fri, 26 Sep 2008 18:10:50 +0000 (18:10 +0000)]
- Remove dead code
- Fixes coverity error 85
svn path=/branches/aicom-network-fixes/; revision=36538
Cameron Gutman [Fri, 26 Sep 2008 03:43:07 +0000 (03:43 +0000)]
- Fix a typo
- Fixes coverity error 388
svn path=/branches/aicom-network-fixes/; revision=36528
Cameron Gutman [Fri, 26 Sep 2008 03:35:56 +0000 (03:35 +0000)]
- Return early if there aren't any packets to be sent
- Fixes coverity error 458
svn path=/branches/aicom-network-fixes/; revision=36527
Cameron Gutman [Fri, 26 Sep 2008 03:23:56 +0000 (03:23 +0000)]
- Return early if NBAddNeighbor or RouterAddRoute fails
- Fixes coverity error 389
svn path=/branches/aicom-network-fixes/; revision=36526
Cameron Gutman [Fri, 26 Sep 2008 03:12:18 +0000 (03:12 +0000)]
- Return early if ProtocolNumber is too large
- Fixes coverity error 600
svn path=/branches/aicom-network-fixes/; revision=36525
Cameron Gutman [Fri, 26 Sep 2008 03:03:55 +0000 (03:03 +0000)]
- Fail if From is NULL
- Fixes Coverity error 652
svn path=/branches/aicom-network-fixes/; revision=36524
Cameron Gutman [Thu, 25 Sep 2008 03:23:15 +0000 (03:23 +0000)]
- Don't call NdisMSendComplete in MiniportSend
svn path=/branches/aicom-network-fixes/; revision=36501
Cameron Gutman [Thu, 25 Sep 2008 01:02:08 +0000 (01:02 +0000)]
- Created a dummy nic driver for testing purposes
- Still a work in progress
svn path=/branches/aicom-network-fixes/; revision=36500
Cameron Gutman [Wed, 24 Sep 2008 22:00:02 +0000 (22:00 +0000)]
- Add a debug print
svn path=/branches/aicom-network-fixes/; revision=36496
Cameron Gutman [Wed, 24 Sep 2008 21:56:07 +0000 (21:56 +0000)]
- MiniportAdapterHandle is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
svn path=/branches/aicom-network-fixes/; revision=36495
Cameron Gutman [Tue, 23 Sep 2008 23:59:43 +0000 (23:59 +0000)]
- Use timers so the code is much more simple and works better
svn path=/branches/aicom-network-fixes/; revision=36442
Cameron Gutman [Tue, 23 Sep 2008 20:54:02 +0000 (20:54 +0000)]
- Check for miniport hangs at the appropriate time
- Call MiniReset if required
svn path=/branches/aicom-network-fixes/; revision=36441
Cameron Gutman [Tue, 23 Sep 2008 20:48:43 +0000 (20:48 +0000)]
- Uncomment the stubbed CheckForHang handler
svn path=/branches/aicom-network-fixes/; revision=36440
Cameron Gutman [Tue, 23 Sep 2008 20:17:59 +0000 (20:17 +0000)]
- Set CheckForHangSeconds to a default value of 2 if it wasn't set in MiniportInitialize
svn path=/branches/aicom-network-fixes/; revision=36438
Cameron Gutman [Tue, 23 Sep 2008 20:10:35 +0000 (20:10 +0000)]
- Set CheckForHangSeconds
svn path=/branches/aicom-network-fixes/; revision=36437
Cameron Gutman [Tue, 23 Sep 2008 18:44:17 +0000 (18:44 +0000)]
- Call the CheckForHang handler at DISPATCH_LEVEL
- Implement MiniReset
svn path=/branches/aicom-network-fixes/; revision=36433
Cameron Gutman [Tue, 23 Sep 2008 18:24:19 +0000 (18:24 +0000)]
- Implement MiniCheckForHang
svn path=/branches/aicom-network-fixes/; revision=36432
Cameron Gutman [Tue, 23 Sep 2008 18:07:26 +0000 (18:07 +0000)]
- We must check that NdisWrapperHandle is non-NULL to see if NdisMInitializeWrapper succeeded
svn path=/branches/aicom-network-fixes/; revision=36430
Cameron Gutman [Tue, 23 Sep 2008 04:53:59 +0000 (04:53 +0000)]
- Add some IRQL checks for ne2000 like those in r36406
svn path=/branches/aicom-network-fixes/; revision=36408
Cameron Gutman [Tue, 23 Sep 2008 04:39:31 +0000 (04:39 +0000)]
- Change NdisAcquireSpinLock to NdisDprAcquireSpinLock because we are running at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36407
Cameron Gutman [Tue, 23 Sep 2008 04:29:30 +0000 (04:29 +0000)]
- Add some IRQL checks
- Fix some comments
svn path=/branches/aicom-network-fixes/; revision=36406
Cameron Gutman [Sun, 21 Sep 2008 14:40:28 +0000 (14:40 +0000)]
- Set the InFlightRequest to NULL when we complete
svn path=/branches/aicom-network-fixes/; revision=36381
Cameron Gutman [Sun, 21 Sep 2008 12:31:14 +0000 (12:31 +0000)]
- There are 4 in flight requests not 3
svn path=/branches/aicom-network-fixes/; revision=36371
Cameron Gutman [Sun, 21 Sep 2008 03:21:34 +0000 (03:21 +0000)]
- Remove more useless code
svn path=/branches/aicom-network-fixes/; revision=36364
Cameron Gutman [Sun, 21 Sep 2008 02:35:23 +0000 (02:35 +0000)]
- Set MiniportBusy to TRUE in MiniDequeueWorkItem instead of MiniQueueWorkItem
- Fail if another miniport request is still in progress
svn path=/branches/aicom-network-fixes/; revision=36363
Cameron Gutman [Sun, 21 Sep 2008 01:55:16 +0000 (01:55 +0000)]
- Remove some unneeded code
- Set MiniportBusy to TRUE if MiniDoRequest returns NDIS_STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=36362
Cameron Gutman [Sat, 20 Sep 2008 23:08:56 +0000 (23:08 +0000)]
- Only call MiniSendComplete if ProIndicatePacket didn't return NDIS_STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=36359
Cameron Gutman [Sat, 20 Sep 2008 21:29:31 +0000 (21:29 +0000)]
- Revert r36337 because the callers don't depend on the memory being zeroed
svn path=/branches/aicom-network-fixes/; revision=36358
Cameron Gutman [Sat, 20 Sep 2008 17:10:30 +0000 (17:10 +0000)]
- The handle passed to MiniRequestComplete, NdisMQueryInformationComplete, and NdisMSetInformationComplete is the Adapter not the MiniportBlock
- Set MiniportBusy to FALSE in all the completion routines
- Set MiniportBusy to TRUE in MiniQueueWorkItem
- Only requeue the packet if it's a serialized miniport that returned NDIS_STATUS_RESOURCES
- Hold the spin lock when requeuing the packet
svn path=/branches/aicom-network-fixes/; revision=36356
Cameron Gutman [Sat, 20 Sep 2008 00:31:02 +0000 (00:31 +0000)]
- Zero the memory after we allocate it
svn path=/branches/aicom-network-fixes/; revision=36337
Cameron Gutman [Fri, 19 Sep 2008 23:51:26 +0000 (23:51 +0000)]
- Queue the packet again if we currently don't have enough resources to process it
svn path=/branches/aicom-network-fixes/; revision=36336
Cameron Gutman [Fri, 19 Sep 2008 23:41:28 +0000 (23:41 +0000)]
- Initialize the callback record before calling KeRegisterBugCheckCallback so NdisMRegisterAdapterShutdownHandler should work now
svn path=/branches/aicom-network-fixes/; revision=36335
Cameron Gutman [Fri, 19 Sep 2008 23:18:12 +0000 (23:18 +0000)]
- Code cleanup
- Set Status to NDIS_STATUS_NOT_SUPPORTED if we don't support the parameter type
svn path=/branches/aicom-network-fixes/; revision=36334
Cameron Gutman [Fri, 19 Sep 2008 23:16:29 +0000 (23:16 +0000)]
- Store the current thread
svn path=/branches/aicom-network-fixes/; revision=36333
Cameron Gutman [Fri, 19 Sep 2008 04:38:25 +0000 (04:38 +0000)]
- Fail if TCPSocket doesn't complete successfully
svn path=/branches/aicom-network-fixes/; revision=36311
Cameron Gutman [Fri, 19 Sep 2008 04:18:59 +0000 (04:18 +0000)]
- Add the adapter to the adapter list only after it is bound to the IP layer
svn path=/branches/aicom-network-fixes/; revision=36310
Cameron Gutman [Fri, 19 Sep 2008 02:12:55 +0000 (02:12 +0000)]
- Exit the loop when we find the matching Bucket
- Make sure we allocated Bucket
- Remove a useless if
- Return OSK_ENOBUFS if we can't allocate SleepingThread
svn path=/branches/aicom-network-fixes/; revision=36309
Cameron Gutman [Fri, 19 Sep 2008 00:40:13 +0000 (00:40 +0000)]
- Only continue sending fragments if the last one succeeded
svn path=/branches/aicom-network-fixes/; revision=36308
Cameron Gutman [Mon, 15 Sep 2008 12:54:53 +0000 (12:54 +0000)]
- Add the spin locks back that I removed
svn path=/branches/aicom-network-fixes/; revision=36256
Cameron Gutman [Mon, 15 Sep 2008 12:44:16 +0000 (12:44 +0000)]
- Queue a work item for all packets
- Now I can add the spin locks back that I removed
svn path=/branches/aicom-network-fixes/; revision=36255
Cameron Gutman [Sun, 14 Sep 2008 21:17:44 +0000 (21:17 +0000)]
- Use NDIS_GET_PACKET_STATUS to get the real status for the packet
- Set MiniportBusy to FALSE if Send/SendPacket didn't return NDIS_STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=36250
Cameron Gutman [Sun, 14 Sep 2008 20:47:22 +0000 (20:47 +0000)]
- Pass the status we were given to the completion routine
svn path=/branches/aicom-network-fixes/; revision=36249
Cameron Gutman [Sun, 14 Sep 2008 20:01:36 +0000 (20:01 +0000)]
- Merge r35555, r35575, r35576, and r36243 into my branch
svn path=/branches/aicom-network-fixes/; revision=36248
Cameron Gutman [Sun, 14 Sep 2008 06:05:47 +0000 (06:05 +0000)]
- Release the spin lock before calling NCETimeout
- Should fix the crash Wax had when using the kvmnet driver
svn path=/branches/aicom-network-fixes/; revision=36215
Cameron Gutman [Sun, 14 Sep 2008 05:30:06 +0000 (05:30 +0000)]
- Call a serialized miniport's Send/SendPackets handler at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36212
Cameron Gutman [Sun, 14 Sep 2008 05:16:32 +0000 (05:16 +0000)]
- Change our method of queuing work items so we don't leak anymore
svn path=/branches/aicom-network-fixes/; revision=36211
Cameron Gutman [Sun, 14 Sep 2008 04:02:04 +0000 (04:02 +0000)]
- Queue a work item to do our work that was previously done in MiniportDpc so SendHandler gets called at the correct IRQL
svn path=/branches/aicom-network-fixes/; revision=36206
Cameron Gutman [Sat, 13 Sep 2008 19:00:32 +0000 (19:00 +0000)]
- Call KeAcquireSpinLockAtDpcLevel instead of KeAcquireSpinLock when possible
- Don't hold the spin lock as long in MiniportDpc
svn path=/branches/aicom-network-fixes/; revision=36198
Cameron Gutman [Sat, 13 Sep 2008 18:33:16 +0000 (18:33 +0000)]
- Read the maximum packets that the driver allows to be sent at one time
- We don't use it yet
svn path=/branches/aicom-network-fixes/; revision=36195
Cameron Gutman [Sat, 13 Sep 2008 17:07:30 +0000 (17:07 +0000)]
- unimplemented -> implemented
svn path=/branches/aicom-network-fixes/; revision=36193
Cameron Gutman [Sat, 13 Sep 2008 16:40:45 +0000 (16:40 +0000)]
- Implement NdisDprFreePacket
- Implement NdisDprFreePacketNonInterlocked
svn path=/branches/aicom-network-fixes/; revision=36192
Cameron Gutman [Sat, 13 Sep 2008 16:36:43 +0000 (16:36 +0000)]
- Implement NdisDprAllocatePacketNonInterlocked
svn path=/branches/aicom-network-fixes/; revision=36191
Cameron Gutman [Sat, 13 Sep 2008 16:33:23 +0000 (16:33 +0000)]
- Implement NdisDprAllocatePacket
svn path=/branches/aicom-network-fixes/; revision=36190
Cameron Gutman [Sat, 13 Sep 2008 12:45:26 +0000 (12:45 +0000)]
- Hints from MSDN show that we should use MmGetSystemAddressForMdl instead of MmGetMdlVirtualAddress
svn path=/branches/aicom-network-fixes/; revision=36186
Cameron Gutman [Sat, 13 Sep 2008 12:22:45 +0000 (12:22 +0000)]
- Fix a possible crash
svn path=/branches/aicom-network-fixes/; revision=36185
Cameron Gutman [Fri, 12 Sep 2008 17:59:45 +0000 (17:59 +0000)]
- Call MiniportTransferData at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36169
Cameron Gutman [Fri, 12 Sep 2008 03:53:09 +0000 (03:53 +0000)]
- Revert r36141 and r36102
- They cause a strange mIRC crash
svn path=/branches/aicom-network-fixes/; revision=36151
Cameron Gutman [Fri, 12 Sep 2008 03:06:31 +0000 (03:06 +0000)]
- We must call MiniDequeueWorkItem while holding a spin lock
svn path=/branches/aicom-network-fixes/; revision=36150
Cameron Gutman [Fri, 12 Sep 2008 02:58:08 +0000 (02:58 +0000)]
- Call ProtocolRequestComplete at the correct IRQL
- Call ProtocolSendComplete at the correct IRQL
svn path=/branches/aicom-network-fixes/; revision=36149
Cameron Gutman [Fri, 12 Sep 2008 02:43:05 +0000 (02:43 +0000)]
- Set Status to STATUS_SUCCESS
svn path=/branches/aicom-network-fixes/; revision=36148
Cameron Gutman [Thu, 11 Sep 2008 20:57:51 +0000 (20:57 +0000)]
- Call MiniportQueryInformation at the correct IRQL
- Call MiniportSetInformation at the correct IRQL
- Call QueryInformationComplete at the correct IRQL
- Call SetInformationComplete at the correct IRQL
- All IRQLs verified by MSDN
svn path=/branches/aicom-network-fixes/; revision=36147
Cameron Gutman [Thu, 11 Sep 2008 19:43:19 +0000 (19:43 +0000)]
- Make sure we successfully allocated memory
svn path=/branches/aicom-network-fixes/; revision=36144
Cameron Gutman [Thu, 11 Sep 2008 19:15:35 +0000 (19:15 +0000)]
- Fix 2 typos
svn path=/branches/aicom-network-fixes/; revision=36143
Cameron Gutman [Thu, 11 Sep 2008 18:17:11 +0000 (18:17 +0000)]
- Nicer solution for the problem fixed in r36102
svn path=/branches/aicom-network-fixes/; revision=36141
Cameron Gutman [Thu, 11 Sep 2008 09:37:54 +0000 (09:37 +0000)]
- We must call MiniQueueWorkItem while holding a spin lock
svn path=/branches/aicom-network-fixes/; revision=36134
Cameron Gutman [Wed, 10 Sep 2008 09:34:28 +0000 (09:34 +0000)]
- Fix 3 handle leaks
- Fix 2 memory leaks
svn path=/branches/aicom-network-fixes/; revision=36115
Cameron Gutman [Wed, 10 Sep 2008 07:43:05 +0000 (07:43 +0000)]
- Return the correct status
svn path=/branches/aicom-network-fixes/; revision=36107
Cameron Gutman [Wed, 10 Sep 2008 04:59:12 +0000 (04:59 +0000)]
- Don't call IoCompleteRequest while holding a spin lock because it can cause deadlocks
svn path=/branches/aicom-network-fixes/; revision=36102
Cameron Gutman [Wed, 10 Sep 2008 03:54:46 +0000 (03:54 +0000)]
- Remove the spin locks around NdisSend because it causes a crash in kvmnet
svn path=/branches/aicom-network-fixes/; revision=36101
Cameron Gutman [Wed, 10 Sep 2008 02:52:22 +0000 (02:52 +0000)]
- Set ContextSize when we allocate it
- Remove the context size check so we always create a new one now
- Now we succeed regardless of the current context size
svn path=/branches/aicom-network-fixes/; revision=36100
Cameron Gutman [Tue, 9 Sep 2008 19:47:12 +0000 (19:47 +0000)]
- Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=36094
Cameron Gutman [Tue, 9 Sep 2008 00:58:44 +0000 (00:58 +0000)]
- Release the spin lock before returning
svn path=/branches/aicom-network-fixes/; revision=36075
Cameron Gutman [Tue, 9 Sep 2008 00:17:02 +0000 (00:17 +0000)]
- Remove the adapter from the global adapter list if we fail
svn path=/branches/aicom-network-fixes/; revision=36074
Cameron Gutman [Mon, 8 Sep 2008 23:42:14 +0000 (23:42 +0000)]
- Make sure we set a failure status when we fail so we don't complete with NDIS_STATUS_SUCCESS when we really failed
svn path=/branches/aicom-network-fixes/; revision=36071
Cameron Gutman [Mon, 8 Sep 2008 23:27:52 +0000 (23:27 +0000)]
- Return the actual status not NDIS_STATUS_SUCCESS always
svn path=/branches/aicom-network-fixes/; revision=36070
Cameron Gutman [Sun, 7 Sep 2008 19:38:21 +0000 (19:38 +0000)]
- Make sure we successfully allocated memory
svn path=/branches/aicom-network-fixes/; revision=36042
Cameron Gutman [Sat, 6 Sep 2008 21:45:23 +0000 (21:45 +0000)]
- Return NDIS_STATUS_RESOURCES not NDIS_STATUS_NOT_ACCEPTED when we fail to allocate memory
svn path=/branches/aicom-network-fixes/; revision=36009
Cameron Gutman [Sat, 6 Sep 2008 21:42:58 +0000 (21:42 +0000)]
- Forgot this file from r36006
svn path=/branches/aicom-network-fixes/; revision=36008
Cameron Gutman [Sat, 6 Sep 2008 21:36:55 +0000 (21:36 +0000)]
- Check status from RawIPStartup, UDPStartup, and TCPStartup
svn path=/branches/aicom-network-fixes/; revision=36007
Cameron Gutman [Sat, 6 Sep 2008 21:30:09 +0000 (21:30 +0000)]
- Make PortsStartup return NTSTATUS so we can make sure memory allocated succeeded
- Change the callers to check the return status
svn path=/branches/aicom-network-fixes/; revision=36006
Cameron Gutman [Sat, 6 Sep 2008 20:52:54 +0000 (20:52 +0000)]
- Fix a code typo
svn path=/branches/aicom-network-fixes/; revision=36004
Cameron Gutman [Sat, 6 Sep 2008 20:42:10 +0000 (20:42 +0000)]
- Use NewBuf instead of Data so we actually use the buffer we allocate
svn path=/branches/aicom-network-fixes/; revision=36003
Cameron Gutman [Sat, 6 Sep 2008 20:37:06 +0000 (20:37 +0000)]
- Return NDIS_STATUS_RESOURCES not STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=36002
Cameron Gutman [Sat, 6 Sep 2008 20:27:56 +0000 (20:27 +0000)]
- Return TDI_NO_RESOURCES instead of TDI_INVALID_REQUEST when we can't allocate memory
svn path=/branches/aicom-network-fixes/; revision=36001
Cameron Gutman [Sat, 6 Sep 2008 20:18:42 +0000 (20:18 +0000)]
- Code cleanup
svn path=/branches/aicom-network-fixes/; revision=36000