]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
altera_tse: Fix return of eth_device's recv() callback
authorJoachim Foerster <joachim.foerster@missinglinkelectronics.com>
Mon, 17 Oct 2011 05:24:46 +0000 (05:24 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 26 Oct 2011 19:29:08 +0000 (21:29 +0200)
It seems to be good practice to return the number of received bytes in the
eth_device's recv() callback, here: tse_eth_rx().

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
drivers/net/altera_tse.c

index 8b18ad0b0d5ef54fd8306ac0701a0528f34112e5..5b00717d11bb342f428ee2beb42e0b0650757108 100644 (file)
@@ -323,6 +323,8 @@ static int tse_eth_rx(struct eth_device *dev)
 
                /* setup the sgdma */
                alt_sgdma_do_async_transfer(priv->sgdma_rx, &rx_desc[0]);
+
+               return packet_length;
        }
 
        return -1;