static void OnResetWorkItem(NDIS_WORK_ITEM * pWorkItem, PVOID  Context)
{
	tGeneralWorkItem *pwi = (tGeneralWorkItem *)pWorkItem;
	PARANDIS_ADAPTER *pContext = pwi->pContext;
	DEBUG_ENTRY(0);

	ParaNdis_IndicateConnect(pContext, FALSE, FALSE);
	ParaNdis_Suspend(pContext);
	ParaNdis_Resume(pContext);
	ParaNdis_ReportLinkStatus(pContext);

	NdisFreeMemory(pwi, 0, 0);
	ParaNdis_DebugHistory(pContext, hopSysReset, NULL, 0, NDIS_STATUS_SUCCESS, 0);
	NdisMResetComplete(pContext->MiniportHandle, NDIS_STATUS_SUCCESS, TRUE);
}
static void OnResetWorkItem(PVOID  WorkItemContext, NDIS_HANDLE  NdisIoWorkItemHandle)
{
    if (WorkItemContext)
    {
        tGeneralWorkItem *pwi = (tGeneralWorkItem *)WorkItemContext;
        PARANDIS_ADAPTER *pContext = pwi->pContext;
        BOOLEAN bSendActive, bReceiveActive;
        DEBUG_ENTRY(0);
        bSendActive = pContext->SendState == srsEnabled;
        bReceiveActive = pContext->ReceiveState == srsEnabled;
        pContext->bResetInProgress = TRUE;
        ParaNdis_Suspend(pContext);
        ParaNdis_PowerOff(pContext);
        ParaNdis_PowerOn(pContext);
        if (bSendActive) ParaNdis6_SendPauseRestart(pContext, FALSE, NULL);
        if (bReceiveActive) ParaNdis6_ReceivePauseRestart(pContext, FALSE, NULL);
        pContext->bResetInProgress = FALSE;

        NdisFreeMemory(pwi, 0, 0);
        NdisFreeIoWorkItem(NdisIoWorkItemHandle);
        ParaNdis_DebugHistory(pContext, hopSysReset, NULL, 0, NDIS_STATUS_SUCCESS, 0);
        NdisMResetComplete(pContext->MiniportHandle, NDIS_STATUS_SUCCESS, TRUE);
    }
}