11#define NO_KERNEL_LIST_ENTRY_CHECKS
21#define DC21X4_TAG '4x12'
23#define DC_TRANSMIT_DESCRIPTORS 64
24#define DC_TRANSMIT_BLOCKS 48
25#define DC_TRANSMIT_BUFFERS 4
26#define DC_LOOPBACK_FRAMES 4
28#define DC_RECEIVE_BUFFERS_DEFAULT 64
29#define DC_RECEIVE_BUFFERS_MIN 8
30#define DC_RECEIVE_BUFFERS_EXTRA 16
32#define DC_RECEIVE_ARRAY_SIZE 16
34#define DC_MULTICAST_LIST_SIZE 36
36#define DC_MAXIMUM_FRAME_SIZE 1514
37#define DC_TRANSMIT_BLOCK_SIZE 1536
38#define DC_RECEIVE_BLOCK_SIZE 1536
39#define DC_ETHERNET_HEADER_SIZE 14
41#define DC_TX_UNDERRUN_LIMIT 5
42#define DC_INTERRUPT_PROCESSING_LIMIT 8
44#define DC_FRAGMENTATION_THRESHOLD 32
46#define DC_PACKET_FILTERS ( \
47 NDIS_PACKET_TYPE_DIRECTED | \
48 NDIS_PACKET_TYPE_MULTICAST | \
49 NDIS_PACKET_TYPE_BROADCAST | \
50 NDIS_PACKET_TYPE_PROMISCUOUS | \
51 NDIS_PACKET_TYPE_ALL_MULTICAST)
53#define DC_LOOPBACK_FRAME_SIZE 64
56#define DC_TBD_RESERVE (2 + DC_LOOPBACK_FRAMES)
57#define DC_TCB_RESERVE (1 + DC_LOOPBACK_FRAMES)
59#define DC_EVENT_SETUP_FRAME_COMPLETED 0x00000001
108#define DC_NEED_RX_OVERFLOW_WORKAROUND 0x80000000
109#define DC_SIA_GPIO 0x00000001
110#define DC_SIA_ANALOG_CONTROL 0x00000002
111#define DC_HAS_POWER_MANAGEMENT 0x00000004
112#define DC_HAS_POWER_SAVING 0x00000008
113#define DC_HAS_MII 0x00000010
114#define DC_PERFECT_FILTERING_ONLY 0x00000020
115#define DC_ENABLE_PCI_COMMANDS 0x00000040
116#define DC_MII_AUTOSENSE 0x00000080
117#define DC_HAS_TIMER 0x00000100
120#define DC_ACTIVE 0x80000000
121#define DC_IO_MAPPED 0x00000001
122#define DC_IRQ_SHARED 0x00000002
123#define DC_FIRST_SETUP 0x00000004
124#define DC_AUTOSENSE 0x00000008
163#define DC_MODE_AUTONEG_MASK 0x0000000F
164#define DC_MODE_PORT_AUTOSENSE 0x00000010
165#define DC_MODE_TEST_PACKET 0x00000020
166#define DC_MODE_AUI_FAILED 0x00000040
167#define DC_MODE_BNC_FAILED 0x00000080
169#define DC_MODE_AUTONEG_NONE 0x00000000
170#define DC_MODE_AUTONEG_WAIT_INTERRUPT 0x00000001
171#define DC_MODE_AUTONEG_LINK_STATUS_CHECK 0x00000002
204 ULONG MulticastCount;
272#define DC_WRITE(Adapter, Register, Value) \
273 NdisRawWritePortUlong((PULONG)((Adapter)->IoBase + (Register)), (Value));
VOID DcWriteGpio(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG Value)
VOID() MEDIA_HANDLE_LINK_STATE_CHANGE(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG InterruptStatus)
VOID NTAPI DcReturnPacket(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ PNDIS_PACKET Packet)
NDIS_STATUS DcUpdateMulticastList(_In_ PDC21X4_ADAPTER Adapter)
LIST_ENTRY SRompAdapterList
NDIS_STATUS DcSetupAdapter(_In_ PDC21X4_ADAPTER Adapter)
VOID DcPowerSave(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN Enable)
VOID MediaSelectMiiPort(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN ResetPhy)
NDIS_STATUS DcSetPower(_In_ PDC21X4_ADAPTER Adapter, _In_ NDIS_DEVICE_POWER_STATE PowerState)
#define DC_LOOPBACK_FRAMES
VOID DcDisableHw(_In_ PDC21X4_ADAPTER Adapter)
MEDIA_HANDLE_LINK_STATE_CHANGE MediaLinkStateChange21143
struct _DC21X4_ADAPTER * PDC21X4_ADAPTER
VOID NTAPI DcPowerWorker(_In_ PNDIS_WORK_ITEM WorkItem, _In_opt_ PVOID Context)
VOID DcSetupFrameInitialize(_In_ PDC21X4_ADAPTER Adapter)
VOID NTAPI DcCancelSendPackets(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ PVOID CancelId)
VOID MediaMiiSelect(_In_ PDC21X4_ADAPTER Adapter)
VOID NTAPI DcIsr(_Out_ PBOOLEAN InterruptRecognized, _Out_ PBOOLEAN QueueMiniportHandleInterrupt, _In_ NDIS_HANDLE MiniportAdapterContext)
struct _DC_COALESCE_BUFFER * PDC_COALESCE_BUFFER
DRIVER_INITIALIZE DriverEntry
FORCEINLINE ULONG DC_READ(_In_ PDC21X4_ADAPTER Adapter, _In_ DC_CSR Register)
NDIS_STATUS DcApplyPacketFilter(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PacketFilter)
VOID MediaInitMediaList(_In_ PDC21X4_ADAPTER Adapter)
VOID DcInitRxRing(_In_ PDC21X4_ADAPTER Adapter)
NDIS_TIMER_FUNCTION MediaMonitor21041Dpc
#define DC_MULTICAST_LIST_SIZE
VOID DcStartAdapter(_In_ PDC21X4_ADAPTER Adapter)
VOID NTAPI DcTransmitTimeoutRecoveryWorker(_In_ PNDIS_WORK_ITEM WorkItem, _In_opt_ PVOID Context)
VOID DcStopTxRxProcess(_In_ PDC21X4_ADAPTER Adapter)
ULONG DcEthernetCrc(_In_reads_bytes_(Size) const VOID *Buffer, _In_ ULONG Size)
#define DC_TRANSMIT_BUFFERS
NDIS_TIMER_FUNCTION MediaMonitor21143Dpc
VOID MediaInitDefaultMedia(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG MediaNumber)
struct _DC_TX_BUFFER_DATA * PDC_TX_BUFFER_DATA
NDIS_STATUS DcRemoveWakeUpPattern(_In_ PDC21X4_ADAPTER Adapter, _In_ PNDIS_PM_PACKET_PATTERN PmPattern)
VOID HpnaPhyInit(_In_ PDC21X4_ADAPTER Adapter)
MEDIA_HANDLE_LINK_STATE_CHANGE * PMEDIA_HANDLE_LINK_STATE_CHANGE
VOID NTAPI DcHandleInterrupt(_In_ NDIS_HANDLE MiniportAdapterContext)
NDIS_STATUS DcAddWakeUpPattern(_In_ PDC21X4_ADAPTER Adapter, _In_ PNDIS_PM_PACKET_PATTERN PmPattern)
NDIS_TIMER_FUNCTION MediaMonitor21140Dpc
NDIS_TIMER_FUNCTION MediaMonitor21040Dpc
DECLSPEC_NOINLINE VOID DcStopAdapter(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN WaitForPackets)
VOID MediaGprSelect(_In_ PDC21X4_ADAPTER Adapter)
MEDIA_HANDLE_LINK_STATE_CHANGE MediaLinkStateChange21041
VOID DcFreeAdapter(_In_ __drv_freesMem(Mem) PDC21X4_ADAPTER Adapter)
VOID MediaIndicateConnect(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN LinkUp)
MEDIA_HANDLE_LINK_STATE_CHANGE MediaLinkStateChange21040
NDIS_STATUS DcReadEeprom(_In_ PDC21X4_ADAPTER Adapter)
BOOLEAN MiiRead(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _Out_ PULONG Data)
VOID DcWriteSia(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG Csr13, _In_ ULONG Csr14, _In_ ULONG Csr15)
VOID DcFreeEeprom(_In_ PDC21X4_ADAPTER Adapter)
VOID NTAPI DcResetWorker(_In_ PNDIS_WORK_ITEM WorkItem, _In_opt_ PVOID Context)
struct _DC21X4_ADAPTER DC21X4_ADAPTER
BOOLEAN MediaMiiCheckLink(_In_ PDC21X4_ADAPTER Adapter)
struct _DC_TX_BUFFER_DATA DC_TX_BUFFER_DATA
struct _DC_STATISTICS DC_STATISTICS
VOID DcProcessPendingPackets(_In_ PDC21X4_ADAPTER Adapter)
BOOLEAN DcFindMiiPhy(_In_ PDC21X4_ADAPTER Adapter)
VOID DcInitTxRing(_In_ PDC21X4_ADAPTER Adapter)
BOOLEAN DcSetupFrameDownload(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN WaitForCompletion)
NDIS_STATUS NTAPI DcInitialize(_Out_ PNDIS_STATUS OpenErrorStatus, _Out_ PUINT SelectedMediumIndex, _In_ PNDIS_MEDIUM MediumArray, _In_ UINT MediumArraySize, _In_ NDIS_HANDLE MiniportAdapterHandle, _In_ NDIS_HANDLE WrapperConfigurationContext)
struct _DC_STATISTICS * PDC_STATISTICS
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)
VOID DcTestPacket(_In_ PDC21X4_ADAPTER Adapter)
VOID MediaSiaSelect(_In_ PDC21X4_ADAPTER Adapter)
BOOLEAN MiiWrite(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _In_ ULONG Data)
VOID NTAPI DcSendPackets(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ PPNDIS_PACKET PacketArray, _In_ UINT NumberOfPackets)
enum _DC_CHIP_TYPE DC_CHIP_TYPE
#define __drv_freesMem(kind)
#define SROM_MAX_STREAM_REGS
#define ETH_LENGTH_OF_ADDRESS
#define NdisRawReadPortUlong(Port, Data)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
_In_ PPNDIS_PACKET _In_ UINT NumberOfPackets
_In_ PPNDIS_PACKET PacketArray
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT SelectedMediumIndex
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT MediumArraySize
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _In_ NDIS_HANDLE WrapperConfigurationContext
_In_ NDIS_HANDLE MiniportAdapterHandle
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS OpenErrorStatus
#define _In_reads_bytes_(s)
#define DECLSPEC_NOINLINE
#define DECLSPEC_CACHEALIGN
enum _NDIS_DEVICE_POWER_STATE NDIS_DEVICE_POWER_STATE
enum _NDIS_MEDIUM * PNDIS_MEDIUM
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
ULONG MulticastMaxEntries
BOOLEAN ProgramHashPerfectFilter
UCHAR CurrentMacAddress[ETH_LENGTH_OF_ADDRESS]
volatile LONG MediaTestStatus
NDIS_HANDLE WrapperConfigurationHandle
DECLSPEC_CACHEALIGN NDIS_SPIN_LOCK ModeLock
_Interlocked_ volatile LONG ResetLock
UCHAR PermanentMacAddress[ETH_LENGTH_OF_ADDRESS]
USHORT ResetStream[SROM_MAX_STREAM_REGS]
NDIS_WORK_ITEM ResetWorkItem
struct _DC21X4_ADAPTER::@993 MulticastList[DC_MULTICAST_LIST_SIZE]
ULONG LastReceiveActivity
SINGLE_LIST_ENTRY SendBufferList
PDC_COALESCE_BUFFER CoalesceBuffer
SINGLE_LIST_ENTRY AllocRcbList
ULONG CurrentInterruptMask
ULONG LoopbackFrameNumber
NDIS_DEVICE_POWER_STATE PowerState
NDIS_PHYSICAL_ADDRESS IoBaseAddress
PMEDIA_HANDLE_LINK_STATE_CHANGE HandleLinkStateChange
_Field_range_(0, MulticastMaxEntries) ULONG MulticastCount
ULONG LinkStateChangeMask
NDIS_HANDLE AdapterHandle
NDIS_MINIPORT_TIMER MediaMonitorTimer
DC_TX_BUFFER_DATA SendBufferData[DC_TRANSMIT_BUFFERS]
SINGLE_LIST_ENTRY UsedRcbList
PVOID LoopbackFrame[DC_LOOPBACK_FRAMES]
NDIS_MINIPORT_INTERRUPT Interrupt
DECLSPEC_CACHEALIGN NDIS_SPIN_LOCK ReceiveLock
NDIS_PHYSICAL_ADDRESS RbdPhysOriginal
NDIS_WORK_ITEM PowerWorkItem
NDIS_DEVICE_POWER_STATE PrevPowerState
DC_MEDIA Media[MEDIA_LIST_MAX]
UCHAR MacAddress[ETH_LENGTH_OF_ADDRESS]
NDIS_WORK_ITEM TxRecoveryWorkItem
NDIS_PHYSICAL_ADDRESS TbdPhysOriginal
ULONG LoopbackFramePhys[DC_LOOPBACK_FRAMES]
DECLSPEC_CACHEALIGN NDIS_SPIN_LOCK SendLock
SINGLE_LIST_ENTRY FreeRcbList
SCATTER_GATHER_LIST LocalSgList
ULONG64 ReceiveOverrunErrors
ULONG64 TransmitUnderrunErrors
ULONG64 TransmitExcessiveCollisions
ULONG64 TransmitLostCarrierSense
ULONG64 TransmitMoreCollisions
ULONG64 TransmitLateCollisions
ULONG64 TransmitHeartbeatErrors
ULONG64 ReceiveAlignmentErrors
NDIS_PHYSICAL_ADDRESS PhysicalAddress
_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
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
struct _SCATTER_GATHER_LIST SCATTER_GATHER_LIST