diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /include/net/dn.h | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'include/net/dn.h')
-rw-r--r-- | include/net/dn.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/net/dn.h b/include/net/dn.h index 627778384c84..e5469f7b67a3 100644 --- a/include/net/dn.h +++ b/include/net/dn.h | |||
@@ -4,9 +4,7 @@ | |||
4 | #include <linux/dn.h> | 4 | #include <linux/dn.h> |
5 | #include <net/sock.h> | 5 | #include <net/sock.h> |
6 | #include <asm/byteorder.h> | 6 | #include <asm/byteorder.h> |
7 | 7 | #include <asm/unaligned.h> | |
8 | #define dn_ntohs(x) le16_to_cpu(x) | ||
9 | #define dn_htons(x) cpu_to_le16(x) | ||
10 | 8 | ||
11 | struct dn_scp /* Session Control Port */ | 9 | struct dn_scp /* Session Control Port */ |
12 | { | 10 | { |
@@ -175,7 +173,7 @@ struct dn_skb_cb { | |||
175 | 173 | ||
176 | static inline __le16 dn_eth2dn(unsigned char *ethaddr) | 174 | static inline __le16 dn_eth2dn(unsigned char *ethaddr) |
177 | { | 175 | { |
178 | return dn_htons(ethaddr[4] | (ethaddr[5] << 8)); | 176 | return get_unaligned((__le16 *)(ethaddr + 4)); |
179 | } | 177 | } |
180 | 178 | ||
181 | static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr) | 179 | static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr) |
@@ -185,7 +183,7 @@ static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr) | |||
185 | 183 | ||
186 | static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr) | 184 | static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr) |
187 | { | 185 | { |
188 | __u16 a = dn_ntohs(addr); | 186 | __u16 a = le16_to_cpu(addr); |
189 | ethaddr[0] = 0xAA; | 187 | ethaddr[0] = 0xAA; |
190 | ethaddr[1] = 0x00; | 188 | ethaddr[1] = 0x00; |
191 | ethaddr[2] = 0x04; | 189 | ethaddr[2] = 0x04; |