diff --git a/inc/v4vkapi.h b/inc/v4vkapi.h index ba38527..6d34e81 100644 --- a/inc/v4vkapi.h +++ b/inc/v4vkapi.h @@ -1,3 +1,4 @@ +#ifdef USE_V4V // // v4vkm.h - Xen Windows XenGfx v4v // @@ -582,4 +583,4 @@ XenV4VDestroy(PXEN_V4V pV4v) ExFreePoolWithTag(pV4v, XENV4V_TAG ); } } - +#endif diff --git a/wnet/xenwnet6/receiver.c b/wnet/xenwnet6/receiver.c index 733dd8b..504fb99 100755 --- a/wnet/xenwnet6/receiver.c +++ b/wnet/xenwnet6/receiver.c @@ -161,7 +161,9 @@ ReceiverReleaseNetBufferList ( /* The net buffer will be automatically released when the net buffer list is, but we still need to clean it up. */ mdl = NET_BUFFER_FIRST_MDL(buffer); +#ifdef USE_V4V if ((mdl != Receiver->V4vRxBufMdl) && (mdl->Next != Receiver->V4vRxBufMdl)) +#endif ReceiverCommonReleaseMdlChain(&Receiver->Common, NET_BUFFER_FIRST_MDL(buffer)); @@ -752,11 +754,17 @@ ReceiverReceiveBufferList ( } else { +#ifdef USE_V4V Flags = 0; //@@@ This seems like possibly a bad idea... buffer = Receiver->V4vRxBufMdl; totOctets = Receiver->V4vBytesReceived; totFrags = 1; buffer_length = Receiver->V4vBytesReceived; +#else + XM_BUGCHECK_TYPE_ASSERT; + // Avoid compiler error: + buffer = &headRfd->Mdl; +#endif } ethernetHeader = (struct ethhdr *)buffer->MappedSystemVa; if (!AdapterIsMacAddressInteresting(Receiver->Common.Adapter, @@ -802,6 +810,7 @@ ReceiverReceiveBufferList ( *BufferList = NULL; } +#ifdef USE_V4V VOID ReceiverHandleV4vPacket ( IN PRECEIVER Receiver @@ -867,6 +876,7 @@ ReceiverHandleV4vPacket ( return; } +#endif VOID ReceiverHandleNotification ( diff --git a/wnet/xenwnet6/receiver.h b/wnet/xenwnet6/receiver.h index bba8ca2..3222993 100755 --- a/wnet/xenwnet6/receiver.h +++ b/wnet/xenwnet6/receiver.h @@ -47,8 +47,10 @@ typedef struct _RECEIVER { ULONG nRxTcpUdpCsumOffload; ULONG nRxTcpUdpCsumFixup; +#ifdef USE_V4V ULONG V4vBytesReceived; PMDL V4vRxBufMdl; +#endif /* Do we expect Windows to be able to handle a csum_blank * packet? */ @@ -121,10 +123,12 @@ ReceiverCleanup ( BOOLEAN TearDown ); +#ifdef USE_V4V VOID ReceiverHandleV4vPacket ( IN PRECEIVER Receiver ); +#endif VOID ReceiverHandleNotification ( diff --git a/wnet/xenwnet6/transmitter.c b/wnet/xenwnet6/transmitter.c index 394a997..8a402db 100755 --- a/wnet/xenwnet6/transmitter.c +++ b/wnet/xenwnet6/transmitter.c @@ -1342,6 +1342,8 @@ TransmitterSend ( PXENNET_NET_BUFFER_RESERVED xennetBuffer; ULONG sent; + UNREFERENCED_PARAMETER(dpcLevel); + sent = 0; entry = Transmitter->QueuedList.Flink; @@ -1363,6 +1365,7 @@ TransmitterSend ( (ULONG_PTR)netBuffer, xennetBuffer->State); if (xennetBuffer->State == Prepared) { +#ifdef USE_V4V if (xennetBuffer->EapPacket) { NTSTATUS status; @@ -1407,7 +1410,9 @@ TransmitterSend ( Transmitter->CompletedFrames++; xennetBuffer->State = Completed; } - else if (!TransmitterSendNetBuffer(Transmitter, netBuffer)) { + else +#endif + if (!TransmitterSendNetBuffer(Transmitter, netBuffer)) { nbl_log(netBufferList, NBL_TRANSMITTER_SEND_FAILED, (ULONG_PTR)netBuffer); goto done; diff --git a/wnet/xenwnet6/wlan.c b/wnet/xenwnet6/wlan.c index 0dd6e3b..2a1ffc2 100755 --- a/wnet/xenwnet6/wlan.c +++ b/wnet/xenwnet6/wlan.c @@ -346,6 +346,7 @@ WlanAdapterDefaults ( sizeof(DOT11_STATISTICS)); } +#ifdef USE_V4V NTSTATUS WlanV4vConnect( IN PADAPTER Adapter @@ -606,6 +607,7 @@ WlanV4vWorkItem ( TraceNotice (("V4VDG asynchronous datagram receiver exit\n")); PsTerminateSystemThread(STATUS_SUCCESS); } +#endif NDIS_STATUS WlanAdapterInitialize ( @@ -663,6 +665,7 @@ WlanAdapterInitialize ( pwa->OperationModeCapability.uNumOfRXBuffers = 64; pwa->OperationModeCapability.uOpModeCapability = DOT11_OPERATION_MODE_EXTENSIBLE_STATION | DOT11_OPERATION_MODE_NETWORK_MONITOR; +#ifdef USE_V4V // // V4V stuff // @@ -671,6 +674,7 @@ WlanAdapterInitialize ( INVALID_HANDLE_VALUE, NULL, WlanV4vWorkItem, Adapter); // +#endif /* Setup the main 802.11 attributes */ return WlanSet80211Attributes(Adapter); @@ -690,6 +694,7 @@ WlanAdapterDelete ( return; } +#ifdef USE_V4V // // V4V stuff // @@ -702,6 +707,7 @@ WlanAdapterDelete ( if (pwa->V4vThread) ZwClose (pwa->V4vThread); pwa->V4vThread = NULL; TraceNotice (("[V4VDG]: V4VDG work item has cleaned up and exited\n")); // +#endif do { NdisAcquireSpinLock(&(pwa->Lock)); diff --git a/wnet/xenwnet6/wlan_defs.h b/wnet/xenwnet6/wlan_defs.h index cc1e07f..d866e46 100644 --- a/wnet/xenwnet6/wlan_defs.h +++ b/wnet/xenwnet6/wlan_defs.h @@ -45,7 +45,9 @@ typedef struct _V4V_CONFIG { +#ifdef USE_V4V PXEN_V4V V4v; +#endif ULONG txSize; ULONG rxSize; @@ -70,8 +72,8 @@ typedef struct _V4V_CONFIG { ULONG seqnum; ULONG seqrx; ULONG status; - BOOL ack; - BOOL done; + BOOLEAN ack; + BOOLEAN done; } dfile; } r; } V4V_CONFIG, *PV4V_CONFIG; diff --git a/wnet/xenwnet6/xenwnet6.vcproj b/wnet/xenwnet6/xenwnet6.vcproj index 27689ff..0c03751 100644 --- a/wnet/xenwnet6/xenwnet6.vcproj +++ b/wnet/xenwnet6/xenwnet6.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\inc;..\..\xenhdrs;C:\WinDDK\6001.18002\inc\ddk" - PreprocessorDefinitions="NDIS60_MINIPORT;XEN_WIRELESS;USE_V4V" + PreprocessorDefinitions="NDIS60_MINIPORT;XEN_WIRELESS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -116,7 +116,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="..\..\inc;..\..\xenhdrs;C:\WinDDK\6001.18002\inc\ddk" - PreprocessorDefinitions="NDIS60_MINIPORT;XEN_WIRELESS;USE_V4V" + PreprocessorDefinitions="NDIS60_MINIPORT;XEN_WIRELESS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0"