[zaptel-commits] trunk - r894 /trunk/zaptel.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Thu Jan 12 10:28:19 CST 2006
Author: mattf
Date: Thu Jan 12 10:28:18 2006
New Revision: 894
URL: http://svn.digium.com/view/zaptel?rev=894&view=rev
Log:
Fix for HDLC API that might have been broken for some 2.4.x kernels, also fix to stop and start the
queues on the net interface.
Modified:
trunk/zaptel.c
Modified: trunk/zaptel.c
URL: http://svn.digium.com/view/zaptel/trunk/zaptel.c?rev=894&r1=893&r2=894&view=diff
==============================================================================
--- trunk/zaptel.c (original)
+++ trunk/zaptel.c Thu Jan 12 10:28:18 2006
@@ -1310,6 +1310,8 @@
fasthdlc_init(&ms->txhdlc);
ms->infcs = PPP_INITFCS;
+ netif_start_queue(ztchan_to_dev(ms));
+
#ifndef LINUX26
MOD_INC_USE_COUNT;
#endif
@@ -1322,8 +1324,13 @@
#ifdef NEW_HDLC_INTERFACE
static int zt_net_stop(struct net_device *dev)
{
- hdlc_device *h = dev_to_hdlc(dev);
- struct zt_hdlc *hdlc = h->priv;
+#ifdef LINUX26
+ hdlc_device *h = dev_to_hdlc(dev);
+ struct zt_hdlc *hdlc = h->priv;
+#else
+ hdlc_device *hdlc = dev_to_hdlc(dev);
+#endif
+
#else
static void zt_net_close(hdlc_device *hdlc)
{
@@ -1348,6 +1355,7 @@
#endif
}
/* Not much to do here. Just deallocate the buffers */
+ netif_stop_queue(ztchan_to_dev(ms));
zt_reallocbufs(ms, 0, 0);
#ifdef LINUX26
hdlc_close(dev);
@@ -1464,7 +1472,9 @@
if (ss->inwritebuf == ss->outwritebuf) {
/* Whoops, no more space. */
- ss->inwritebuf = -1;
+ ss->inwritebuf = -1;
+
+ netif_stop_queue(ztchan_to_dev(ss));
}
if (ss->outwritebuf < 0) {
/* Let the interrupt handler know there's
More information about the zaptel-commits
mailing list