mirror of
				https://github.com/acidanthera/audk.git
				synced 2025-11-03 21:17:23 +01:00 
			
		
		
		
	NetworkPkg/UefiPxeBcDxe: Fix Pxe.Dhcp() return status code.
According UEFI Spec, if valid PXE offer is not received, Pxe.Dhcp() should return EFI_NO_RESPONSE, but currently, EFI_TIMEOUT is returned from Pxe.Dhcp(). This patch is to fix the above issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
		
							parent
							
								
									1cf2410047
								
							
						
					
					
						commit
						10e6244236
					
				@ -1242,7 +1242,7 @@ ON_EXIT:
 | 
				
			|||||||
  } else if (Status == EFI_NO_MEDIA) {
 | 
					  } else if (Status == EFI_NO_MEDIA) {
 | 
				
			||||||
    AsciiPrint ("\n  PXE-E12: Could not detect network connection.\n");
 | 
					    AsciiPrint ("\n  PXE-E12: Could not detect network connection.\n");
 | 
				
			||||||
  } else if (Status == EFI_NO_RESPONSE) {
 | 
					  } else if (Status == EFI_NO_RESPONSE) {
 | 
				
			||||||
    AsciiPrint ("\n  PXE-E16: No offer received.\n");
 | 
					    AsciiPrint ("\n  PXE-E16: No valid offer received.\n");
 | 
				
			||||||
  } else if (Status == EFI_TIMEOUT) {
 | 
					  } else if (Status == EFI_TIMEOUT) {
 | 
				
			||||||
    AsciiPrint ("\n  PXE-E18: Server response timeout.\n");
 | 
					    AsciiPrint ("\n  PXE-E18: Server response timeout.\n");
 | 
				
			||||||
  } else if (Status == EFI_ABORTED) {
 | 
					  } else if (Status == EFI_ABORTED) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1707,6 +1707,11 @@ PxeBcDhcp4Dora (
 | 
				
			|||||||
    if (Status == EFI_ICMP_ERROR) {
 | 
					    if (Status == EFI_ICMP_ERROR) {
 | 
				
			||||||
      PxeMode->IcmpErrorReceived = TRUE;
 | 
					      PxeMode->IcmpErrorReceived = TRUE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (Status == EFI_TIMEOUT && Private->OfferNum > 0) {
 | 
				
			||||||
 | 
					      Status = EFI_NO_RESPONSE;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    goto ON_EXIT;
 | 
					    goto ON_EXIT;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user