- outb(CRTC_IDX_REG, idx);
- return inb(CRTC_DATA_REG);
-}
-
-static unsigned int vga_base()
-{
- return (((unsigned int) vga_read(CRTC_START_ADDR_MSB_IDX)) << 9)
- + (((unsigned int) vga_read(CRTC_START_ADDR_LSB_IDX)) << 1);
+ struct eth_hdr *ethhdr;
+
+ LINK_STATS_INC(link.recv);
+
+ ethhdr = p->payload;
+
+ switch (htons(ethhdr->type)) {
+ case ETHTYPE_IP:
+ case ETHTYPE_ARP:
+ if (_netif.input(p, &_netif) != ERR_OK)
+ {
+ LWIP_DEBUGF(NETIF_DEBUG, ("netdev_input: IP input error\n"));
+ pbuf_free(p);
+ }
+ break;
+
+ default:
+ outputf("Unhandled packet type %04x input", ethhdr->type);
+ pbuf_free(p);
+ break;
+ }