mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
[NDIS]
- NdisReadConfiguration should return NdisParameterInteger for requests for NdisParameterHexInteger - Assert that conversion to integer from string does not fail - Always trigger the ISR function if MiniportInitialize or MiniportHalt is executing CORE-6064 #comment Please try to replicate with DEBUG_ULTRA turned on in NDIS svn path=/trunk/; revision=57289
This commit is contained in:
parent
b0e977ad99
commit
d96bde2a80
3 changed files with 15 additions and 10 deletions
|
@ -658,13 +658,15 @@ NdisReadConfiguration(
|
|||
str.Length = str.MaximumLength = (USHORT)KeyInformation->DataLength;
|
||||
str.Buffer = (PWCHAR)KeyInformation->Data;
|
||||
|
||||
if (Base != 0 && IsValidNumericString(&str, Base) &&
|
||||
((*Status = RtlUnicodeStringToInteger(&str, Base,
|
||||
&(*ParameterValue)->ParameterData.IntegerData)) == STATUS_SUCCESS))
|
||||
if (Base != 0 && IsValidNumericString(&str, Base))
|
||||
{
|
||||
*Status = RtlUnicodeStringToInteger(&str, Base, &(*ParameterValue)->ParameterData.IntegerData);
|
||||
ASSERT(*Status == STATUS_SUCCESS);
|
||||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("NdisParameter(Hex)Integer\n"));
|
||||
|
||||
(*ParameterValue)->ParameterType = ParameterType;
|
||||
/* MSDN documents that this is returned for all integers, regardless of the ParameterType passed in */
|
||||
(*ParameterValue)->ParameterType = NdisParameterInteger;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -697,8 +699,9 @@ NdisReadConfiguration(
|
|||
ExFreePool(KeyInformation);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((*ParameterValue)->ParameterType != ParameterType)
|
||||
|
||||
if (((*ParameterValue)->ParameterType != ParameterType) &&
|
||||
!((ParameterType == NdisParameterHexInteger) && ((*ParameterValue)->ParameterType == NdisParameterInteger)))
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Parameter type mismatch! (Requested: %d | Received: %d)\n",
|
||||
ParameterType, (*ParameterValue)->ParameterType));
|
||||
|
|
|
@ -65,7 +65,8 @@ BOOLEAN NTAPI ServiceRoutine(
|
|||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("Called. Interrupt (0x%X)\n", NdisInterrupt));
|
||||
|
||||
if (NdisInterrupt->IsrRequested) {
|
||||
/* FIXME: This probably isn't the right check for MiniportInitialize, but we need to see what Windows uses here */
|
||||
if ((NdisMiniportBlock->PnPDeviceState != NdisPnPDeviceStarted) || (NdisInterrupt->IsrRequested)) {
|
||||
NDIS_DbgPrint(MAX_TRACE, ("Calling MiniportISR\n"));
|
||||
(*NdisMiniportBlock->DriverHandle->MiniportCharacteristics.ISRHandler)(
|
||||
&InterruptRecognized,
|
||||
|
|
|
@ -2161,6 +2161,10 @@ NdisIPnPStopDevice(
|
|||
|
||||
KeCancelTimer(&Adapter->NdisMiniportBlock.WakeUpDpcTimer.Timer);
|
||||
|
||||
/* Set this here so MiniportISR will be forced to run for interrupts generated in MiniportHalt */
|
||||
Adapter->NdisMiniportBlock.OldPnPDeviceState = Adapter->NdisMiniportBlock.PnPDeviceState;
|
||||
Adapter->NdisMiniportBlock.PnPDeviceState = NdisPnPDeviceStopped;
|
||||
|
||||
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.HaltHandler)(Adapter);
|
||||
|
||||
IoSetDeviceInterfaceState(&Adapter->NdisMiniportBlock.SymbolicLinkName, FALSE);
|
||||
|
@ -2188,9 +2192,6 @@ NdisIPnPStopDevice(
|
|||
Adapter->NdisMiniportBlock.EthDB = NULL;
|
||||
}
|
||||
|
||||
Adapter->NdisMiniportBlock.OldPnPDeviceState = Adapter->NdisMiniportBlock.PnPDeviceState;
|
||||
Adapter->NdisMiniportBlock.PnPDeviceState = NdisPnPDeviceStopped;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue