aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_hwmp.c
diff options
context:
space:
mode:
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>2012-06-13 14:06:10 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-18 07:55:15 -0400
commit728b19e5fb9bbebbd580784a092b786fe379ed8e (patch)
tree0b9fc795ed4063bf6a807769bebc5d115ec15313 /net/mac80211/mesh_hwmp.c
parentdbb912cd4ce64e763c5610b49a85529d2634e9d8 (diff)
{nl,cfg,mac}80211: implement dot11MeshHWMPconfirmationInterval
As defined in section 13.10.9.3 Case D (802.11-2012), this control variable is used to limit the mesh STA to send only one PREQ to a root mesh STA within this interval of time (in TUs). The default value for this variable is set to 2000 TUs. However, for current implementation, the maximum configurable of dot11MeshHWMPconfirmationInterval is restricted by dot11MeshHWMPactivePathTimeout. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [line-break commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r--net/mac80211/mesh_hwmp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 35e3acbe2262..bea52479e3aa 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -98,6 +98,8 @@ static inline u32 u16_field_get(u8 *preq_elem, int offset, bool ae)
98#define max_preq_retries(s) (s->u.mesh.mshcfg.dot11MeshHWMPmaxPREQretries) 98#define max_preq_retries(s) (s->u.mesh.mshcfg.dot11MeshHWMPmaxPREQretries)
99#define disc_timeout_jiff(s) \ 99#define disc_timeout_jiff(s) \
100 msecs_to_jiffies(sdata->u.mesh.mshcfg.min_discovery_timeout) 100 msecs_to_jiffies(sdata->u.mesh.mshcfg.min_discovery_timeout)
101#define root_path_confirmation_jiffies(s) \
102 msecs_to_jiffies(sdata->u.mesh.mshcfg.dot11MeshHWMPconfirmationInterval)
101 103
102enum mpath_frame_type { 104enum mpath_frame_type {
103 MPATH_PREQ = 0, 105 MPATH_PREQ = 0,
@@ -811,11 +813,14 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
811 } 813 }
812 814
813 if ((!(mpath->flags & (MESH_PATH_ACTIVE | MESH_PATH_RESOLVING)) || 815 if ((!(mpath->flags & (MESH_PATH_ACTIVE | MESH_PATH_RESOLVING)) ||
814 time_after(jiffies, mpath->exp_time - 1*HZ)) && 816 (time_after(jiffies, mpath->last_preq_to_root +
817 root_path_confirmation_jiffies(sdata)) ||
818 time_before(jiffies, mpath->last_preq_to_root))) &&
815 !(mpath->flags & MESH_PATH_FIXED)) { 819 !(mpath->flags & MESH_PATH_FIXED)) {
816 mhwmp_dbg("%s time to refresh root mpath %pM", sdata->name, 820 mhwmp_dbg("%s time to refresh root mpath %pM", sdata->name,
817 orig_addr); 821 orig_addr);
818 mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH); 822 mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH);
823 mpath->last_preq_to_root = jiffies;
819 } 824 }
820 825
821 if ((SN_LT(mpath->sn, orig_sn) || (mpath->sn == orig_sn && 826 if ((SN_LT(mpath->sn, orig_sn) || (mpath->sn == orig_sn &&