Reporting Hardware Status (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

A connectionless miniport driver indicates changes in hardware status to upper layers by calling NdisMIndicateStatus. A connection-oriented miniport driver indicates changes by calling NdisMCoIndicateStatus.

NdisM(Co)IndicateStatus takes both a general status code and a buffer containing media-specific information that further defines the reason for the status change. NDIS reports this status change to bound protocol drivers. NDIS does not interpret or otherwise intercept the status code. The miniport driver can make one or more such calls; however, when a connectionless miniport driver has finished sending status, it must call NdisMIndicateStatusCompleteto let interested protocol drivers know that it is done reporting status. A connection-oriented miniport driver does not have to indicate that it has finished sending status. The protocol driver or configuration manager can log the status or take corrective action, as appropriate.

NdisMCoIndicateStatustakes any valid NDIS_STATUS_XXX value. The miniport driver is responsible for indicating status codes that make sense to a protocol or higher level driver. A protocol driver ignores any status values in which it is not interested or that don't make sense in the context of its operations.

For instance, a miniport driver can report NDIS_STATUS_RING_STATUS to report a ring failure. The StatusBufferargument to NdisMCoIndicateStatusfurther details the ring status. The contents of StatusBufferencodes 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 driver cannot indicate status in the context of its MiniportInitialize, MiniportISR, MiniportHalt, or MiniportShutdownfunction.

A miniport driver can also be interrogated by an upper layer driver or by NDIS about the miniport driver's hardware status. When the MiniportQueryInformationfunction of a connectionless miniport driver or the MiniportCoRequestfunction of a connection-oriented miniport driver receives OID_GEN_HARDWARE_STATUS, it responds with any of the applicable statuses defined in NDIS_HARDWARE_STATUS. These include:

  • NdisHardwareStatusReady

  • NdisHardwareStatusInitializing

  • NdisHardwareStatusReset

  • NdisHardwareStatusClosing

  • NdisHardwareStatusNotReady

The miniport 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.

 

 

Send comments about this topic to Microsoft