mac80211: fix the sparse warnings on endian handling in RANN propagation
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Mon, 19 Mar 2012 13:38:46 +0000 (21:38 +0800)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 5 May 2012 15:36:10 +0000 (17:36 +0200)
The HWMP sequence number of received RANN element is compared to decide whether to be
propagated. The sequence number is required to covert from 32bit little endian data into
CPUs endianness for comparison. The same applies to the RANN metric.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index 216ac472f6014a980fee39c5d76aaa698d294275..592b67a1fb288fed8b009c5c6ac9b2b12d7172e1 100644 (file)
@@ -653,9 +653,9 @@ struct ieee80211_rann_ie {
        u8 rann_hopcount;
        u8 rann_ttl;
        u8 rann_addr[6];
-       u32 rann_seq;
-       u32 rann_interval;
-       u32 rann_metric;
+       __le32 rann_seq;
+       __le32 rann_interval;
+       __le32 rann_metric;
 } __attribute__ ((packed));
 
 enum ieee80211_rann_flags {