diff options
author | Changli Gao <xiaosuo@gmail.com> | 2011-01-06 08:37:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-10 19:13:33 -0500 |
commit | 96545aeb7b4457594d764af4d689a738e97f14b8 (patch) | |
tree | f916a4b5e95a336db645ab725a4301cc0d71001a /drivers/net/ppp_synctty.c | |
parent | d7b92affba524e0ca848a5ab60649fb91190d9b5 (diff) |
net: ppp: use {get,put}_unaligned_be{16,32}
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Reviewed-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp_synctty.c')
-rw-r--r-- | drivers/net/ppp_synctty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index 4c95ec3fb8d4..4e6b72f57de8 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/completion.h> | 45 | #include <linux/completion.h> |
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/slab.h> | 47 | #include <linux/slab.h> |
48 | #include <asm/unaligned.h> | ||
48 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
49 | 50 | ||
50 | #define PPP_VERSION "2.4.2" | 51 | #define PPP_VERSION "2.4.2" |
@@ -563,7 +564,7 @@ ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb) | |||
563 | int islcp; | 564 | int islcp; |
564 | 565 | ||
565 | data = skb->data; | 566 | data = skb->data; |
566 | proto = (data[0] << 8) + data[1]; | 567 | proto = get_unaligned_be16(data); |
567 | 568 | ||
568 | /* LCP packets with codes between 1 (configure-request) | 569 | /* LCP packets with codes between 1 (configure-request) |
569 | * and 7 (code-reject) must be sent as though no options | 570 | * and 7 (code-reject) must be sent as though no options |