Hi all,
I am working on NDIS Miniport Driver which communicates with TSE over PCIe interface. I have some confusion over sending Ethernet cable Link connection status to NDIS.
I am using ISR which sends link status notification to NDIS while dynamic connect/disconnect, But what should I do if link is already up before loading the driver. I can have link status while performing “InitializeHandlerEx” handler, but updating link status in this handler will start “SendNetBufferListsHandler” before even finishing “InitializeHandlerEx” handler. I searched for any OID requests which asks for the link status like “OID_GEN_MEDIA_CONNECT_STATUS” and “OID_GEN_LINK_STATE”, but I found that, those OIDs are not requested for NDIS 6.0 and later versions. So, overall I am looking for the mechanism which invokes read/write requests after successful completion of “InitializeHandlerEx” while Link is always UP.
Please enlighten me on this, if I am doing anything wrong. Any idea will be appreciated. Thank you.
Regards,
Parth Shah
This is not a unique issue for your NDIS miniport. Did you look at the samples in older WDKs? In particular I suggest you get the SRV2008 WDK (6001.18002) and look at the src/network/ndis/e100bx sample.
That sample initially sends media status from the MiniportCheckForHangEx() handler.
https://msdn.microsoft.com/en-us/library/windows/hardware/ff559346(v=vs.85).aspx
Another possible solution might be to schedule a timer in MiniportInitializeEx() and indicate the media state on timer expiration but that introduces some other headaches in managing the timer.
And lastly you might just set a flag and wait for *any* request from NDIS and on seeing the flag set, indicate status.
But I would go with how the e100bx sample does it. Everyone else did.
Keep those old WDKs handy.
Good Luck,
Dave Cattley
Sent from Mail for Windows 10
Thank you Dave for your quick reply.
Regarding your suggestions, I would love to go with first option about using MiniportCheckForHangEx() handler for sending media status to NDIS. I am still looking for that sample driver as I am unable to find that DDK. But right now, this idea is enough for me.
I will get back, if I find something scratchy. Thanks again.
Regards,
Parth Shah