EmbeddedPkg/Lan9118Dxe: Rework filter init, enabling and disabling

Correct the setting of the hardware filters according to what it asked
to the driver through the ReceiveFilters() interface function.

Keep track of the hardware settings in the "ReceiveFilterSetting" field of
 the EFI_SIMPLE_NETWORK_MODE structure.

From now, after initialization, all filters are disabled and thus no packet
received.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16243 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ronald Cron
2014-10-27 10:42:13 +00:00
committed by oliviermartin
parent e52aee5d31
commit 11bbc25789
2 changed files with 77 additions and 56 deletions

View File

@@ -320,8 +320,6 @@ Lan9118SetMacAddress (
(UINT32)(Mac->Addr[4] & 0xFF) |
((Mac->Addr[5] & 0xFF) << 8)
);
CopyMem (&Snp->Mode->CurrentAddress, &Mac, NET_ETHER_ADDR_LEN);
}
VOID
@@ -398,6 +396,7 @@ Lan9118Initialize (
DEBUG ((EFI_D_WARN, "Warning: using driver-default MAC address\n"));
DefaultMacAddress = FixedPcdGet64 (PcdLan9118DefaultMacAddress);
Lan9118SetMacAddress((EFI_MAC_ADDRESS *) &DefaultMacAddress, Snp);
CopyMem (&Snp->Mode->CurrentAddress, &DefaultMacAddress, NET_ETHER_ADDR_LEN);
}
} else {
// Store the MAC address that was loaded from EEPROM