A miniport NIC driver can indicate changes in hardware status to upper layers by calling NdisMIndicateStatus. NdisMIndicateStatus takes both a general status code and a buffer containing media-specific information that further defines the reason for the status change. NDIS will report this status change to bound protocol drivers. NDIS does not interpret or otherwise intercept the status code. The miniport NIC driver can make one or more such calls, however, when it has finished sending status, it must call NdisMIndicateStatusComplete to let interested protocol drivers know that it is done reporting status. The protocol driver or configuration manager can log the status or take corrective action, as appropriate.
NdisMIndicateStatus takes any valid NDIS_STATUS_XXX value. The miniport NIC driver is responsible for indicating status codes that make sense to a protocol or higher level driver. However, a protocol driver will ignore any status values it is not interested in or that don’t make sense in the context of its operations.
For instance, a miniport NIC driver can report NDIS_STATUS_RING_STATUS to report a ring failure. The StatusBuffer argument to NdisMIndicateStatus further details the ring status. The contents of StatusBuffer encodes a set of possible ring conditions that are the reason for the status report, such as NDIS_RING_SIGNAL_LOSS and NDIS_RING_HARD_ERROR.
A miniport NIC driver can also be interrogated by an upper layer driver or by NDIS about the miniport’s hardware status. When MiniportQueryInformation receives OID_GEN_HARDWARE_STATUS, it responds with any of the applicable statuses defined in NDIS_HARDWARE_STATUS. These include:
The miniport NIC driver can be queried so that NDIS can synchronize operations between layers of NDIS drivers, for instance by determining whether a NIC is ready to accept packets.