net/net: Fix incorrect condition for calling grub_net_tcp_retransmit()

The commit 848724273e (net/net: Avoid unnecessary calls to
grub_net_tcp_retransmit()) needs to have its condition inverted to avoid
unnecessary calls to grub_net_tcp_retransmit(). As it is, it creates many
unnecessary calls and does not call grub_net_tcp_retransmit() when needed.
The call to grub_net_tcp_retransmit() should only be made when
grub_net_cards does _not_ equal NULL, meaning that there are potentially
network cards that need TCP retransmission.

Fixes: 848724273e (net/net: Avoid unnecessary calls to grub_net_tcp_retransmit())

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Glenn Washburn authored and Daniel Kiper committed 2022-05-24 14:37:24 +02:00
1 parent 3efd7912d9
commit ad019a107a
1 file changed
+1 -1
+1 -1
View File
@@ -1634,7 +1634,7 @@ grub_net_poll_cards_idle_real (void)
|| ctime >= card->last_poll + card->idle_poll_delay_ms) || ctime >= card->last_poll + card->idle_poll_delay_ms)
receive_packets (card, 0); receive_packets (card, 0);
} }
if (grub_net_cards == NULL) if (grub_net_cards != NULL)
grub_net_tcp_retransmit (); grub_net_tcp_retransmit ();
} }