diff options
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp_generic.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ef58e4128782..6d596ca50cfd 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -88,8 +88,6 @@ struct ppp_file { | |||
88 | #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) | 88 | #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) |
89 | #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) | 89 | #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) |
90 | 90 | ||
91 | #define ROUNDUP(n, x) (((n) + (x) - 1) / (x)) | ||
92 | |||
93 | /* | 91 | /* |
94 | * Data structure describing one ppp unit. | 92 | * Data structure describing one ppp unit. |
95 | * A ppp unit corresponds to a ppp network interface device | 93 | * A ppp unit corresponds to a ppp network interface device |
@@ -1297,7 +1295,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1297 | */ | 1295 | */ |
1298 | fragsize = len; | 1296 | fragsize = len; |
1299 | if (nfree > 1) | 1297 | if (nfree > 1) |
1300 | fragsize = ROUNDUP(fragsize, nfree); | 1298 | fragsize = DIV_ROUND_UP(fragsize, nfree); |
1301 | /* nbigger channels get fragsize bytes, the rest get fragsize-1, | 1299 | /* nbigger channels get fragsize bytes, the rest get fragsize-1, |
1302 | except if nbigger==0, then they all get fragsize. */ | 1300 | except if nbigger==0, then they all get fragsize. */ |
1303 | nbigger = len % nfree; | 1301 | nbigger = len % nfree; |
@@ -1685,7 +1683,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1685 | skb_pull_rcsum(skb, 2); | 1683 | skb_pull_rcsum(skb, 2); |
1686 | skb->dev = ppp->dev; | 1684 | skb->dev = ppp->dev; |
1687 | skb->protocol = htons(npindex_to_ethertype[npi]); | 1685 | skb->protocol = htons(npindex_to_ethertype[npi]); |
1688 | skb->mac.raw = skb->data; | 1686 | skb_reset_mac_header(skb); |
1689 | netif_rx(skb); | 1687 | netif_rx(skb); |
1690 | ppp->dev->last_rx = jiffies; | 1688 | ppp->dev->last_rx = jiffies; |
1691 | } | 1689 | } |