2 * UDI Ne2000 NIC Driver
3 * By John Hodge (thePowersGang)
10 #include "ne2000_common.h"
13 udi_pio_trans_call_t ne2k_rx__complete;
16 void ne2k_nd_rx_channel_event_ind(udi_channel_event_cb_t *cb)
19 void ne2k_nd_rx_rx_rdy(udi_nic_rx_cb_t *cb)
21 // TODO: Add cb(s) to avaliable list
23 void ne2k_intr__rx_ok(udi_cb_t *gcb)
25 ne2k_rdata_t *rdata = gcb->context;
26 if( rdata->rx_next_cb )
28 udi_nic_rx_cb_t *rx_cb = rdata->rx_next_cb;
29 rdata->rx_next_cb = rx_cb->chain;
31 udi_pio_trans(ne2k_rx__complete, UDI_GCB(rx_cb),
32 rdata->pio_handles[NE2K_PIO_RX], 0, NULL, &rdata->rx_next_page);
36 // Drop packet due to no free cbs
40 void ne2k_rx__complete(udi_cb_t *gcb, udi_buf_t *new_buf, udi_status_t status, udi_ubit16_t result)
42 udi_nic_rx_cb_t *rx_cb = UDI_MCB(gcb, udi_nic_rx_cb_t);
44 udi_nsr_rx_ind( rx_cb );