ethernet.c: move hardware-specific code back into main.