summaryrefslogtreecommitdiff
path: root/EmbeddedPkg
diff options
context:
space:
mode:
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
index 191760ccf7..507e55f450 100644
--- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
+++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
@@ -979,29 +979,24 @@ SnpGetStatus (
// Read interrupt status if IrqStat is not NULL
if (IrqStat != NULL) {
+ *IrqStat = 0;
// Check for receive interrupt
if (MmioRead32 (LAN9118_INT_STS) & INSTS_RSFL) { // Data moved from rx FIFO
*IrqStat |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
MmioWrite32 (LAN9118_INT_STS,INSTS_RSFL);
- } else {
- *IrqStat &= ~EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
}
// Check for transmit interrupt
if (MmioRead32 (LAN9118_INT_STS) & INSTS_TSFL) {
*IrqStat |= EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
MmioWrite32 (LAN9118_INT_STS,INSTS_TSFL);
- } else {
- *IrqStat &= ~EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
}
// Check for software interrupt
if (MmioRead32 (LAN9118_INT_STS) & INSTS_SW_INT) {
*IrqStat |= EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT;
MmioWrite32 (LAN9118_INT_STS,INSTS_SW_INT);
- } else {
- *IrqStat &= ~EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT;
}
}