[PATCH rtems-net-legacy v3] Remove RTEMS_NETWORKING checks

Vijay Kumar Banerjee vijay at rtems.org
Sun Apr 4 01:05:33 UTC 2021


---
 bsps/powerpc/mpc55xxevb/net/smsc9218i.c |  4 +--
 libmisc/dummy-networking.c              | 44 ++++++++++++-------------
 telnetd/telnetd.c                       |  4 ---
 3 files changed, 23 insertions(+), 29 deletions(-)

diff --git a/bsps/powerpc/mpc55xxevb/net/smsc9218i.c b/bsps/powerpc/mpc55xxevb/net/smsc9218i.c
index d88aa8a..384f9cd 100644
--- a/bsps/powerpc/mpc55xxevb/net/smsc9218i.c
+++ b/bsps/powerpc/mpc55xxevb/net/smsc9218i.c
@@ -24,7 +24,7 @@
 
 #include <mpc55xx/regs.h>
 
-#if defined(RTEMS_NETWORKING) && defined(MPC55XX_HAS_SIU)
+#if defined(MPC55XX_HAS_SIU)
 
 #include <machine/rtems-bsd-kernel-space.h>
 
@@ -2121,4 +2121,4 @@ int smsc9218i_attach_detach(
   return 0;
 }
 
-#endif /* defined(RTEMS_NETWORKING) && defined(MPC55XX_HAS_SIU) */
+#endif /* defined(MPC55XX_HAS_SIU) */
diff --git a/libmisc/dummy-networking.c b/libmisc/dummy-networking.c
index 379e23e..b7f15c8 100644
--- a/libmisc/dummy-networking.c
+++ b/libmisc/dummy-networking.c
@@ -16,27 +16,25 @@
 #include <rtems.h>
 
 /* Loopback Network Configuration */
-#if defined(RTEMS_NETWORKING)
-  #include <rtems/rtems_bsdnet.h>
-  #include <sys/socket.h>
-  #include <netinet/in.h>
+#include <rtems/rtems_bsdnet.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
-  struct rtems_bsdnet_config rtems_bsdnet_config = {
-      NULL,                   /* Network interface */
-      NULL,                   /* Use fixed network configuration */
-      0,                      /* Default network task priority */
-      0,                      /* Default mbuf capacity */
-      0,                      /* Default mbuf cluster capacity */
-      "testSystem",           /* Host name */
-      "nowhere.com",          /* Domain name */
-      "127.0.0.1",            /* Gateway */
-      "127.0.0.1",            /* Log host */
-      {"127.0.0.1" },         /* Name server(s) */
-      {"127.0.0.1" },         /* NTP server(s) */
-      1,                      /* sb_efficiency */
-      0,                      /* udp_tx_buf_size */
-      0,                      /* udp_rx_buf_size */
-      0,                      /* tcp_tx_buf_size */
-      0                       /* tcp_rx_buf_size */
-  };
-#endif
+struct rtems_bsdnet_config rtems_bsdnet_config = {
+    NULL,                   /* Network interface */
+    NULL,                   /* Use fixed network configuration */
+    0,                      /* Default network task priority */
+    0,                      /* Default mbuf capacity */
+    0,                      /* Default mbuf cluster capacity */
+    "testSystem",           /* Host name */
+    "nowhere.com",          /* Domain name */
+    "127.0.0.1",            /* Gateway */
+    "127.0.0.1",            /* Log host */
+    {"127.0.0.1" },         /* Name server(s) */
+    {"127.0.0.1" },         /* NTP server(s) */
+    1,                      /* sb_efficiency */
+    0,                      /* udp_tx_buf_size */
+    0,                      /* udp_rx_buf_size */
+    0,                      /* tcp_tx_buf_size */
+    0                       /* tcp_rx_buf_size */
+};
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index b8adec2..3d401ff 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -58,9 +58,7 @@
 #include <rtems/thread.h>
 #include <rtems/userenv.h>
 
-#ifdef RTEMS_NETWORKING
 #include <rtems/rtems_bsdnet.h>
-#endif
 
 #define TELNETD_EVENT_SUCCESS RTEMS_EVENT_0
 
@@ -401,11 +399,9 @@ rtems_status_code rtems_telnetd_start(const rtems_telnetd_config_table* config)
   LIST_INIT(&ctx->free_sessions);
 
   /* Check priority */
-#ifdef RTEMS_NETWORKING
   if (ctx->config.priority == 0) {
     ctx->config.priority = rtems_bsdnet_config.network_task_priority;
   }
-#endif
   if (ctx->config.priority == 0) {
     ctx->config.priority = 100;
   }
-- 
2.26.2



More information about the devel mailing list