From 26eada3446d1fe26ea25ed0102e679933ce9ee51 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 6 Sep 2015 09:35:29 -0600 Subject: [PATCH] In all up_initialize() functions, automatically initialize TUN driver is so configureded --- arch/arm/src/common/up_initialize.c | 7 +++++++ arch/avr/src/common/up_initialize.c | 7 +++++++ arch/hc/src/common/up_initialize.c | 7 +++++++ arch/mips/src/common/up_initialize.c | 7 +++++++ arch/sh/src/common/up_initialize.c | 7 +++++++ arch/sim/src/up_initialize.c | 7 +++++++ arch/x86/src/common/up_initialize.c | 7 +++++++ arch/z16/src/common/up_initialize.c | 7 +++++++ arch/z80/src/common/up_initialize.c | 7 +++++++ 9 files changed, 63 insertions(+) diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c index 71c3331345..21b5ea2d6e 100644 --- a/arch/arm/src/common/up_initialize.c +++ b/arch/arm/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -261,6 +262,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + /* Initialize USB -- device and/or host */ up_usbinitialize(); diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/up_initialize.c index 0e8499c99d..fdd05dd72f 100644 --- a/arch/avr/src/common/up_initialize.c +++ b/arch/avr/src/common/up_initialize.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -275,6 +276,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + /* Initialize USB */ up_usbinitialize(); diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/up_initialize.c index 2e947c3ef7..315064354f 100644 --- a/arch/hc/src/common/up_initialize.c +++ b/arch/hc/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -199,6 +200,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + /* Initialize USB */ up_usbinitialize(); diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/up_initialize.c index c06b01e990..4ee09a2aca 100644 --- a/arch/mips/src/common/up_initialize.c +++ b/arch/mips/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -201,6 +202,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + /* Initialize USB -- device and/or host */ up_usbinitialize(); diff --git a/arch/sh/src/common/up_initialize.c b/arch/sh/src/common/up_initialize.c index 0224bce01c..fb38f4a828 100644 --- a/arch/sh/src/common/up_initialize.c +++ b/arch/sh/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -189,6 +190,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + /* Initialize USB */ up_usbinitialize(); diff --git a/arch/sim/src/up_initialize.c b/arch/sim/src/up_initialize.c index 24aaa49dbd..18e426e178 100644 --- a/arch/sim/src/up_initialize.c +++ b/arch/sim/src/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -172,6 +173,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + #if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_SIM_SPIFLASH) up_init_smartfs(); #endif diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/up_initialize.c index 76f1621c5d..f720c2ae10 100644 --- a/arch/x86/src/common/up_initialize.c +++ b/arch/x86/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -201,6 +202,12 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + /* Initialize USB -- device and/or host */ up_usbinitialize(); diff --git a/arch/z16/src/common/up_initialize.c b/arch/z16/src/common/up_initialize.c index 9a7710755d..79cf4617ed 100644 --- a/arch/z16/src/common/up_initialize.c +++ b/arch/z16/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -205,5 +206,11 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + board_led_on(LED_IRQSENABLED); } diff --git a/arch/z80/src/common/up_initialize.c b/arch/z80/src/common/up_initialize.c index 7f0fdc68a0..12e5cff6d8 100644 --- a/arch/z80/src/common/up_initialize.c +++ b/arch/z80/src/common/up_initialize.c @@ -45,6 +45,7 @@ #include #include #include +#include #include @@ -188,5 +189,11 @@ void up_initialize(void) (void)localhost_initialize(); #endif +#ifdef CONFIG_NET_TUN + /* Initialize the TUN device */ + + (void)tun_initialize(); +#endif + board_led_on(LED_IRQSENABLED); }