Go to the source code of this file.
|
static BOOLEAN | ProbeAddressForNIC (ULONG_PTR address) |
|
BOOLEAN | NICCheck (PNIC_ADAPTER Adapter) |
|
static BOOLEAN | NICTestAddress (PNIC_ADAPTER Adapter, ULONG Address) |
|
static BOOLEAN | NICTestRAM (PNIC_ADAPTER Adapter) |
|
static VOID | NICSetPhysicalAddress (PNIC_ADAPTER Adapter) |
|
static VOID | NICSetMulticastAddressMask (PNIC_ADAPTER Adapter) |
|
static BOOLEAN | NICReadSAPROM (PNIC_ADAPTER Adapter) |
|
NDIS_STATUS | NICInitialize (PNIC_ADAPTER Adapter) |
|
NDIS_STATUS | NICSetup (PNIC_ADAPTER Adapter) |
|
NDIS_STATUS | NICStart (PNIC_ADAPTER Adapter) |
|
NDIS_STATUS | NICStop (PNIC_ADAPTER Adapter) |
|
NDIS_STATUS | NICReset (PNIC_ADAPTER Adapter) |
|
static VOID | NICStartTransmit (PNIC_ADAPTER Adapter) |
|
static VOID | NICSetBoundaryPage (PNIC_ADAPTER Adapter) |
|
static VOID | NICGetCurrentPage (PNIC_ADAPTER Adapter) |
|
VOID | NICUpdateCounters (PNIC_ADAPTER Adapter) |
|
VOID | NICReadDataAlign (PNIC_ADAPTER Adapter, PUSHORT Target, ULONG_PTR Source, USHORT Length) |
|
VOID | NICWriteDataAlign (PNIC_ADAPTER Adapter, ULONG_PTR Target, PUSHORT Source, USHORT Length) |
|
VOID | NICReadData (PNIC_ADAPTER Adapter, PUCHAR Target, ULONG_PTR Source, USHORT Length) |
|
VOID | NICWriteData (PNIC_ADAPTER Adapter, ULONG_PTR Target, PUCHAR Source, USHORT Length) |
|
static VOID | NICIndicatePacket (PNIC_ADAPTER Adapter) |
|
static VOID | NICReadPacket (PNIC_ADAPTER Adapter) |
|
static VOID | NICWritePacket (PNIC_ADAPTER Adapter) |
|
static BOOLEAN | NICPrepareForTransmit (PNIC_ADAPTER Adapter) |
|
VOID | NICTransmit (PNIC_ADAPTER Adapter) |
|
static VOID | HandleReceive (PNIC_ADAPTER Adapter) |
|
static VOID | HandleTransmit (PNIC_ADAPTER Adapter) |
|
VOID NTAPI | MiniportHandleInterrupt (IN NDIS_HANDLE MiniportAdapterContext) |
|
◆ HandleReceive()
Definition at line 1146 of file 8390.c.
1155{
1159
1161
1163 PacketCount = 0;
1164
1166
1168
1170
1171
1173
1174
1177
1178
1179 for (
i = 0;
i < 4;
i++) {
1182 break;
1183
1185 }
1186
1187#if DBG
1190#endif
1191
1193
1195 }
1196
1197
1199
1200
1202
1204
1206 }
1207
1210
1211
1214
1216 }
1217
1218 for (;;) {
1220
1224
1227 break;
1228 } else {
1230
1233
1235
1237
1238 PacketCount++;
1239 if (PacketCount == 10) {
1240
1241 break;
1242 }
1243 }
1244 }
1245
1248
1251 }
1252
1255}
static VOID NICReadPacket(PNIC_ADAPTER Adapter)
static VOID NICGetCurrentPage(PNIC_ADAPTER Adapter)
static VOID NICStartTransmit(PNIC_ADAPTER Adapter)
NDIS_STATUS NICStart(PNIC_ADAPTER Adapter)
static VOID NICSetBoundaryPage(PNIC_ADAPTER Adapter)
#define NDIS_DbgPrint(_t_, _x_)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define NdisMEthIndicateReceiveComplete(MiniportAdapterHandle)
#define NdisRawReadPortUchar(Port, Data)
#define NdisStallExecution
#define NdisRawWritePortUchar(Port, Data)
NDIS_HANDLE MiniportAdapterHandle
Referenced by MiniportHandleInterrupt().
◆ HandleTransmit()
Definition at line 1258 of file 8390.c.
1265{
1268
1269
1270
1271
1272
1274
1276 }
1277
1278
1281
1283 BufferCount,
1285
1286 Adapter->
TXFree += BufferCount;
1289
1292
1294 }
1295
1299 }
1300}
static BOOLEAN NICPrepareForTransmit(PNIC_ADAPTER Adapter)
#define DRIVER_BLOCK_SIZE
_In_ ULONG _In_ ULONG _In_ ULONG Length
UINT TXSize[DRIVER_DEFAULT_TX_BUFFER_COUNT]
Referenced by MiniportHandleInterrupt().
◆ MiniportHandleInterrupt()
Definition at line 1303 of file 8390.c.
1313{
1319
1322
1324
1326
1329
1330 if (ISRValue != 0x00) {
1331
1334 }
1335
1338
1339
1342
1346
1348
1353 else
1355
1357 break;
1358
1362
1364 break;
1367
1372 else
1374
1376 break;
1377
1381
1383 break;
1386
1388
1390 break;
1391
1394
1396
1398 break;
1399
1400 default:
1403 break;
1404 }
1405
1407
1408
1409
1411
1413
1415 }
1416
1418}
static VOID HandleTransmit(PNIC_ADAPTER Adapter)
static VOID HandleReceive(PNIC_ADAPTER Adapter)
VOID NICUpdateCounters(PNIC_ADAPTER Adapter)
#define NICEnableInterrupts(Adapter)
struct _NIC_ADAPTER * PNIC_ADAPTER
◆ NICCheck()
Definition at line 53 of file 8390.c.
62{
64
66
67
69 {
72 }
73
74
76 {
78 {
82 }
83 }
84
87}
ULONG_PTR ProbeAddressList[]
static BOOLEAN ProbeAddressForNIC(ULONG_PTR address)
Referenced by MiniportInitialize().
◆ NICGetCurrentPage()
◆ NICIndicatePacket()
Definition at line 887 of file 8390.c.
894{
896
901
902
907
910
911#if 0
913 for (
i = 0;
i < (IndicateLength + 7) / 8;
i++) {
923 }
924#endif
925
936 } else {
940 IndicateLength,
942 0,
943 0);
944 }
945}
VOID NICReadData(PNIC_ADAPTER Adapter, PUCHAR Target, ULONG_PTR Source, USHORT Length)
#define NdisMEthIndicateReceive(MiniportAdapterHandle, MiniportReceiveContext, HeaderBuffer, HeaderBufferSize, LookaheadBuffer, LookaheadBufferSize, PacketSize)
#define DRIVER_HEADER_SIZE
PACKET_HEADER PacketHeader
UCHAR Lookahead[DRIVER_MAXIMUM_LOOKAHEAD+DRIVER_HEADER_SIZE]
Referenced by NICReadPacket().
◆ NICInitialize()
Definition at line 289 of file 8390.c.
300{
302
304
305
307
308
310
311
313
314
316
317
319
320
323
324
326
327
329
330
333
338
339
341
342
344
345
347
349}
static BOOLEAN NICTestRAM(PNIC_ADAPTER Adapter)
static BOOLEAN NICReadSAPROM(PNIC_ADAPTER Adapter)
#define NDIS_STATUS_SUCCESS
#define NDIS_STATUS_ADAPTER_NOT_FOUND
DRIVER_HARDWARE_ADDRESS StationAddress
Referenced by MiniportInitialize().
◆ NICPrepareForTransmit()
Definition at line 1064 of file 8390.c.
1075{
1079
1081
1082
1088
1090
1091 if (BufferCount > Adapter->
TXFree) {
1093 Adapter->
TXFree, BufferCount));
1094
1096 }
1097
1098
1100
1101
1104
1106 Adapter->
TXFree -= BufferCount;
1107
1108
1111
1114
1115
1119
1121}
static VOID NICWritePacket(PNIC_ADAPTER Adapter)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
static __inline VOID NdisQueryPacket(IN PNDIS_PACKET Packet, OUT PUINT PhysicalBufferCount OPTIONAL, OUT PUINT BufferCount OPTIONAL, OUT PNDIS_BUFFER *FirstBuffer OPTIONAL, OUT PUINT TotalPacketLength OPTIONAL)
#define NdisMSendComplete(MiniportAdapterHandle, Packet, Status)
Referenced by HandleTransmit(), and NICTransmit().
◆ NICReadData()
◆ NICReadDataAlign()
Definition at line 642 of file 8390.c.
655{
658
660
661
663
664
667
668
671
672
674
677 else
679
680
684 break;
685
687 }
688
689#if DBG
692#endif
693
694
696}
#define NdisRawReadPortBufferUshort(Port, Buffer, Length)
#define NdisRawReadPortBufferUchar(Port, Buffer, Length)
Referenced by NICReadData(), NICTestAddress(), and NICWriteData().
◆ NICReadPacket()
Definition at line 948 of file 8390.c.
955{
957
959
960
966
970
976 }
977
978 if (SkipPacket) {
979
981 } else {
985
986
988 }
989
990
992}
static VOID NICIndicatePacket(PNIC_ADAPTER Adapter)
Referenced by HandleReceive().
◆ NICReadSAPROM()
Definition at line 215 of file 8390.c.
229{
233
235
236
237
238
239
242
243
246
247
249
250
251 WordLength = 2;
252 for (
i = 0;
i < 32;
i += 2) {
256 WordLength = 1;
257 }
258
259
260 if (WordLength == 2) {
262
264
265
266 for (
i = 0;
i < 16;
i++)
268
269
274
275
277
279 } else {
281
283
285 }
286}
#define NdisMoveMemory(Destination, Source, Length)
#define DRIVER_LENGTH_OF_ADDRESS
DRIVER_HARDWARE_ADDRESS PermanentAddress
Referenced by NICInitialize().
◆ NICReset()
Definition at line 500 of file 8390.c.
509{
511
513
514
516
517
519
520
522
523
525
526
528
530}
NDIS_STATUS NICStop(PNIC_ADAPTER Adapter)
Referenced by MiniportReset().
◆ NICSetBoundaryPage()
◆ NICSetMulticastAddressMask()
Definition at line 190 of file 8390.c.
200{
202
203
205
206
207 for (
i = 0;
i < 0x08;
i++)
209
210
212}
UCHAR MulticastAddressMask[8]
Referenced by NICSetup().
◆ NICSetPhysicalAddress()
Definition at line 165 of file 8390.c.
175{
177
178
180
181
182 for (
i = 0;
i < 0x06;
i++)
184
185
187}
Referenced by NICSetup().
◆ NICSetup()
Definition at line 352 of file 8390.c.
363{
365
367
369 } else {
370
372 }
373
374
377
378
380
381
383
384
386
387
389
390
392
393
395
396
398
399
401
402
404
405
407
408
410
411
413
414
416
422
424
426}
static VOID NICSetPhysicalAddress(PNIC_ADAPTER Adapter)
static VOID NICSetMulticastAddressMask(PNIC_ADAPTER Adapter)
Referenced by MiniportInitialize().
◆ NICStart()
◆ NICStartTransmit()
◆ NICStop()
◆ NICTestAddress()
Definition at line 90 of file 8390.c.
100{
103
104
106
107
109
110
112
113
115
116 return (
Data == Tmp);
117}
VOID NICWriteDataAlign(PNIC_ADAPTER Adapter, ULONG_PTR Target, PUSHORT Source, USHORT Length)
Referenced by NICTestRAM().
◆ NICTestRAM()
Definition at line 120 of file 8390.c.
131{
133
135
136
139 break;
140 }
141
142 if (
Base == 0x10000) {
143
146 }
147
149
150
151 for (;
Base < 0x10000;
Base += 0x0400) {
153 break;
154 }
155
157
160
162}
static BOOLEAN NICTestAddress(PNIC_ADAPTER Adapter, ULONG Address)
Referenced by NICInitialize().
◆ NICTransmit()
◆ NICUpdateCounters()
◆ NICWriteData()
Definition at line 833 of file 8390.c.
846{
848
849
851
853
854
855 Tmp = (Tmp & 0x00FF) | (*
Source << 8);
856
857
859
860
864 }
865
867
872
873
875
876
877 Tmp = (Tmp & 0xFF00) | (*
Source);
878
879
881 } else
882
884}
Referenced by NICWritePacket().
◆ NICWriteDataAlign()
Definition at line 699 of file 8390.c.
712{
715
716
718
719
720
721
724
725
728
729
731
732
734
735
739 break;
740
742 }
743
744#if DBG
747#endif
748
749
751
752
753
755
756
759
760
763
764
766
769 else
771
772
776 break;
777
779 }
780
781#if DBG
784#endif
785
786
788}
#define NdisRawReadPortUshort(Port, Data)
#define NdisRawWritePortBufferUchar(Port, Buffer, Length)
#define NdisRawWritePortBufferUshort(Port, Buffer, Length)
Referenced by NICTestAddress(), and NICWriteData().
◆ NICWritePacket()
Definition at line 995 of file 8390.c.
1006{
1013
1015
1018
1022 &SrcBuffer,
1024
1028
1030
1032 DstSize = TXStop - DstData;
1033
1034
1035 for (;;) {
1036 BytesToCopy = (SrcSize < DstSize)? SrcSize : DstSize;
1037
1039
1044
1045 if (SrcSize == 0) {
1046
1047
1049 if (!SrcBuffer)
1050 break;
1051
1053 }
1054
1055 if (DstSize == 0) {
1056
1057 DstData = TXStart;
1059 }
1060 }
1061}
VOID NICWriteData(PNIC_ADAPTER Adapter, ULONG_PTR Target, PUCHAR Source, USHORT Length)
#define NdisGetNextBuffer(CurrentBuffer, NextBuffer)
_In_ UINT _In_ UINT BytesToCopy
#define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length)
Referenced by NICPrepareForTransmit().
◆ ProbeAddressForNIC()
Definition at line 16 of file 8390.c.
29{
31
33
34
36
37
39
40
42
43
45
48 else
50}
Referenced by NICCheck().
◆ ProbeAddressList
ULONG_PTR ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 } |