diff options
author | Chun-Yeow Yeoh <yeohchunyeow@gmail.com> | 2012-06-14 02:06:07 +0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-14 09:08:56 +0200 |
commit | a69cc44fe9ebb806c5f3f8bd83fb4a50ca63647b (patch) | |
tree | 47ff88c0dacb8144719a4b6939ed49a5549b52b8 /net/mac80211/mesh.c | |
parent | ac1073a61d73b6277794d2efc872eb7e1b706b5c (diff) | |
download | blackbird-op-linux-a69cc44fe9ebb806c5f3f8bd83fb4a50ca63647b.tar.gz blackbird-op-linux-a69cc44fe9ebb806c5f3f8bd83fb4a50ca63647b.zip |
mac80211: implement the proactive PREQ generation
Generate the proactive PREQ element as defined in
Sec. 13.10.9.3 (Case C) of IEEE Std. 802.11-2012
based on the selection of dot11MeshHWMPRootMode as follow:
dot11MeshHWMPRootMode (2) is proactivePREQnoPREP
dot11MeshHWMPRootMode (3) is proactivePREQwithPREP
The proactive PREQ is generated based on the interval
defined by dot11MeshHWMProotInterval.
With this change, proactive RANN element is now generated
if the dot11MeshHWMPRootMode is set to (4) instead of (1).
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.c')
-rw-r--r-- | net/mac80211/mesh.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 7cf19509fb68..6bff3c4d17dd 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -541,11 +541,17 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata, static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata) { struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; + u32 interval; mesh_path_tx_root_frame(sdata); + + if (ifmsh->mshcfg.dot11MeshHWMPRootMode == IEEE80211_PROACTIVE_RANN) + interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval; + else + interval = ifmsh->mshcfg.dot11MeshHWMProotInterval; + mod_timer(&ifmsh->mesh_path_root_timer, - round_jiffies(TU_TO_EXP_TIME( - ifmsh->mshcfg.dot11MeshHWMPRannInterval))); + round_jiffies(TU_TO_EXP_TIME(interval))); } #ifdef CONFIG_PM |