emac_init () - This does the bulk of hardware initialization, but does not yet make the interface active.
emac_activate () - This enables interrupts and calls the "start" routine for both Rx and Tx
emac_show () - This is called by the Kyu "n 1" command to show a brief summary of statistics. It shows the interrupt count and the number of Tx and Rx packets.
emac_debug () - This is run by a different Kyu "n" command and give a lot more that "n 1". It shows the Rx and Tx rings.
get_emac_addr () - This provides the MAC address for the network stack.
emac_send () - This gives the driver a packet to be added to the Tx ring and ultimately to be transmitted.
When a packet has been received, the driver calls net_rcv(). This call is made at interrupt level, so the network code does the least possible amount of work, adding the packet to a queue.
The most important internal datastructures are the Rx and Tx buffer rings (rx_list and tx_list).
The routine board_net_init() calls emac_init().
The routine board_net_activate() calls emac_activate().
Both of these calls are made from net_hw_init() in net/net_main.c and the activate call immediately follows the init call. (So there is really no need for them to be separated).
Tom's electronics pages / tom@mmto.org