X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=geekos%2Fsrc%2Fgeekos%2Fne2k.c;h=aa11b62c730433e873b6d3a18ac6c206533aa0e9;hb=fae3d4b2dab80486bc3e3617f65e603d26b45954;hp=0b8039bbb6c2a877bcdb6299d46299c6d4e61555;hpb=d38e1d6edeee83bfb1e3e3c6e2367faa5055bdfe;p=palacios.git diff --git a/geekos/src/geekos/ne2k.c b/geekos/src/geekos/ne2k.c index 0b8039b..aa11b62 100644 --- a/geekos/src/geekos/ne2k.c +++ b/geekos/src/geekos/ne2k.c @@ -25,8 +25,11 @@ #include #include #include + +#ifdef UIP #include #include +#endif #define DEBUG 1 #define TX_START_BUFF 0x40 @@ -148,13 +151,13 @@ int Init_Ne2k(int (*rcvd_fn)(struct NE2K_Packet_Info *info, uchar_t *packet)) cr->ps = 0x01; /* Switch to reg page 1 */ Out_Byte(NE2K_CR, regs->cr); - /* Set the physical address of the card to 52:54:00:12:34:58 */ - Out_Byte(NE2K_CR+0x01, 0x52); - Out_Byte(NE2K_CR+0x02, 0x54); - Out_Byte(NE2K_CR+0x03, 0x00); - Out_Byte(NE2K_CR+0x04, 0x12); - Out_Byte(NE2K_CR+0x05, 0x34); - Out_Byte(NE2K_CR+0x06, 0x58); + /* Set the physical address of the card */ + Out_Byte(NE2K_CR+0x01, PHY_ADDR1); + Out_Byte(NE2K_CR+0x02, PHY_ADDR2); + Out_Byte(NE2K_CR+0x03, PHY_ADDR3); + Out_Byte(NE2K_CR+0x04, PHY_ADDR4); + Out_Byte(NE2K_CR+0x05, PHY_ADDR5); + Out_Byte(NE2K_CR+0x06, PHY_ADDR6); /* Set the multicast address register to all 1s; accepts all multicast packets */ uint_t i; @@ -228,6 +231,8 @@ int Init_Ne2k(int (*rcvd_fn)(struct NE2K_Packet_Info *info, uchar_t *packet)) * an ARP packet, which is sent out instead. The original packet will need to be * retransmitted at some point in the future. */ +#ifdef UIP + int NE2K_Transmit(uint_t size) { uip_arp_out(); @@ -257,6 +262,8 @@ int NE2K_Transmit(uint_t size) return 0; } +#endif + int NE2K_Send_Packet(uchar_t *packet, uint_t size) { struct _CR * cr = (struct _CR*)&(regs->cr);