https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bbe6b0761296eaa518984…
commit bbe6b0761296eaa518984332b19dda70e8d2d3ed
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Sun Dec 17 15:00:25 2023 +0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Dec 17 12:00:25 2023 +0300
[DC21X4] Fix minor issues (#6161)
- The return value got lost when refactoring the setup function
- The check against 0xFFFFFFFF was meant to reject an empty EEPROM image
- Add missing PAGED_CODE(); macros
CORE-8724
---
drivers/network/dd/dc21x4/eeprom.c | 6 +++++-
drivers/network/dd/dc21x4/power.c | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/network/dd/dc21x4/eeprom.c b/drivers/network/dd/dc21x4/eeprom.c
index 6937a5723df..fed1cb160f3 100644
--- a/drivers/network/dd/dc21x4/eeprom.c
+++ b/drivers/network/dd/dc21x4/eeprom.c
@@ -859,6 +859,8 @@ AddressRomChecksumValid(
ULONG64 TestPatterm;
ULONG Checksum, i;
+ PAGED_CODE();
+
NdisMoveMemory(&TestPatterm, &Octet[24], 8);
if (TestPatterm != EAR_TEST_PATTERN)
return FALSE;
@@ -886,6 +888,8 @@ SRomReadMacAddress(
{
ULONG MacOffset;
+ PAGED_CODE();
+
/* Check if we have a board with an old EAR format */
if (NdisEqualMemory(SRom, &SRom[16], 8))
{
@@ -912,7 +916,7 @@ SRomReadMacAddress(
}
/* Sanity check */
- if (*(PULONG)SRom == 0xFFFFFFF || *(PULONG)SRom == 0)
+ if (*(PULONG)SRom == 0xFFFFFFFF || *(PULONG)SRom == 0)
return FALSE;
WARN("Legacy/unknown board found\n");
diff --git a/drivers/network/dd/dc21x4/power.c b/drivers/network/dd/dc21x4/power.c
index 38ea470724a..30d994a9615 100644
--- a/drivers/network/dd/dc21x4/power.c
+++ b/drivers/network/dd/dc21x4/power.c
@@ -146,7 +146,7 @@ DcPowerUp(
/* Re-initialize the chip to leave D3 state */
if (Adapter->PrevPowerState == NdisDeviceStateD3)
{
- NT_VERIFY(DcSetupAdapter(Adapter) == TRUE);
+ NT_VERIFY(DcSetupAdapter(Adapter) == NDIS_STATUS_SUCCESS);
}
else
{