NDISEDGE and USB PNP Management

Hi All,

Now, I am working with Network USB Driver too. I am trying to make NDISEDGE sample driver to interface with USB driver. Beside using usbnwifi sample driver as a reference, I am also using usbsamp and osrusbfx2 as the references. I got confused with some code…

In usbsamp and osrusbfx2, it use this lines of code to initialize pnp powercallback structure:


pnpPowerCallbacks.EvtDevicePrepareHardware = UsbSamp_EvtDevicePrepareHardware;

pnpPowerCallbacks.EvtDeviceReleaseHardware = UsbSamp_EvtDeviceReleaseHardware;

WdfDeviceInitSetPnpPowerEventCallbacks(DeviceInit, &pnpPowerCallbacks);

Yet, in usbnwifi sample, I can’t find this pnp Power Callback for the usb device.
Can someone help me how to make plug and play event for usb device with ndisedge 50 sample (I am using Windows XP).


For an NDIS driver with a WDM (or WDF) lower edge you’ll want to use Ndis defined methods to handle power management & pnp. In particular for the case of power management that you asked you do that by implementing power management OIDs in your MiniportOidRequest handler. Search for OID_PNP_xxx (i.e. OID_PNP_QUERY_POWER) in mp_oids.c of the usbnwifi sample. You can also get further info in the “Power Management for NDIS Minport Drivers” section of the WDK docs.