summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net-common.h4
-rw-r--r--net/Kconfig4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/net-common.h b/include/net-common.h
index 69b6316c1ec..0c260873c2c 100644
--- a/include/net-common.h
+++ b/include/net-common.h
@@ -20,7 +20,9 @@
* alignment in memory.
*
*/
+#if CONFIG_IS_ENABLED(NET)
#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER
+#endif
#define PKTALIGN ARCH_DMA_MINALIGN
/* IPv4 addresses are always 32 bits in size */
@@ -132,7 +134,9 @@ static inline void net_set_state(enum net_loop_state state)
}
extern int net_restart_wrap; /* Tried all network devices */
+#if CONFIG_IS_ENABLED(NET)
extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */
+#endif
extern const u8 net_bcast_ethaddr[ARP_HLEN]; /* Ethernet broadcast address */
extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */
/* Indicates whether the pxe path prefix / config file was specified in dhcp option */
diff --git a/net/Kconfig b/net/Kconfig
index e712a0dd2ac..171a88f8ed2 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -279,8 +279,6 @@ config TFTP_BLOCKSIZE
almost-MTU block sizes.
You can also activate CONFIG_IP_DEFRAG to set a larger block.
-endif # if NET
-
config SYS_RX_ETH_BUFFER
int "Number of receive packet buffers"
default 4
@@ -289,3 +287,5 @@ config SYS_RX_ETH_BUFFER
controllers it is recommended to set this value to 8 or even higher,
since all buffers can be full shortly after enabling the interface on
high Ethernet traffic.
+
+endif # if NET