Hi:
I am developing a Miniport driver for a NIC.
The NIC has 1 - 4 channels depending on HW model. My goal is to create 1 - 4 network interfaces. Each interface has its own MAC and IP address.
I believe I should make a miniport-intermediate-driver:
The single drive will handle HW interface(PCIe memory I/O) and expose logical adapters.
Now, I call NdisMRegisterMiniportDriver() in DriverEntry(). InitializeHandlerEx() gets called and I call NdisMSetMiniportAttributes(). Then 1 network interface is created.
I have many questions. But I would ask the first 2:
- I don't want to expose the interface for the physical device. I just want to expose the logical interfaces when I detect the channels on my HW.
How do I prevent the physical device interface being exposed? - How to get the HW interface?
My driver used to be a generic PCIe device driver. I called WdfDriverCreate() in DriverEntry() and gets the PCIe I/O address in EvtDevicePrepareHardware(). From there, I can access to the HW.
However, EvtDevicePrepareHardware() was not called if I call NdisMRegisterMiniportDriver().
Many thanks for the answers. And feel free the correct any of my saying if they were wrong.
Kevin