]> git.sur5r.net Git - u-boot/commitdiff
net: rtl8169: Honor CONFIG_SYS_RX_ETH_BUFFER
authorThierry Reding <treding@nvidia.com>
Wed, 10 Dec 2014 05:25:24 +0000 (22:25 -0700)
committerTom Warren <twarren@nvidia.com>
Thu, 18 Dec 2014 20:21:41 +0000 (13:21 -0700)
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 <treding@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
drivers/net/rtl8169.c

index c3ce17516c7407b0f189084bda4cbecb515122ac..955b2e1bfcab5271287928e021c2daeac7cb235c 100644 (file)
@@ -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