Skip to content

Commit dec80be

Browse files
g2gpsxiaoxiang781216
authored andcommitted
arch/risc-v/litex: Fix emac driver compilation when only IPv6 is used.
1 parent b738379 commit dec80be

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/risc-v/src/litex/litex_emac.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,8 @@ static void litex_receive(struct litex_emac_s *priv)
626626
litex_transmit(priv);
627627
}
628628
}
629-
#endif
630629
else
630+
#endif
631631
{
632632
NETDEV_RXDROPPED(&priv->dev);
633633
}
@@ -788,11 +788,13 @@ static int litex_ifup(struct net_driver_s *dev)
788788
struct litex_emac_s *priv = (struct litex_emac_s *)dev->d_private;
789789
int ret;
790790

791+
#ifdef CONFIG_NET_IPv4
791792
ninfo("Bringing up: %d.%d.%d.%d\n",
792793
(int)(dev->d_ipaddr & 0xff),
793794
(int)((dev->d_ipaddr >> 8) & 0xff),
794795
(int)((dev->d_ipaddr >> 16) & 0xff),
795796
(int)(dev->d_ipaddr >> 24));
797+
#endif
796798

797799
/* Configure the EMAC interface for normal operation. */
798800

boards/risc-v/litex/arty_a7/configs/netnsh/defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ CONFIG_DEV_ZERO=y
4949
CONFIG_ETH0_PHY_DP83848C=y
5050
CONFIG_EXAMPLES_HELLO=y
5151
CONFIG_EXAMPLES_HELLO_STACKSIZE=8192
52+
CONFIG_FILE_STREAM=y
5253
CONFIG_FS_PROCFS=y
5354
CONFIG_IDLETHREAD_STACKSIZE=8192
5455
CONFIG_INIT_ENTRYPOINT="nsh_main"

0 commit comments

Comments
 (0)