In all up_initialize() functions, automatically initialize TUN driver is so configureded

This commit is contained in:
Gregory Nutt 2015-09-06 09:35:29 -06:00
parent b30e6a696e
commit 26eada3446
9 changed files with 63 additions and 0 deletions

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
#include <nuttx/crypto/crypto.h> #include <nuttx/crypto/crypto.h>
@ -261,6 +262,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
/* Initialize USB -- device and/or host */ /* Initialize USB -- device and/or host */
up_usbinitialize(); up_usbinitialize();

View File

@ -44,6 +44,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -275,6 +276,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
/* Initialize USB */ /* Initialize USB */
up_usbinitialize(); up_usbinitialize();

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -199,6 +200,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
/* Initialize USB */ /* Initialize USB */
up_usbinitialize(); up_usbinitialize();

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -201,6 +202,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
/* Initialize USB -- device and/or host */ /* Initialize USB -- device and/or host */
up_usbinitialize(); up_usbinitialize();

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -189,6 +190,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
/* Initialize USB */ /* Initialize USB */
up_usbinitialize(); up_usbinitialize();

View File

@ -45,6 +45,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h> #include <nuttx/fs/ioctl.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/mtd/mtd.h> #include <nuttx/mtd/mtd.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -172,6 +173,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
#if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_SIM_SPIFLASH) #if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_SIM_SPIFLASH)
up_init_smartfs(); up_init_smartfs();
#endif #endif

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -201,6 +202,12 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
/* Initialize USB -- device and/or host */ /* Initialize USB -- device and/or host */
up_usbinitialize(); up_usbinitialize();

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/ramlog.h> #include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h> #include <nuttx/syslog/syslog_console.h>
@ -205,5 +206,11 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
board_led_on(LED_IRQSENABLED); board_led_on(LED_IRQSENABLED);
} }

View File

@ -45,6 +45,7 @@
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/net/loopback.h> #include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <arch/board/board.h> #include <arch/board/board.h>
@ -188,5 +189,11 @@ void up_initialize(void)
(void)localhost_initialize(); (void)localhost_initialize();
#endif #endif
#ifdef CONFIG_NET_TUN
/* Initialize the TUN device */
(void)tun_initialize();
#endif
board_led_on(LED_IRQSENABLED); board_led_on(LED_IRQSENABLED);
} }