X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fuli526x.c;h=c56836641b1852626f2ff03a413bf1e57d3cd50b;hb=cce289a928583a64db6ec8f813cc7884ae62c213;hp=5933bddce54861d94b7500967cafff998fd2b94f;hpb=09c04c20962afd25ce5797e263906f84de5b1f4c;p=oweals%2Fu-boot.git diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c index 5933bddce5..c56836641b 100644 --- a/drivers/net/uli526x.c +++ b/drivers/net/uli526x.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2007, 2010 Freescale Semiconductor, Inc. * @@ -6,11 +7,6 @@ * Description: * ULI 526x Ethernet port driver. * Based on the Linux driver: drivers/net/tulip/uli526x.c - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #include @@ -168,9 +164,7 @@ static char buf_pool[TX_BUF_ALLOC * TX_DESC_CNT + 4]; static int mode = 8; /* function declaration -- */ -static int uli526x_start_xmit(struct eth_device *dev, - volatile void *packet, int length); -static const struct ethtool_ops netdev_ethtool_ops; +static int uli526x_start_xmit(struct eth_device *dev, void *packet, int length); static u16 read_srom_word(long, int); static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); static void allocate_rx_buffer(struct uli526x_board_info *); @@ -443,8 +437,7 @@ static void uli526x_init(struct eth_device *dev) * Send a packet to media from the upper layer. */ -static int uli526x_start_xmit(struct eth_device *dev, - volatile void *packet, int length) +static int uli526x_start_xmit(struct eth_device *dev, void *packet, int length) { struct uli526x_board_info *db = dev->priv; struct tx_desc *txptr; @@ -553,7 +546,7 @@ static int uli526x_rx_packet(struct eth_device *dev) rdes0 = le32_to_cpu(rxptr->rdes0); #ifdef RX_DEBUG - printf("%s(): rxptr->rdes0=%x:%x\n", __FUNCTION__, rxptr->rdes0); + printf("%s(): rxptr->rdes0=%x\n", __FUNCTION__, rxptr->rdes0); #endif if (!(rdes0 & 0x80000000)) { /* packet owner check */ if ((rdes0 & 0x300) != 0x300) { @@ -592,7 +585,8 @@ static int uli526x_rx_packet(struct eth_device *dev) __FUNCTION__, i, rxptr->rx_buf_ptr[i]); #endif - NetReceive((uchar *)rxptr->rx_buf_ptr, rxlen); + net_process_received_packet( + (uchar *)rxptr->rx_buf_ptr, rxlen); uli526x_reuse_buf(rxptr); } else { @@ -714,7 +708,7 @@ static void allocate_rx_buffer(struct uli526x_board_info *db) u32 addr; for (index = 0; index < RX_DESC_CNT; index++) { - addr = (u32)NetRxPackets[index]; + addr = (u32)net_rx_packets[index]; addr += (16 - (addr & 15)); rxptr->rx_buf_ptr = (char *) addr; rxptr->rdes2 = cpu_to_le32(addr);