Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122888
b: refs/heads/master
c: 93bc933
h: refs/heads/master
v: v3
  • Loading branch information
Krzysztof Hałasa committed Dec 22, 2008
1 parent 85b4a1a commit f3969f5
Show file tree
Hide file tree
Showing 2 changed files with 7 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: e6da96ace859dad966fe85cc9552b89f48bbc930
refs/heads/master: 93bc933524d05e3b391358e24b3666599f8ec026
11 changes: 6 additions & 5 deletions trunk/drivers/net/wan/hdlc_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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++;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f3969f5

Please sign in to comment.