I am writing a WDI driver following the guide here and my WDI initialisation is failing after completing the OID_WDI_SET_ADAPTER_CONFIGURATION response. I have also been comparing with the WDI sample and it seems they dont do much for this OID besides return a status success. I have also attempted the fix here: but still no success. I dont wanna just paste my code here so im just looking for some general areas to look into as to why its failing and if i need to paste some code id be happy to. Logs are below:
wdi_usb => NDIS Version: 60054
wdi_usb => NdisSetOptions
wdi_usb => WDI Miniport Successfully Initialised.
wdi_usb => NdisAllocateAdapter
wdi_usb => Number of USB pipes: 3
wdi_usb => Found USB BULK IN Pipe
wdi_usb => Found USB BULK OUT Pipe
wdi_usb => Found USB BULK OUT Pipe
wdi_usb => Successfully initialised adapter.
wdi_usb => NdisOpenAdapter
wdi_usb => NdisTalTxRxInitialize
wdi_usb => [OID_REQUEST] OID: 0xe4400025, Type: 0xc
wdi_usb => Handling OID_WDI_GET_ADAPTER_CAPABILITIES
wdi_usb => [OID_REQUEST] OID: 0xe4400055, Type: 0xc
wdi_usb => Handling OID_WDI_SET_ADAPTER_CONFIGURATION
wdi_usb => NdisTalTxRxDeinitialize
wdi_usb => NdisCloseAdapter
wdi_usb => NdisFreeAdapter
wdi_usb => NdisUnload
So after spending some time debugging, I have found roughly where the error is caused by I am unable to pinpoint the exact position. Below is an extract from the WDI WPP traces:
It seems like the last configuration read is the NetworkAddress, but I have a valid NetworkAddress set and replicated the calls and was able to succesfully attain it via NdisReadConfiguration. I have been playing around the the .inf file but still no success. I have also stepped through this NdisReadNetworkAddress and compared with the dissassembly it appears something is failing which is strange and it returns 1 as the status code in the NDIS_STATUS pointer passed to it. I also set the same mac address in the InterfaceAttributes.InterfaceCapabilities when handling the OID_WDI_GET_ADAPTER_CAPABILITIES Oid.
However after again checking the source code and dissassembly it appears its set as a generic handler to "guess" the most likely cause of the error, so while it may indeed be a problem with the mac address, it also may not.