Commit d9a2f416d6ac6058cd7845033ae4dc32ef1c0746

Authored by Aras Vaichas
Committed by Ben Warren
1 parent 74d1e66d22

DHCP request fix for Windows Server 2003

Added option CONFIG_BOOTP_DHCP_REQUEST_DELAY. This provides an optional
delay before sending "DHCP Request" in net/bootp.c. Required to overcome
interoperability problems with Windows Server 200x DHCP server when U-Boot
client responds too fast for server to handle.

Signed-off-by: Aras Vaichas <arasv@magtech.com.au>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

Showing 2 changed files with 18 additions and 1 deletions Side-by-side Diff

... ... @@ -1151,6 +1151,20 @@
1151 1151 of the "hostname" environment variable is passed as
1152 1152 option 12 to the DHCP server.
1153 1153  
  1154 + CONFIG_BOOTP_DHCP_REQUEST_DELAY
  1155 +
  1156 + A 32bit value in microseconds for a delay between
  1157 + receiving a "DHCP Offer" and sending the "DHCP Request".
  1158 + This fixes a problem with certain DHCP servers that don't
  1159 + respond 100% of the time to a "DHCP request". E.g. On an
  1160 + AT91RM9200 processor running at 180MHz, this delay needed
  1161 + to be *at least* 15,000 usec before a Windows Server 2003
  1162 + DHCP server would reply 100% of the time. I recommend at
  1163 + least 50,000 usec to be safe. The alternative is to hope
  1164 + that one of the retries will be successful but note that
  1165 + the DHCP timeout and retry process takes a longer than
  1166 + this delay.
  1167 +
1154 1168 - CDP Options:
1155 1169 CONFIG_CDP_DEVICE_ID
1156 1170  
... ... @@ -879,7 +879,10 @@
879 879 iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + extlen;
880 880 NetSetIP(iphdr, 0xFFFFFFFFL, PORT_BOOTPS, PORT_BOOTPC, iplen);
881 881  
882   - debug ("Transmitting DHCPREQUEST packet: len = %d\n", pktlen);
  882 + debug ("Transmitting DHCPREQUEST packet: len = %d\n", pktlen);
  883 +#ifdef CONFIG_BOOTP_DHCP_REQUEST_DELAY
  884 + udelay(CONFIG_BOOTP_DHCP_REQUEST_DELAY);
  885 +#endif /* CONFIG_BOOTP_DHCP_REQUEST_DELAY */
883 886 NetSendPacket(NetTxPacket, pktlen);
884 887 }
885 888