diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-25 18:10:12 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-25 18:10:12 -0800 |
commit | e74b3f7d568a62d21a76885438d7351948e7355a (patch) | |
tree | e9a25a16392ec2d3933de938f68331e072baeb9a /drivers/net/wan/hdlc_ppp.c | |
parent | 13e620e0e6c609ccc9882ea280f4f077500d51a0 (diff) | |
parent | 59f8500efb05096484a55263109acab6a6df89d5 (diff) |
Merge branch 'for-david' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
Diffstat (limited to 'drivers/net/wan/hdlc_ppp.c')
-rw-r--r-- | drivers/net/wan/hdlc_ppp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 72fae217f1c4..57fe714c1c7f 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -303,7 +303,7 @@ static int cp_table[EVENTS][STATES] = { STA: RTR must supply id SCJ: RUC must supply CP packet len and data */ static void ppp_cp_event(struct net_device *dev, u16 pid, u16 event, u8 code, - u8 id, unsigned int len, void *data) + u8 id, unsigned int len, const void *data) { int old_state, action; struct ppp *ppp = get_ppp(dev); @@ -374,11 +374,12 @@ static void ppp_cp_event(struct net_device *dev, u16 pid, u16 event, u8 code, static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id, - unsigned int len, u8 *data) + unsigned int req_len, const u8 *data) { static u8 const valid_accm[6] = { LCP_OPTION_ACCM, 6, 0, 0, 0, 0 }; - u8 *opt, *out; - unsigned int nak_len = 0, rej_len = 0; + const u8 *opt; + u8 *out; + unsigned int len = req_len, nak_len = 0, rej_len = 0; if (!(out = kmalloc(len, GFP_ATOMIC))) { dev->stats.rx_dropped++; @@ -423,7 +424,7 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id, else if (nak_len) ppp_cp_event(dev, pid, RCR_BAD, CP_CONF_NAK, id, nak_len, out); else - ppp_cp_event(dev, pid, RCR_GOOD, CP_CONF_ACK, id, len, data); + ppp_cp_event(dev, pid, RCR_GOOD, CP_CONF_ACK, id, req_len, data); kfree(out); } |