diff options
| author | abuthahirm <abuthahirm@ami.com> | 2026-08-05 14:41:44 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-10-20 11:35:47 +0300 |
| commit | 4208d71daba23f014b78b73d1b88c53682f6d247 (patch) | |
| tree | 7cd46af8969855d4826e351ad2a75d8f1da4c1d4 /MdeModulePkg/Library/DisplayUpdateProgressLibGraphics | |
| parent | 8ac2c6c8170e369c377f61fb14ae891772403fcf (diff) | |
| download | edk2-4208d71daba23f014b78b73d1b88c53682f6d247.tar.xz | |
NetworkPkg/DxeNetLib: Set *MediaState to EFI_NO_MEDIA if no SNP handle
In NetLibDetectMediaWaitTimeout(), *MediaState is pre-initialized to
EFI_SUCCESS before the SNP handle lookup. When no SNP handle is found,
the function returns EFI_INVALID_PARAMETER but leaves *MediaState as
EFI_SUCCESS. Callers such as PxeCheckMediaState() that rely solely on
*MediaState (ignoring the return value) incorrectly treat a system with
no network device as having media connected.
Fix this by setting *MediaState = EFI_NO_MEDIA inside the
(SnpHandle == NULL) branch before returning EFI_INVALID_PARAMETER.
Update the @retval comment to document this behavior.
Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
Signed-off-by: Abuthahir M <abuthahirm@ami.com>
Diffstat (limited to 'MdeModulePkg/Library/DisplayUpdateProgressLibGraphics')
0 files changed, 0 insertions, 0 deletions
