aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_hwmp.c
diff options
context:
space:
mode:
authorLuis Carlos Cobo <luisca@cozybit.com>2008-02-29 15:13:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 16:40:48 -0500
commit37659ff8e1d8d1f9c86bdb974d41479ccd001213 (patch)
treee7ceaebd97f6619064040e19086bc838f63f24c4 /net/mac80211/mesh_hwmp.c
parent96c46546e28282a743b97f26e94c7565350898b7 (diff)
mac80211: fix mesh endianness sparse warnings and unmark it as broken
This patch fixes all the mesh related endianness warnings reported by sparse. As they were the reason why Johannes marked mesh as BROKEN, that flag has been removed. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r--net/mac80211/mesh_hwmp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index d8530fe7a0b3..3ee46e43ead9 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -30,16 +30,16 @@
30#define PREQ_IE_FLAGS(x) (*(x)) 30#define PREQ_IE_FLAGS(x) (*(x))
31#define PREQ_IE_HOPCOUNT(x) (*(x + 1)) 31#define PREQ_IE_HOPCOUNT(x) (*(x + 1))
32#define PREQ_IE_TTL(x) (*(x + 2)) 32#define PREQ_IE_TTL(x) (*(x + 2))
33#define PREQ_IE_PREQ_ID(x) le32_to_cpu(*((u32 *) (x + 3))) 33#define PREQ_IE_PREQ_ID(x) le32_to_cpu(*((__le32 *) (x + 3)))
34#define PREQ_IE_ORIG_ADDR(x) (x + 7) 34#define PREQ_IE_ORIG_ADDR(x) (x + 7)
35#define PREQ_IE_ORIG_DSN(x) le32_to_cpu(*((u32 *) (x + 13))) 35#define PREQ_IE_ORIG_DSN(x) le32_to_cpu(*((__le32 *) (x + 13)))
36#define PREQ_IE_LIFETIME(x) le32_to_cpu(*((u32 *) \ 36#define PREQ_IE_LIFETIME(x) le32_to_cpu(*((__le32 *) \
37 (AE_F_SET(x) ? x + 23 : x + 17))) 37 (AE_F_SET(x) ? x + 23 : x + 17)))
38#define PREQ_IE_METRIC(x) le32_to_cpu(*((u32 *) \ 38#define PREQ_IE_METRIC(x) le32_to_cpu(*((__le32 *) \
39 (AE_F_SET(x) ? x + 27 : x + 21))) 39 (AE_F_SET(x) ? x + 27 : x + 21)))
40#define PREQ_IE_DST_F(x) (*(AE_F_SET(x) ? x + 32 : x + 26)) 40#define PREQ_IE_DST_F(x) (*(AE_F_SET(x) ? x + 32 : x + 26))
41#define PREQ_IE_DST_ADDR(x) (AE_F_SET(x) ? x + 33 : x + 27) 41#define PREQ_IE_DST_ADDR(x) (AE_F_SET(x) ? x + 33 : x + 27)
42#define PREQ_IE_DST_DSN(x) le32_to_cpu(*((u32 *) \ 42#define PREQ_IE_DST_DSN(x) le32_to_cpu(*((__le32 *) \
43 (AE_F_SET(x) ? x + 39 : x + 33))) 43 (AE_F_SET(x) ? x + 39 : x + 33)))
44 44
45 45
@@ -47,17 +47,17 @@
47#define PREP_IE_HOPCOUNT(x) PREQ_IE_HOPCOUNT(x) 47#define PREP_IE_HOPCOUNT(x) PREQ_IE_HOPCOUNT(x)
48#define PREP_IE_TTL(x) PREQ_IE_TTL(x) 48#define PREP_IE_TTL(x) PREQ_IE_TTL(x)
49#define PREP_IE_ORIG_ADDR(x) (x + 3) 49#define PREP_IE_ORIG_ADDR(x) (x + 3)
50#define PREP_IE_ORIG_DSN(x) le32_to_cpu(*((u32 *) (x + 9))) 50#define PREP_IE_ORIG_DSN(x) le32_to_cpu(*((__le32 *) (x + 9)))
51#define PREP_IE_LIFETIME(x) le32_to_cpu(*((u32 *) \ 51#define PREP_IE_LIFETIME(x) le32_to_cpu(*((__le32 *) \
52 (AE_F_SET(x) ? x + 19 : x + 13))) 52 (AE_F_SET(x) ? x + 19 : x + 13)))
53#define PREP_IE_METRIC(x) le32_to_cpu(*((u32 *) \ 53#define PREP_IE_METRIC(x) le32_to_cpu(*((__le32 *) \
54 (AE_F_SET(x) ? x + 23 : x + 17))) 54 (AE_F_SET(x) ? x + 23 : x + 17)))
55#define PREP_IE_DST_ADDR(x) (AE_F_SET(x) ? x + 27 : x + 21) 55#define PREP_IE_DST_ADDR(x) (AE_F_SET(x) ? x + 27 : x + 21)
56#define PREP_IE_DST_DSN(x) le32_to_cpu(*((u32 *) \ 56#define PREP_IE_DST_DSN(x) le32_to_cpu(*((__le32 *) \
57 (AE_F_SET(x) ? x + 33 : x + 27))) 57 (AE_F_SET(x) ? x + 33 : x + 27)))
58 58
59#define PERR_IE_DST_ADDR(x) (x + 2) 59#define PERR_IE_DST_ADDR(x) (x + 2)
60#define PERR_IE_DST_DSN(x) le32_to_cpu(*((u32 *) (x + 8))) 60#define PERR_IE_DST_DSN(x) le32_to_cpu(*((__le32 *) (x + 8)))
61 61
62#define TU_TO_EXP_TIME(x) (jiffies + msecs_to_jiffies(x * 1024 / 1000)) 62#define TU_TO_EXP_TIME(x) (jiffies + msecs_to_jiffies(x * 1024 / 1000))
63#define MSEC_TO_TU(x) (x*1000/1024) 63#define MSEC_TO_TU(x) (x*1000/1024)
@@ -566,8 +566,8 @@ static void hwmp_perr_frame_process(struct net_device *dev,
566 mpath->flags &= ~MESH_PATH_ACTIVE; 566 mpath->flags &= ~MESH_PATH_ACTIVE;
567 mpath->dsn = dst_dsn; 567 mpath->dsn = dst_dsn;
568 spin_unlock_bh(&mpath->state_lock); 568 spin_unlock_bh(&mpath->state_lock);
569 mesh_path_error_tx(dst_addr, dst_dsn, dev->broadcast, 569 mesh_path_error_tx(dst_addr, __cpu_to_le32(dst_dsn),
570 dev); 570 dev->broadcast, dev);
571 } else 571 } else
572 spin_unlock_bh(&mpath->state_lock); 572 spin_unlock_bh(&mpath->state_lock);
573 } 573 }