aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh_hwmp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 2b18053070c1..3460108810d5 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -57,29 +57,29 @@ static inline u32 u16_field_get(u8 *preq_elem, int offset, bool ae)
57#define PREQ_IE_TTL(x) (*(x + 2)) 57#define PREQ_IE_TTL(x) (*(x + 2))
58#define PREQ_IE_PREQ_ID(x) u32_field_get(x, 3, 0) 58#define PREQ_IE_PREQ_ID(x) u32_field_get(x, 3, 0)
59#define PREQ_IE_ORIG_ADDR(x) (x + 7) 59#define PREQ_IE_ORIG_ADDR(x) (x + 7)
60#define PREQ_IE_ORIG_SN(x) u32_field_get(x, 13, 0); 60#define PREQ_IE_ORIG_SN(x) u32_field_get(x, 13, 0)
61#define PREQ_IE_LIFETIME(x) u32_field_get(x, 17, AE_F_SET(x)); 61#define PREQ_IE_LIFETIME(x) u32_field_get(x, 17, AE_F_SET(x))
62#define PREQ_IE_METRIC(x) u32_field_get(x, 21, AE_F_SET(x)); 62#define PREQ_IE_METRIC(x) u32_field_get(x, 21, AE_F_SET(x))
63#define PREQ_IE_TARGET_F(x) (*(AE_F_SET(x) ? x + 32 : x + 26)) 63#define PREQ_IE_TARGET_F(x) (*(AE_F_SET(x) ? x + 32 : x + 26))
64#define PREQ_IE_TARGET_ADDR(x) (AE_F_SET(x) ? x + 33 : x + 27) 64#define PREQ_IE_TARGET_ADDR(x) (AE_F_SET(x) ? x + 33 : x + 27)
65#define PREQ_IE_TARGET_SN(x) u32_field_get(x, 33, AE_F_SET(x)); 65#define PREQ_IE_TARGET_SN(x) u32_field_get(x, 33, AE_F_SET(x))
66 66
67 67
68#define PREP_IE_FLAGS(x) PREQ_IE_FLAGS(x) 68#define PREP_IE_FLAGS(x) PREQ_IE_FLAGS(x)
69#define PREP_IE_HOPCOUNT(x) PREQ_IE_HOPCOUNT(x) 69#define PREP_IE_HOPCOUNT(x) PREQ_IE_HOPCOUNT(x)
70#define PREP_IE_TTL(x) PREQ_IE_TTL(x) 70#define PREP_IE_TTL(x) PREQ_IE_TTL(x)
71#define PREP_IE_ORIG_ADDR(x) (x + 3) 71#define PREP_IE_ORIG_ADDR(x) (x + 3)
72#define PREP_IE_ORIG_SN(x) u32_field_get(x, 9, 0); 72#define PREP_IE_ORIG_SN(x) u32_field_get(x, 9, 0)
73#define PREP_IE_LIFETIME(x) u32_field_get(x, 13, AE_F_SET(x)); 73#define PREP_IE_LIFETIME(x) u32_field_get(x, 13, AE_F_SET(x))
74#define PREP_IE_METRIC(x) u32_field_get(x, 17, AE_F_SET(x)); 74#define PREP_IE_METRIC(x) u32_field_get(x, 17, AE_F_SET(x))
75#define PREP_IE_TARGET_ADDR(x) (AE_F_SET(x) ? x + 27 : x + 21) 75#define PREP_IE_TARGET_ADDR(x) (AE_F_SET(x) ? x + 27 : x + 21)
76#define PREP_IE_TARGET_SN(x) u32_field_get(x, 27, AE_F_SET(x)); 76#define PREP_IE_TARGET_SN(x) u32_field_get(x, 27, AE_F_SET(x))
77 77
78#define PERR_IE_TTL(x) (*(x)) 78#define PERR_IE_TTL(x) (*(x))
79#define PERR_IE_TARGET_FLAGS(x) (*(x + 2)) 79#define PERR_IE_TARGET_FLAGS(x) (*(x + 2))
80#define PERR_IE_TARGET_ADDR(x) (x + 3) 80#define PERR_IE_TARGET_ADDR(x) (x + 3)
81#define PERR_IE_TARGET_SN(x) u32_field_get(x, 9, 0); 81#define PERR_IE_TARGET_SN(x) u32_field_get(x, 9, 0)
82#define PERR_IE_TARGET_RCODE(x) u16_field_get(x, 13, 0); 82#define PERR_IE_TARGET_RCODE(x) u16_field_get(x, 13, 0)
83 83
84#define MSEC_TO_TU(x) (x*1000/1024) 84#define MSEC_TO_TU(x) (x*1000/1024)
85#define SN_GT(x, y) ((long) (y) - (long) (x) < 0) 85#define SN_GT(x, y) ((long) (y) - (long) (x) < 0)