net: add config menus for LwIP VLAN options
authorEunBong Song <eunb.song@samsung.com>
Tue, 21 Mar 2017 02:07:58 +0000 (11:07 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Mon, 17 Apr 2017 10:58:10 +0000 (19:58 +0900)
This patch adds for config menu for LwIP VLAN options.

Change-Id: I122626c33e9a992f54f8e63d8f01e6178dd39b81
Signed-off-by: EunBong Song <eunb.song@samsung.com>
build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig
os/include/net/lwip/lwipopts.h
os/net/lwip/Kconfig

index 8a0e42e..2734495 100755 (executable)
@@ -686,6 +686,7 @@ CONFIG_NET_LWIP_IP_REASSEMBLY_MAXAGE=5
 CONFIG_NET_LWIP_IP_REASS_MAX_PBUFS=20
 CONFIG_NET_LWIP_IP_FRAG=y
 CONFIG_NET_LWIP_IP_DEFAULT_TTL=255
+# CONFIG_NET_LWIP_VLAN is not set
 CONFIG_NET_SECURITY_TLS=y
 # CONFIG_TLS_WITH_SSS is not set
 CONFIG_NET_NOINTS=y
index 040a85b..24ff2a9 100644 (file)
 /* ---------- ARP options ---------- */
 
 
+/* ---------- VLAN options ---------- */
+#ifdef CONFIG_NET_LWIP_VLAN
+#define ETHARP_SUPPORT_VLAN             1
+#ifdef NET_LWIP_VLAN_CHECK
+#define ETHARP_VLAN_CHECK               CONFIG_NET_LWIP_VLAN_CHECK_ID
+#endif
+#else
+#define ETHARP_SUPPORT_VLAN             0
+#endif
+/* ---------- VLAN options ---------- */
+
 
 /* ---------- IP options ---------- */
 #ifdef CONFIG_NET_LWIP_IP_FORWARD
index 0f29b2f..06d7228 100644 (file)
@@ -370,4 +370,22 @@ config NET_LWIP_IP_DEFAULT_TTL
 
 endmenu #IP options
 
+config NET_LWIP_VLAN
+       bool "Support VLAN"
+       default n
+       ---help---
+               support receiving ethernet packets with VLAN header.
+               Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check.
+               If VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
+
+config NET_LWIP_VLAN_CHECK
+       bool "Check VLAN ID for receiviing packet"
+       default n
+       depends on NET_LWIP_VLAN
+
+config NET_LWIP_VLAN_CHECK_ID
+       int "VLAN ID for receiviing packet"
+       default 1
+       depends on NET_LWIP_VLAN_CHECK
+
 endmenu #LwIP options