diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 7227a150760..79e7f29bfb4 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -37,6 +37,7 @@ #include #include #include +#include #include @@ -984,6 +985,9 @@ static int slip_txavail(FAR struct net_driver_s *dev) int slip_initialize(int intf, FAR const char *devname) { FAR struct slip_driver_s *self; +#ifdef CONFIG_SERIAL_TERMIOS + struct termios termios; +#endif int ret; /* Get the interface structure associated with this interface number. */ @@ -1006,6 +1010,22 @@ int slip_initialize(int intf, FAR const char *devname) return ret; } +#ifdef CONFIG_SERIAL_TERMIOS + ret = file_ioctl(&self->tty, TCGETS, &termios); + if (ret >= 0) + { + cfmakeraw(&termios); + ret = file_ioctl(&self->tty, TCSETS, &termios); + } + + if (ret < 0) + { + nerr("ERROR: Failed to get termios: %d\n", ret); + file_close(&self->tty); + return ret; + } +#endif + /* Put the interface in the down state. This usually amounts to resetting * the device and/or calling slip_ifdown(). */