Kernel/x86 - (minor) Cleaned up debug in VM8086
[tpg/acess2.git] / KernelLand / Modules / Network / E1000 / e1000.c
1 /*
2  * Acess2 E1000 Network Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * e1000.c
6  * - Intel E1000 Network Card Driver (core)
7  */
8 #define DEBUG   1
9 #define VERSION VER2(0,1)
10 #include <acess.h>
11 #include "e1000.h"
12 #include <modules.h>
13 #include <drv_pci.h>
14 #include <IPStack/include/adapters_api.h>
15
16 // === PROTOTYPES ===
17  int    E1000_Install(char **Arguments);
18  int    E1000_Cleanup(void);
19 tIPStackBuffer  *E1000_WaitForPacket(void *Ptr);
20  int    E1000_SendPacket(void *Ptr, tIPStackBuffer *Buffer);
21 void    E1000_IRQHandler(int Num, void *Ptr);
22
23 // === GLOBALS ===
24 MODULE_DEFINE(0, VERSION, E1000, E1000_Install, E1000_Cleanup, NULL);
25 tIPStack_AdapterType    gE1000_AdapterType = {
26         .Name = "E1000",
27         .Type = 0,      // TODO: Differentiate differnet wire protos and speeds
28         .Flags = 0,     // TODO: IP checksum offloading, MAC checksum offloading etc
29         .SendPacket = E1000_SendPacket,
30         .WaitForPacket = E1000_WaitForPacket
31         };
32
33 // === CODE ===
34 int E1000_Install(char **Arguments)
35 {
36         for( int id = -1; (id = PCI_GetDevice(0x8086, 0x100E, id)) != -1; )
37         {
38                 
39         }
40         return MODULE_ERR_NOTNEEDED;
41 }
42
43 int E1000_Cleanup(void)
44 {
45         return 0;
46 }
47
48 tIPStackBuffer *E1000_WaitForPacket(void *Ptr)
49 {
50         return NULL;
51 }
52
53 int E1000_SendPacket(void *Ptr, tIPStackBuffer *Buffer)
54 {
55         return -1;
56 }
57
58 void E1000_IRQHandler(int Num, void *Ptr)
59 {
60 }

UCC git Repository :: git.ucc.asn.au