diff options
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp_generic.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ab726ab43798..a32668e88e09 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1237,8 +1237,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1237 | pch = list_entry(list, struct channel, clist); | 1237 | pch = list_entry(list, struct channel, clist); |
1238 | navail += pch->avail = (pch->chan != NULL); | 1238 | navail += pch->avail = (pch->chan != NULL); |
1239 | if (pch->avail) { | 1239 | if (pch->avail) { |
1240 | if (skb_queue_len(&pch->file.xq) == 0 | 1240 | if (skb_queue_empty(&pch->file.xq) || |
1241 | || !pch->had_frag) { | 1241 | !pch->had_frag) { |
1242 | pch->avail = 2; | 1242 | pch->avail = 2; |
1243 | ++nfree; | 1243 | ++nfree; |
1244 | } | 1244 | } |
@@ -1374,8 +1374,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1374 | 1374 | ||
1375 | /* try to send it down the channel */ | 1375 | /* try to send it down the channel */ |
1376 | chan = pch->chan; | 1376 | chan = pch->chan; |
1377 | if (skb_queue_len(&pch->file.xq) | 1377 | if (!skb_queue_empty(&pch->file.xq) || |
1378 | || !chan->ops->start_xmit(chan, frag)) | 1378 | !chan->ops->start_xmit(chan, frag)) |
1379 | skb_queue_tail(&pch->file.xq, frag); | 1379 | skb_queue_tail(&pch->file.xq, frag); |
1380 | pch->had_frag = 1; | 1380 | pch->had_frag = 1; |
1381 | p += flen; | 1381 | p += flen; |
@@ -1412,7 +1412,7 @@ ppp_channel_push(struct channel *pch) | |||
1412 | 1412 | ||
1413 | spin_lock_bh(&pch->downl); | 1413 | spin_lock_bh(&pch->downl); |
1414 | if (pch->chan != 0) { | 1414 | if (pch->chan != 0) { |
1415 | while (skb_queue_len(&pch->file.xq) > 0) { | 1415 | while (!skb_queue_empty(&pch->file.xq)) { |
1416 | skb = skb_dequeue(&pch->file.xq); | 1416 | skb = skb_dequeue(&pch->file.xq); |
1417 | if (!pch->chan->ops->start_xmit(pch->chan, skb)) { | 1417 | if (!pch->chan->ops->start_xmit(pch->chan, skb)) { |
1418 | /* put the packet back and try again later */ | 1418 | /* put the packet back and try again later */ |
@@ -1426,7 +1426,7 @@ ppp_channel_push(struct channel *pch) | |||
1426 | } | 1426 | } |
1427 | spin_unlock_bh(&pch->downl); | 1427 | spin_unlock_bh(&pch->downl); |
1428 | /* see if there is anything from the attached unit to be sent */ | 1428 | /* see if there is anything from the attached unit to be sent */ |
1429 | if (skb_queue_len(&pch->file.xq) == 0) { | 1429 | if (skb_queue_empty(&pch->file.xq)) { |
1430 | read_lock_bh(&pch->upl); | 1430 | read_lock_bh(&pch->upl); |
1431 | ppp = pch->ppp; | 1431 | ppp = pch->ppp; |
1432 | if (ppp != 0) | 1432 | if (ppp != 0) |