+void net_init(void)
+{
+ static int first_call = 1;
+
+ if (first_call) {
+ /*
+ * Setup packet buffers, aligned correctly.
+ */
+ int i;
+
+ NetTxPacket = &PktBuf[0] + (PKTALIGN - 1);
+ NetTxPacket -= (ulong)NetTxPacket % PKTALIGN;
+ for (i = 0; i < PKTBUFSRX; i++)
+ NetRxPackets[i] = NetTxPacket + (i + 1) * PKTSIZE_ALIGN;
+
+ ArpInit();
+ net_clear_handlers();
+
+ /* Only need to setup buffer pointers once. */
+ first_call = 0;
+ }
+
+ NetInitLoop();
+}
+