diff options
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 24 |
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 | } |