patch-2.3.43 linux/drivers/net/ppp_generic.c

Next file: linux/drivers/net/rcpci45.c
Previous file: linux/drivers/net/plip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/drivers/net/ppp_generic.c linux/drivers/net/ppp_generic.c
@@ -527,7 +527,7 @@
 		} else {
 			ppp->npmode[i] = npi.mode;
 			/* we may be able to transmit more packets now (??) */
-			mark_bh(NET_BH);
+			netif_wake_queue(ppp->dev);
 		}
 		err = 0;
 		break;
@@ -539,16 +539,12 @@
 }
 
 static struct file_operations ppp_device_fops = {
-	NULL,		/* seek */
-	ppp_read,
-	ppp_write,
-	NULL,		/* readdir */
-	ppp_poll,
-	ppp_ioctl,
-	NULL,		/* mmap */
-	ppp_open,
-	NULL,		/* flush */
-	ppp_release
+	read:		ppp_read,
+	write:		ppp_write,
+	poll:		ppp_poll,
+	ioctl:		ppp_ioctl,
+	open:		ppp_open,
+	release:	ppp_release
 };
 
 #define PPP_MAJOR	108
@@ -630,11 +626,7 @@
 	pp[0] = proto >> 8;
 	pp[1] = proto;
 
-	/*
-	 * ppp->xq should only ever have more than 1 data packet on it
-	 * if the core net code calls us when dev->tbusy == 1.
-	 */
-	dev->tbusy = 1;
+	netif_stop_queue(dev);
 	skb_queue_tail(&ppp->xq, skb);
 	if (trylock_xmit_path(ppp))
 		ppp_xmit_unlock(ppp, 0);
@@ -735,12 +727,9 @@
 		while (ppp->xmit_pending == 0
 		       && (skb = skb_dequeue(&ppp->xq)) != 0)
 			ppp_send_frame(ppp, skb);
-		if (ppp->xmit_pending == 0 && skb_peek(&ppp->xq) == 0
-		    && ppp->dev->tbusy) {
-			ppp->dev->tbusy = 0;
-			if (do_mark_bh)
-				mark_bh(NET_BH);
-		}
+		if (ppp->xmit_pending == 0 && skb_peek(&ppp->xq) == 0)
+			netif_wake_queue(ppp->dev);
+
 		/* Now unlock the transmit path, let others in. */
 		unlock_xmit_path(ppp);
 		/* Check whether any work was queued up

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)