microsoft / microsoft/mu_basecore

[Task] UefiPxeBcDxe: Check return status of `NetLibDetectMediaWaitTimeout()` in

Open
#1,637 2 comments 0 reactions 1 assignee View on GitHub

@makubacki is already working on this.

Since Feb 12, 2026.

state:backlog urgency:low
Dominant language
C
Stars
290
Forks
187
Avg merge
1d 7h
Merged PRs (30d)
37

Description

The point of `NetLibDetectMediaWaitTimeout()` in `DxeNetLib` is to return whether network media is present. It returns a status code that is ignored in 14/15 calls throughout the codebase.

These are the possible return values defined for `NetLibDetectMediaWaitTimeout()`:

https://github.com/microsoft/mu_basecore/blob/b09f1fd5f3bf28ee3ba6d3bb7c25406246564b78/NetworkPkg/Library/DxeNetLib/DxeNetLib.c#L2656-L2687

It would be intuitive to expect that if `NetLibDetectMediaWaitTimeout()` returns a non-`EFI_SUCCESS` code, the output pointer value in the `*MediaState` argument is invalid. That's not done today.

---

This issue tracks exploration of conditionally accepting `*MediaState` in combination with the function return value. That may require other work like #1635 being completed first.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.