Compartilhar via


Migrate Miniport Driver Functionality to NDIS 6.0 (Compact 2013)

3/26/2014

The following list summarizes the steps that you must take to migrate a Windows Embedded Compact NDIS 5.x miniport driver to NDIS 6.0. Because some NDIS 5.x functions are not available in NDIS 6.0, you must convert your NDIS 5.x driver to use equivalent NDIS 6.0 functions. In addition, some data structure members present in NDIS 5.x have been removed in the NDIS 6.0 version of these data structures, while new members have been added. Therefore, you must convert your NDIS driver code to work with these revised data structures.

Steps to port your Windows Embedded Compact NDIS 5.x miniport driver to NDIS 6.0

Each of the following steps to migrate your miniport driver is explained in detail in the topics in this section.

  1. Update your build environment to use the preprocessor definition NDIS60_MINIPORT_DRIVER.
  2. Modify driver initialization functionality to use the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure for registering the miniport driver with NDIS.
  3. Provide an entry point for unloading your miniport driver.
  4. Modify miniport adapter initialization functionality to set miniport adapter attributes through the NDIS_MINIPORT_INIT_PARAMETERS structure.
  5. Add new parameters to your miniport driver's adapter halt and shutdown functions.
  6. Implement new functionality to support adapter pause and restart.
  7. Rewrite send and receive code paths to use NET_BUFFER and NET_BUFFER_LIST structures instead of the NDIS_PACKET structure.
  8. For bus-master miniport drivers, update direct memory access (DMA) functionality to use the new scatter/gather DMA features of NDIS 6.0.
  9. Register interrupt entry points in the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure.
  10. Implement new functionality to handle object identifier (OID) requests.
  11. Use the NDIS_STATUS_INDICATION structure to indicate miniport driver status.
  12. Update entry points for handling Plug and Play events.
  13. Update entry points for handling hang and reset conditions.

You can also use this process to port Windows desktop-based NDIS 5.x miniport drivers to Windows Embedded Compact; however, you must also rewrite any driver functionality that uses OS features that are not present in Windows Embedded Compact. For example:

  • Windows Embedded Compact does not use I/O Request Packets (IRPs) to communicate with device drivers.
  • Windows Embedded Compact uses interrupt and synchronization macros (NDIS_CURRENT_IRQL, NDIS_LOWER_IRQL, and NDIS_RAISE_IRQL_TO_DISPATCH) instead of the functions KeGetCurrentIRQL, KeLowerIRQL, and KeRaiseIRQL.
  • Because Windows Embedded Compact runs on many different hardware configurations with different interrupt architectures, the interrupt handling design that your NDIS 5.x miniport driver uses on an x86-based desktop Windows platforms may not work on your target Windows Embedded Compact platform.

For more information about Windows Embedded Compact and how it interfaces with hardware, see BSP Components and Code Organization.

In This Section

See Also

Concepts

Port Miniport Drivers from NDIS 5.x to 6.0