projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sched: Fix raciness in runqueue_is_locked()
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
include
/
net
/
dn.h
diff --git
a/include/net/dn.h
b/include/net/dn.h
index 627778384c84cff9583636abebdd3b210df0ad63..e5469f7b67a3b17d7916188a822348214120a81e 100644
(file)
--- a/
include/net/dn.h
+++ b/
include/net/dn.h
@@
-4,9
+4,7
@@
#include <linux/dn.h>
#include <net/sock.h>
#include <asm/byteorder.h>
#include <linux/dn.h>
#include <net/sock.h>
#include <asm/byteorder.h>
-
-#define dn_ntohs(x) le16_to_cpu(x)
-#define dn_htons(x) cpu_to_le16(x)
+#include <asm/unaligned.h>
struct dn_scp /* Session Control Port */
{
struct dn_scp /* Session Control Port */
{
@@
-175,7
+173,7
@@
struct dn_skb_cb {
static inline __le16 dn_eth2dn(unsigned char *ethaddr)
{
static inline __le16 dn_eth2dn(unsigned char *ethaddr)
{
- return
dn_htons(ethaddr[4] | (ethaddr[5] << 8
));
+ return
get_unaligned((__le16 *)(ethaddr + 4
));
}
static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr)
}
static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr)
@@
-185,7
+183,7
@@
static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr)
static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr)
{
static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr)
{
- __u16 a =
dn_ntohs
(addr);
+ __u16 a =
le16_to_cpu
(addr);
ethaddr[0] = 0xAA;
ethaddr[1] = 0x00;
ethaddr[2] = 0x04;
ethaddr[0] = 0xAA;
ethaddr[1] = 0x00;
ethaddr[2] = 0x04;