Forum Replies Created
April 25, 2012 at 6:58 am in reply to: NdisMIndicateStatus issue on Windows 8 Customer Preview #7072WinsorParticipant
After looking more closely to the query requests that arrive to the my NDIS miniport driver, when the adapter state was changed, I manage to saw what the problem is.
When trying to change the virtual adapter state, the service sends an IOCTL the driver to change the state of the virtual network adapter into ‘connected’. The miniport driver receives the request and then notifies the upper layer NDIS driver that the state has change and it needs to check it out. In order to obtain the new state of the virtual adapter, NDIS sends a query request, OID_GEN_MEDIA_CONNECT_STATUS, to my NDIS miniport driver. The problem was that my miniport driver notified the upper layer NDIS driver about the state change before actually changing the adapter’s state ( see the above code from SetMediaStatus() ). This was the problem. On Windows 7, the query request from NDIS came much later, when the new adapter state was already set. On Windows 8, the adapter’s state query request came much faster, just after the change state notification, i.e. NdisMIndicateStatus() call, but before the new state could actually be set.
The solution to the Windows 8 issue was to change the state of the Adapter driver first, and then notify the upper layer drivers about this.