]> Joshua Wise's Git repositories - netwatch.git/blobdiff - net/net.c
Some LOL...
[netwatch.git] / net / net.c
index e1c74446162042bd5aa788f6782e43b4ba6ac045..7164746a56f389a1da1a2290a5c8f11dcff01c8e 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -5,6 +5,7 @@
 #include <pci-bother.h>
 #include <output.h>
 #include <minilib.h>
+#include <lwip/init.h>
 #include "net.h"
 #include "../aseg/keyboard.h"
 
@@ -44,10 +45,14 @@ void handle_command(packet_t * p)
 
        outputf("NIC: Command: 0x%x, %d bytes", p->command, dl);
 
-       if (p->command == 0x42)
-       {
+       switch (p->command) {
+       case 0x42:
                for (i = 0; i < dl; i++)
                        kbd_inject_key(p->data[i]);
+               break;
+       case 0xFE:
+               outb(0xCF9, 0x4);       /* Reboot */
+               break;
        }
 }
 
@@ -83,6 +88,13 @@ void eth_poll()
        
 //     if ((c++) % 2)
 //             return;
+
+       if (((base + 80*25*2)%0x8000) < base)
+       {
+               if ((pos > ((base + 80*25*2)%0x8000)) && (pos < base))
+                       pos = base;
+       } else if ((pos > base + 80*25*2) || (pos < base))
+               pos = base;
        
        test[0] = pos >> 8;
        test[1] = pos & 0xFF;
@@ -113,4 +125,5 @@ void eth_init()
        /* Required for DMA to work. :( */
        smram_tseg_set_state(SMRAM_TSEG_OPEN);
        pci_probe_driver(a3c90x_driver);
+       lwip_init();
 }
This page took 0.027001 seconds and 4 git commands to generate.