From: Thierry Reding Date: Wed, 10 Dec 2014 05:25:24 +0000 (-0700) Subject: net: rtl8169: Honor CONFIG_SYS_RX_ETH_BUFFER X-Git-Tag: v2015.01~88^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c94bbfdf516e0ebaf2cb08025174f224c0b391f0;p=u-boot net: rtl8169: Honor CONFIG_SYS_RX_ETH_BUFFER According to the top-level README file, this configuration setting can be used to override the number of receive buffers that an ethernet NIC uses. Signed-off-by: Thierry Reding Signed-off-by: Simon Glass Signed-off-by: Tom Warren --- diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index c3ce17516c..955b2e1bfc 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -79,7 +79,11 @@ static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; #define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */ #define NUM_TX_DESC 1 /* Number of Tx descriptor registers */ -#define NUM_RX_DESC 4 /* Number of Rx descriptor registers */ +#ifdef CONFIG_SYS_RX_ETH_BUFFER + #define NUM_RX_DESC CONFIG_SYS_RX_ETH_BUFFER +#else + #define NUM_RX_DESC 4 /* Number of Rx descriptor registers */ +#endif #define RX_BUF_SIZE 1536 /* Rx Buffer size */ #define RX_BUF_LEN 8192