diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/Kconfig | 2 | ||||
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 24 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 5 |
3 files changed, 16 insertions, 15 deletions
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 5ca576e77615..3c3f62faae1e 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig | |||
@@ -83,7 +83,7 @@ endmenu | |||
83 | 83 | ||
84 | config MAC80211_MESH | 84 | config MAC80211_MESH |
85 | bool "Enable mac80211 mesh networking (pre-802.11s) support" | 85 | bool "Enable mac80211 mesh networking (pre-802.11s) support" |
86 | depends on MAC80211 && EXPERIMENTAL && BROKEN | 86 | depends on MAC80211 && EXPERIMENTAL |
87 | ---help--- | 87 | ---help--- |
88 | This options enables support of Draft 802.11s mesh networking. | 88 | This options enables support of Draft 802.11s mesh networking. |
89 | The implementation is based on Draft 1.08 of the Mesh Networking | 89 | The implementation is based on Draft 1.08 of the Mesh Networking |
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 | } |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 7f02ae8abe90..307c90e61df6 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -85,7 +85,8 @@ void mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata) | |||
85 | static inline void mesh_plink_fsm_restart(struct sta_info *sta) | 85 | static inline void mesh_plink_fsm_restart(struct sta_info *sta) |
86 | { | 86 | { |
87 | sta->plink_state = LISTEN; | 87 | sta->plink_state = LISTEN; |
88 | sta->llid = sta->plid = sta->reason = sta->plink_retries = 0; | 88 | sta->llid = sta->plid = sta->reason = 0; |
89 | sta->plink_retries = 0; | ||
89 | } | 90 | } |
90 | 91 | ||
91 | static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, | 92 | static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, |
@@ -373,7 +374,7 @@ void mesh_plink_block(struct sta_info *sta) | |||
373 | int mesh_plink_close(struct sta_info *sta) | 374 | int mesh_plink_close(struct sta_info *sta) |
374 | { | 375 | { |
375 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 376 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
376 | int llid, plid, reason; | 377 | __le16 llid, plid, reason; |
377 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | 378 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG |
378 | DECLARE_MAC_BUF(mac); | 379 | DECLARE_MAC_BUF(mac); |
379 | #endif | 380 | #endif |