I am trying to figure out a fool proof way of identifying a specific device on our hardware.
We have 2 wireless Mini PCI Express cards that are the same Vendor, Dev, Subsystem.
I need to save some registry settings for an NDIS IM driver. One of the wireless cards is attached to an external antenna connector and I need to prevent that card from transmitting if the external antenna is switched in. Or more like, I need to switch out the external antenna if the wireless card is in normal transmit mode. For the other wireless card I need to flash an onboard LED for link and traffic.
Bus Number
I have tried using the “Bus” number assigned by Windows, but if the customer disables either card in the BIOS, windows renumbers the Bus’s so I can’t tell which card was disabled.
GUID
I can’t use the GUID because if the customer or windows update installs new drivers, we get a new GUID.
If I look through Device Manager - View by connection, I can see that Windows know all 5 PCIe buses on the system, and puts the 2 wireless cards under their respective PCIe bus # correctly, even if one or the other is disabled.
But how as an IM driver, can I run back up the chain from a device to the PCIe bus it’s attached to, and then get the real bus# of that parent device?
Or is there a much better way of doing all of this?