sidk_s5jt200: move wlan_initup() to s5jt200_wlan.c
authorHeesub Shin <heesub.shin@samsung.com>
Thu, 13 Apr 2017 05:37:35 +0000 (14:37 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:18 +0000 (12:02 +0900)
wlan_initup() should be moved to s5jt200_wlan.c that contains
WiFi related functions.

Change-Id: Ic0148e29195d648d198ac187f6a72da3ece6ef2b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
os/arch/arm/src/sidk_s5jt200/src/s5jt200_boot.c
os/arch/arm/src/sidk_s5jt200/src/s5jt200_wlan.c

index 1186c15..117f542 100644 (file)
 #include <arch/board/board.h>
 
 #include <sys/mount.h>
-#ifdef CONFIG_SCSC_WLAN
-#include <net/lwip/opt.h>
-#include <net/lwip/netif.h>
-#include <net/lwip/tcpip.h>
-#endif
 
 #include "sidk_s5jt200.h"
 
@@ -127,29 +122,6 @@ FAR struct mtd_dev_s *up_flashinitialize(void)
        return NULL;
 }
 
-#ifdef CONFIG_SCSC_WLAN
-err_t wlan_init(struct netif *netif);
-
-struct netif *wlan_netif;
-void wlan_initup(struct netif *dev)
-{
-       struct ip_addr ipaddr;
-       struct ip_addr netmask;
-       struct ip_addr gw;
-
-       /* Start LWIP network thread */
-       ipaddr.addr = inet_addr("0.0.0.0");
-       netmask.addr = inet_addr("255.255.255.255");
-       gw.addr = inet_addr("0.0.0.0");
-
-       netif_set_default(dev);
-
-       wlan_netif = netif_add(dev, &ipaddr, &netmask, &gw,
-                                       NULL, wlan_init, tcpip_input);
-       wlan_netif->flags |= NETIF_FLAG_IGMP;
-}
-#endif
-
 /****************************************************************************
  * Name: s5j_board_initialize
  *
index 929377e..a695e09 100644 (file)
@@ -22,6 +22,7 @@
 #include <net/if.h>
 #include <net/lwip/opt.h>
 #include <net/lwip/netif.h>
+#include <net/lwip/tcpip.h>
 
 struct wlanif {
        struct eth_addr *ethaddr;
@@ -55,3 +56,23 @@ err_t wlan_init(struct netif *netif)
 
        return ERR_OK;
 }
+
+struct netif *wlan_netif;
+
+void wlan_initup(struct netif *dev)
+{
+       struct ip_addr ipaddr;
+       struct ip_addr netmask;
+       struct ip_addr gw;
+
+       /* Start LWIP network thread */
+       ipaddr.addr = inet_addr("0.0.0.0");
+       netmask.addr = inet_addr("255.255.255.255");
+       gw.addr = inet_addr("0.0.0.0");
+
+       netif_set_default(dev);
+
+       wlan_netif = netif_add(dev, &ipaddr, &netmask, &gw,
+                                       NULL, wlan_init, tcpip_input);
+       wlan_netif->flags |= NETIF_FLAG_IGMP;
+}