[PATCH 7/7] ppp: Nothing to transmit hint for Termios driver

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Oct 7 14:36:31 UTC 2014


---
 cpukit/libnetworking/net/ppp_tty.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/cpukit/libnetworking/net/ppp_tty.c b/cpukit/libnetworking/net/ppp_tty.c
index 85a336c..1051048 100644
--- a/cpukit/libnetworking/net/ppp_tty.c
+++ b/cpukit/libnetworking/net/ppp_tty.c
@@ -577,6 +577,10 @@ pppstart(struct rtems_termios_tty *tp)
     /* Ready with PPP_FLAG Character ? */
     if(sc->sc_outflag & SC_TX_LASTCHAR){
         sc->sc_outflag &= ~(SC_TX_BUSY | SC_TX_FCS | SC_TX_LASTCHAR);
+
+        /* Notify driver that we have nothing to transmit */
+        (*tp->handler.write)(ctx, NULL, 0);
+
         rtems_event_send(sc->sc_txtask, TX_TRANSMIT);	/* Ready for the next Packet */
         return(0);
     }
@@ -647,10 +651,15 @@ pppstart(struct rtems_termios_tty *tp)
       (*tp->handler.write)(ctx, (char *)sendBegin, (ioffset > 0) ? ioffset : 1);
       sc->sc_stats.ppp_obytes += (ioffset > 0) ? ioffset : 1;
       sc->sc_outoff += ioffset;
+
+      return (0);
     }
   }
 
-  return ( 0 );
+  /* Notify driver that we have nothing to transmit */
+  (*tp->handler.write)(ctx, NULL, 0);
+
+  return (0);
 }
 
 #ifdef XXX_XXX
-- 
1.8.4.5




More information about the devel mailing list