]> git.sur5r.net Git - u-boot/blobdiff - lib/efi_loader/efi_net.c
efi_loader: fix efi_net_get_status
[u-boot] / lib / efi_loader / efi_net.c
index cd46d2db534871ab1d20802f18c990e0a9b26903..b16463ba1a1dfec7ed8dd78a2bf1bec48245617e 100644 (file)
@@ -133,9 +133,14 @@ static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this,
 {
        EFI_ENTRY("%p, %p, %p", this, int_status, txbuf);
 
-       /* We send packets synchronously, so nothing is outstanding */
-       if (int_status)
-               *int_status = 0;
+       efi_timer_check();
+
+       if (int_status) {
+               /* We send packets synchronously, so nothing is outstanding */
+               *int_status = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
+               if (new_rx_packet)
+                       *int_status |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
+       }
        if (txbuf)
                *txbuf = new_tx_packet;