Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298740
b: refs/heads/master
c: e675f0c
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse authored and David S. Miller committed Apr 3, 2012
1 parent 179bdf1 commit c649e23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2def16ae6b0c77571200f18ba4be049b03d75579
refs/heads/master: e675f0cc9a872fd152edc0c77acfed19bf28b81e
14 changes: 9 additions & 5 deletions trunk/drivers/net/ppp/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ struct ppp_net {
/* Prototypes. */
static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
struct file *file, unsigned int cmd, unsigned long arg);
static void ppp_xmit_process(struct ppp *ppp);
static int ppp_xmit_process(struct ppp *ppp);
static void ppp_send_frame(struct ppp *ppp, struct sk_buff *skb);
static void ppp_push(struct ppp *ppp);
static void ppp_channel_push(struct channel *pch);
Expand Down Expand Up @@ -968,9 +968,9 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
proto = npindex_to_proto[npi];
put_unaligned_be16(proto, pp);

netif_stop_queue(dev);
skb_queue_tail(&ppp->file.xq, skb);
ppp_xmit_process(ppp);
if (!ppp_xmit_process(ppp))
netif_stop_queue(dev);
return NETDEV_TX_OK;

outf:
Expand Down Expand Up @@ -1048,10 +1048,11 @@ static void ppp_setup(struct net_device *dev)
* Called to do any work queued up on the transmit side
* that can now be done.
*/
static void
static int
ppp_xmit_process(struct ppp *ppp)
{
struct sk_buff *skb;
int ret = 0;

ppp_xmit_lock(ppp);
if (!ppp->closing) {
Expand All @@ -1061,10 +1062,13 @@ ppp_xmit_process(struct ppp *ppp)
ppp_send_frame(ppp, skb);
/* If there's no work left to do, tell the core net
code that we can accept some more. */
if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq))
if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) {
netif_wake_queue(ppp->dev);
ret = 1;
}
}
ppp_xmit_unlock(ppp);
return ret;
}

static inline struct sk_buff *
Expand Down

0 comments on commit c649e23

Please sign in to comment.