101 *
Counter = Adapter->Statistics.TransmitOk;
104 *
Counter = Adapter->Statistics.ReceiveOk;
107 *
Counter = Adapter->Statistics.TransmitErrors;
110 *
Counter = Adapter->Statistics.ReceiveErrors;
113 *
Counter = Adapter->Statistics.ReceiveNoBuffers;
116 *
Counter = Adapter->Statistics.ReceiveUnicast;
119 *
Counter = Adapter->Statistics.ReceiveMulticast;
122 *
Counter = Adapter->Statistics.ReceiveBroadcast;
125 *
Counter = Adapter->Statistics.ReceiveCrcErrors;
128 *
Counter = Adapter->Statistics.ReceiveAlignmentErrors;
131 *
Counter = Adapter->Statistics.TransmitOneRetry;
134 *
Counter = Adapter->Statistics.TransmitMoreCollisions;
137 *
Counter = Adapter->Statistics.TransmitDeferred;
140 *
Counter = Adapter->Statistics.TransmitExcessiveCollisions;
143 *
Counter = Adapter->Statistics.ReceiveOverrunErrors;
146 *
Counter = Adapter->Statistics.TransmitUnderrunErrors;
149 *
Counter = Adapter->Statistics.TransmitHeartbeatErrors;
152 *
Counter = Adapter->Statistics.TransmitLostCarrierSense;
155 *
Counter = Adapter->Statistics.TransmitLateCollisions;
172 switch (Adapter->MediaNumber)
194 LinkSpeedMbps = Adapter->LinkSpeedMbps;
203 return LinkSpeedMbps;
220 union _GENERIC_INFORMATION
230 InfoLength =
sizeof(
ULONG);
231 InfoPtr = &GenericInfo;
263 ULONG InterruptStatus;
269 if (InterruptStatus != 0xFFFFFFFF)
309 GenericInfo.Ulong = 0;
317 static const CHAR VendorDesc[] =
"DC21x4 compatible Ethernet Adapter";
318 InfoPtr = (
PVOID)&VendorDesc;
319 InfoLength =
sizeof(VendorDesc);
325 GenericInfo.Ulong = 0x100;
330 InfoLength =
sizeof(
USHORT);
331 GenericInfo.Ushort = (NDIS_MINIPORT_MAJOR_VERSION << 8) | NDIS_MINIPORT_MINOR_VERSION;
382 *BytesNeeded =
sizeof(
ULONG64);
383 if (InformationBufferLength <
sizeof(
ULONG))
388 if (InformationBufferLength >=
sizeof(
ULONG64))
412 if (InformationBufferLength < InfoLength)
415 *BytesNeeded = InfoLength;
459 if (InfoLength > InformationBufferLength)
462 *BytesNeeded = InfoLength;
502 if (InformationBufferLength <
sizeof(
ULONG))
504 *BytesNeeded =
sizeof(
ULONG);
535 if (InformationBufferLength >
Size)
553 if (InformationBufferLength <
sizeof(
ULONG))
555 *BytesNeeded =
sizeof(
ULONG);
567 if (InformationBufferLength <
sizeof(
ULONG))
569 *BytesNeeded =
sizeof(
ULONG);
static const NDIS_OID DcpSupportedOidList[]
static ULONG DcGetLinkSpeed(_In_ PDC21X4_ADAPTER Adapter)
static VOID DcQueryStatisticCounter(_In_ PDC21X4_ADAPTER Adapter, _In_ NDIS_OID Oid, _Out_ PULONG64 Counter)
NDIS_STATUS NTAPI DcSetInformation(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ NDIS_OID Oid, _In_ PVOID InformationBuffer, _In_ ULONG InformationBufferLength, _Out_ PULONG BytesRead, _Out_ PULONG BytesNeeded)
NDIS_STATUS NTAPI DcQueryInformation(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ NDIS_OID Oid, _In_ PVOID InformationBuffer, _In_ ULONG InformationBufferLength, _Out_ PULONG BytesWritten, _Out_ PULONG BytesNeeded)
NDIS_STATUS DcUpdateMulticastList(_In_ PDC21X4_ADAPTER Adapter)
#define DC_MAXIMUM_FRAME_SIZE
#define DC_HAS_POWER_MANAGEMENT
#define DC_NEED_RX_OVERFLOW_WORKAROUND
NDIS_STATUS DcSetPower(_In_ PDC21X4_ADAPTER Adapter, _In_ NDIS_DEVICE_POWER_STATE PowerState)
#define DC_PACKET_FILTERS
struct _DC21X4_ADAPTER * PDC21X4_ADAPTER
FORCEINLINE ULONG DC_READ(_In_ PDC21X4_ADAPTER Adapter, _In_ DC_CSR Register)
NDIS_STATUS DcApplyPacketFilter(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PacketFilter)
NDIS_STATUS DcRemoveWakeUpPattern(_In_ PDC21X4_ADAPTER Adapter, _In_ PNDIS_PM_PACKET_PATTERN PmPattern)
#define DC_TRANSMIT_BLOCKS
#define DC_TRANSMIT_BLOCK_SIZE
NDIS_STATUS DcAddWakeUpPattern(_In_ PDC21X4_ADAPTER Adapter, _In_ PNDIS_PM_PACKET_PATTERN PmPattern)
#define DC_RECEIVE_BLOCK_SIZE
#define DC_ETHERNET_HEADER_SIZE
#define DC_COUNTER_RX_NO_BUFFER_MASK
#define ETH_LENGTH_OF_ADDRESS
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
unsigned __int64 * PULONG64
#define NDIS_STATUS_INVALID_DATA
#define NDIS_STATUS_NOT_SUPPORTED
#define NDIS_STATUS_INVALID_LENGTH
#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
#define NDIS_STATUS_INVALID_OID
#define NDIS_STATUS_SUCCESS
#define NDIS_STATUS_BUFFER_TOO_SHORT
#define NDIS_MAC_OPTION_NO_LOOPBACK
#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA
#define NdisMoveMemory(Destination, Source, Length)
#define NDIS_STATUS_MULTICAST_FULL
#define NDIS_PNP_WAKE_UP_MAGIC_PACKET
enum _NDIS_MEDIUM NDIS_MEDIUM
#define OID_GEN_TRANSMIT_BLOCK_SIZE
#define OID_GEN_MAXIMUM_TOTAL_SIZE
#define OID_GEN_XMIT_ERROR
#define OID_GEN_VENDOR_DRIVER_VERSION
struct _NDIS_PM_PACKET_PATTERN NDIS_PM_PACKET_PATTERN
#define OID_802_3_PERMANENT_ADDRESS
#define OID_GEN_LINK_SPEED
#define OID_GEN_VENDOR_ID
#define OID_802_3_RCV_OVERRUN
#define OID_GEN_CURRENT_PACKET_FILTER
@ NdisMediaStateConnected
@ NdisMediaStateDisconnected
#define OID_GEN_RCV_NO_BUFFER
#define OID_PNP_SET_POWER
#define OID_802_3_XMIT_HEARTBEAT_FAILURE
enum _NDIS_DEVICE_POWER_STATE NDIS_DEVICE_POWER_STATE
#define OID_802_3_XMIT_ONE_COLLISION
#define OID_802_3_XMIT_MORE_COLLISIONS
#define OID_802_3_XMIT_MAX_COLLISIONS
#define OID_GEN_RECEIVE_BUFFER_SPACE
#define OID_802_3_XMIT_TIMES_CRS_LOST
#define OID_802_3_MAXIMUM_LIST_SIZE
#define OID_GEN_DRIVER_VERSION
#define OID_802_3_XMIT_UNDERRUN
#define OID_802_3_XMIT_LATE_COLLISIONS
#define OID_802_3_CURRENT_ADDRESS
#define OID_802_3_MULTICAST_LIST
#define OID_GEN_DIRECTED_FRAMES_RCV
#define OID_PNP_ENABLE_WAKE_UP
#define OID_GEN_TRANSMIT_BUFFER_SPACE
#define OID_GEN_MEDIA_SUPPORTED
#define OID_GEN_BROADCAST_FRAMES_RCV
#define OID_PNP_ADD_WAKE_UP_PATTERN
#define OID_GEN_MAXIMUM_FRAME_SIZE
#define OID_GEN_RCV_CRC_ERROR
#define OID_GEN_MEDIA_IN_USE
#define OID_GEN_MEDIA_CONNECT_STATUS
#define OID_GEN_MAXIMUM_LOOKAHEAD
#define OID_802_3_RCV_ERROR_ALIGNMENT
#define OID_PNP_QUERY_POWER
#define NDIS_PNP_WAKE_UP_LINK_CHANGE
#define OID_GEN_RCV_ERROR
@ NdisHardwareStatusNotReady
@ NdisHardwareStatusReady
#define OID_PNP_REMOVE_WAKE_UP_PATTERN
#define OID_PNP_CAPABILITIES
#define OID_GEN_CURRENT_LOOKAHEAD
#define OID_GEN_MAC_OPTIONS
#define OID_GEN_VENDOR_DESCRIPTION
#define OID_GEN_SUPPORTED_LIST
#define OID_802_3_XMIT_DEFERRED
#define OID_GEN_RECEIVE_BLOCK_SIZE
#define OID_GEN_MAXIMUM_SEND_PACKETS
#define OID_GEN_TRANSMIT_QUEUE_LENGTH
#define OID_GEN_HARDWARE_STATUS
#define OID_GEN_MULTICAST_FRAMES_RCV
#define NDIS_PNP_WAKE_UP_PATTERN_MATCH
enum _NDIS_HARDWARE_STATUS NDIS_HARDWARE_STATUS
ULONG MulticastMaxEntries
UCHAR CurrentMacAddress[ETH_LENGTH_OF_ADDRESS]
UCHAR PermanentMacAddress[ETH_LENGTH_OF_ADDRESS]
struct _DC21X4_ADAPTER::@993 MulticastList[DC_MULTICAST_LIST_SIZE]
static LARGE_INTEGER Counter
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead