Commit 139032fc authored by Mike Hibler's avatar Mike Hibler
Browse files

Support larger default blocksize and longer initial connection timeout.

parent 4fc60b67
......@@ -30,6 +30,15 @@
GRUB_MOD_LICENSE ("GPLv3+");
/*#define TFTP_MAXSIZE_PACKET "1024"*/
#define TFTP_MAXSIZE_PACKET "1468"
/*
* XXX allow longer for initial connection since it might require spawning
* a server instance.
*/
#define TFTP_INITIAL_TIMO 2000
/* IP port for the MTFTP server used for Intel's PXE */
enum
{
......@@ -349,9 +358,9 @@ tftp_open (struct grub_file *file, const char *filename)
rrqlen += grub_strlen ("blksize") + 1;
rrq += grub_strlen ("blksize") + 1;
grub_strcpy (rrq, "1024");
rrqlen += grub_strlen ("1024") + 1;
rrq += grub_strlen ("1024") + 1;
grub_strcpy (rrq, TFTP_MAXSIZE_PACKET);
rrqlen += grub_strlen (TFTP_MAXSIZE_PACKET) + 1;
rrq += grub_strlen (TFTP_MAXSIZE_PACKET) + 1;
grub_strcpy (rrq, "tsize");
rrqlen += grub_strlen ("tsize") + 1;
......@@ -410,7 +419,7 @@ tftp_open (struct grub_file *file, const char *filename)
grub_free (data);
return err;
}
grub_net_poll_cards (GRUB_NET_INTERVAL + (i * GRUB_NET_INTERVAL_ADDITION),
grub_net_poll_cards (TFTP_INITIAL_TIMO + (i * GRUB_NET_INTERVAL_ADDITION),
&data->have_oack);
if (data->have_oack)
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment