23 MediaNumber = Adapter->MediaNumber;
38 if (Adapter->MediaBitmap & (1 << MediaNumber))
40 Adapter->MediaNumber = MediaNumber;
68 ULONG MediaBitmap, MediaNumber;
72 MediaBitmap = Adapter->MediaBitmap;
102 Adapter->ModeFlags &= ~DC_MODE_AUTONEG_MASK;
106 if (Adapter->MediaNumber != MediaNumber)
108 Adapter->MediaNumber = MediaNumber;
115 Adapter->LastReceiveActivity = (
ULONG)Adapter->Statistics.ReceiveOk;
124 INFO_VERB(
"Link failed, CSR12 %08lx\n", SiaStatus);
142 INFO_VERB(
"Link passed, CSR12 %08lx\n", SiaStatus);
154 Adapter->ModeFlags &= ~DC_MODE_AUTONEG_MASK;
174 INFO_VERB(
"Link changed, CSR12 %08lx\n", SiaStatus);
202 ULONG MediaNumber, AdvLpa;
207 INFO_VERB(
"Auto-negotiation has completed, LPA %08lx ADV %08lx\n",
208 SiaStatus, Adapter->SymAdvertising);
242 INFO_VERB(
"Link partner does not support auto-negotiation, CSR12 %08lx\n", SiaStatus);
261 if (
MEDIA_IS_10T(MediaNumber) && (MediaNumber != Adapter->MediaNumber))
264 Adapter->ModeFlags &= ~DC_MODE_AUTONEG_MASK;
271 Adapter->ModeFlags &= ~DC_MODE_AUTONEG_MASK;
276 if (Adapter->MediaNumber != MediaNumber)
278 Adapter->MediaNumber = MediaNumber;
290 INFO_VERB(
"Link interrupt, CSR5 %08lx\n", InterruptStatus);
383 Adapter->ModeFlags &= ~DC_MODE_AUTONEG_MASK;
478 Adapter->
ModeFlags &= ~DC_MODE_TEST_PACKET;
#define DC_MODE_AUTONEG_WAIT_INTERRUPT
VOID MediaSelectMiiPort(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN ResetPhy)
MEDIA_HANDLE_LINK_STATE_CHANGE MediaLinkStateChange21143
VOID MediaMiiSelect(_In_ PDC21X4_ADAPTER Adapter)
FORCEINLINE ULONG DC_READ(_In_ PDC21X4_ADAPTER Adapter, _In_ DC_CSR Register)
#define DC_MODE_AUI_FAILED
VOID DcStopTxRxProcess(_In_ PDC21X4_ADAPTER Adapter)
NDIS_TIMER_FUNCTION MediaMonitor21143Dpc
#define DC_MODE_AUTONEG_LINK_STATUS_CHECK
#define DC_MODE_BNC_FAILED
VOID MediaIndicateConnect(_In_ PDC21X4_ADAPTER Adapter, _In_ BOOLEAN LinkUp)
#define DC_MODE_TEST_PACKET
BOOLEAN MediaMiiCheckLink(_In_ PDC21X4_ADAPTER Adapter)
#define DC_WRITE(Adapter, Register, Value)
VOID DcTestPacket(_In_ PDC21X4_ADAPTER Adapter)
VOID MediaSiaSelect(_In_ PDC21X4_ADAPTER Adapter)
#define DC_MODE_AUTONEG_MASK
#define DC_MODE_AUTONEG_NONE
#define DC_IRQ_LINK_CHANGED
#define DC_SIA_STATUS_ANS_AUTONEG_COMPLETE
#define DC_SIA_STATUS_ANS_MASK
#define DC_SIA_STATUS_LP_CODE_WORD_SHIFT
#define DC_SIA_STATUS_LP_AUTONED_SUPPORTED
#define DC_SIA_STATUS_100T_LINK_FAIL
#define DC_SIA_STATUS_10T_LINK_FAIL
#define DC_SIA_TXRX_AUTONEG
#define DC_SIA_STATUS_AUI_ACTIVITY
VOID EXPORT NdisMSetTimer(IN PNDIS_MINIPORT_TIMER Timer, IN UINT MillisecondsToDelay)
_In_ PVOID _In_ PVOID SystemSpecific2
#define NdisDprReleaseSpinLock(_SpinLock)
_In_ PVOID FunctionContext
#define NdisDprAcquireSpinLock(_SpinLock)
_In_ PVOID _In_ PVOID _In_ PVOID SystemSpecific3
static NTSTATUS ReceiveActivity(PAFD_FCB FCB, PIRP Irp)
#define UNREFERENCED_PARAMETER(P)
volatile LONG MediaTestStatus
DECLSPEC_CACHEALIGN NDIS_SPIN_LOCK ModeLock
ULONG LastReceiveActivity
NDIS_MINIPORT_TIMER MediaMonitorTimer
DECLSPEC_CACHEALIGN NDIS_SPIN_LOCK SendLock