Migrate Miniport Driver Functionality to NDIS 6.0 (Compact 7)
3/12/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.
- Update your build environment to use the preprocessor definition NDIS60_MINIPORT_DRIVER.
- Modify driver initialization functionality to use the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure for registering the miniport driver with NDIS.
- Provide an entry point for unloading your miniport driver.
- Modify miniport adapter initialization functionality to set miniport adapter attributes through the NDIS_MINIPORT_INIT_PARAMETERS structure.
- Add new parameters to your miniport driver's adapter halt and shutdown functions.
- Implement new functionality to support adapter pause and restart.
- Rewrite send and receive code paths to use NET_BUFFER and NET_BUFFER_LIST structures instead of the NDIS_PACKET structure.
- For bus-master miniport drivers, update direct memory access (DMA) functionality to use the new scatter/gather DMA features of NDIS 6.0.
- Register interrupt entry points in the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure.
- Implement new functionality to handle object identifier (OID) requests.
- Use the NDIS_STATUS_INDICATION structure to indicate miniport driver status.
- Update entry points for handling Plug and Play events.
- 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 Bring Up a Hardware Platform.