[DECnet]: Endian annotation and fixes for DECnet.
The typedef for dn_address has been removed in favour of using __le16
or __u16 directly as appropriate. All the DECnet header files are
updated accordingly.
The byte ordering of dn_eth2dn() and dn_dn2eth() are both changed
since just about all their callers wanted network order rather than
host order, so the conversion is now done in the functions themselves.
Several missed endianess conversions have been picked up during the
conversion process. The nh_gw field in struct dn_fib_info has been
changed from a 32 bit field to 16 bits as it ought to be.
One or two cases of using htons rather than dn_htons in the routing
code have been found and fixed.
There are still a few warnings to fix, but this patch deals with the
important cases.
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 5122da3..76f957e 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -71,12 +71,12 @@
struct dn_route *rt_next;
} u;
- __u16 rt_saddr;
- __u16 rt_daddr;
- __u16 rt_gateway;
- __u16 rt_local_src; /* Source used for forwarding packets */
- __u16 rt_src_map;
- __u16 rt_dst_map;
+ __le16 rt_saddr;
+ __le16 rt_daddr;
+ __le16 rt_gateway;
+ __le16 rt_local_src; /* Source used for forwarding packets */
+ __le16 rt_src_map;
+ __le16 rt_dst_map;
unsigned rt_flags;
unsigned rt_type;