X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fftmac100.c;h=1fc7da9a3e71cda2cf6bc5b63d5c8c06512f9781;hb=46fe9eb08812cc27a0d5cd97d97373c14d578fe9;hp=94dc6d99ba6016d4782ccbe4e592cc6f570575f3;hpb=8d8fd5b69614d84aa39bf4a624eda9c76d154837;p=u-boot diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index 94dc6d99ba..1fc7da9a3e 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -4,19 +4,7 @@ * (C) Copyright 2009 Faraday Technology * Po-Yu Chuang * - * This program 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -114,7 +102,7 @@ static int ftmac100_init (struct eth_device *dev, bd_t *bd) for (i = 0; i < PKTBUFSRX; i++) { /* RXBUF_BADR */ - rxdes[i].rxdes2 = (unsigned int)NetRxPackets[i]; + rxdes[i].rxdes2 = (unsigned int)net_rx_packets[i]; rxdes[i].rxdes1 |= FTMAC100_RXDES1_RXBUF_SIZE (PKTSIZE_ALIGN); rxdes[i].rxdes0 = FTMAC100_RXDES0_RXDMA_OWN; } @@ -176,7 +164,7 @@ static int ftmac100_recv (struct eth_device *dev) /* pass the packet up to the protocol layers. */ - NetReceive ((void *)curr_des->rxdes2, rxlen); + net_process_received_packet((void *)curr_des->rxdes2, rxlen); /* release buffer to DMA */ @@ -190,8 +178,7 @@ static int ftmac100_recv (struct eth_device *dev) /* * Send a data block via Ethernet */ -static int -ftmac100_send (struct eth_device *dev, volatile void *packet, int length) +static int ftmac100_send(struct eth_device *dev, void *packet, int length) { struct ftmac100 *ftmac100 = (struct ftmac100 *)dev->iobase; struct ftmac100_data *priv = dev->priv; @@ -259,7 +246,7 @@ int ftmac100_initialize (bd_t *bd) memset (dev, 0, sizeof (*dev)); memset (priv, 0, sizeof (*priv)); - sprintf (dev->name, "FTMAC100"); + strcpy(dev->name, "FTMAC100"); dev->iobase = CONFIG_FTMAC100_BASE; dev->init = ftmac100_init; dev->halt = ftmac100_halt;