net: pcnet: Drop typedef struct pcnet_priv_t
[platform/kernel/u-boot.git] / drivers / net / pcnet.c
index f97e7f8..c6f080d 100644 (file)
@@ -8,11 +8,14 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 #define        PCNET_DEBUG_LEVEL       0       /* 0=off, 1=init, 2=rx/tx */
 
@@ -73,15 +76,15 @@ struct pcnet_uncached_priv {
        struct pcnet_init_block init_block;
 };
 
-typedef struct pcnet_priv {
+struct pcnet_priv {
        struct pcnet_uncached_priv *uc;
        /* Receive Buffer space */
        unsigned char (*rx_buf)[RX_RING_SIZE][PKT_BUF_SZ + 4];
        int cur_rx;
        int cur_tx;
-} pcnet_priv_t;
+};
 
-static pcnet_priv_t *lp;
+static struct pcnet_priv *lp;
 
 /* Offsets from base I/O address for WIO mode */
 #define PCNET_RDP              0x10
@@ -337,9 +340,9 @@ static int pcnet_init(struct eth_device *dev, bd_t *bis)
         * must be aligned on 16-byte boundaries.
         */
        if (lp == NULL) {
-               addr = (unsigned long)malloc(sizeof(pcnet_priv_t) + 0x10);
+               addr = (unsigned long)malloc(sizeof(*lp) + 0x10);
                addr = (addr + 0xf) & ~0xf;
-               lp = (pcnet_priv_t *)addr;
+               lp = (struct pcnet_priv *)addr;
 
                addr = (unsigned long)memalign(ARCH_DMA_MINALIGN,
                                               sizeof(*lp->uc));