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>
This commit is contained in:
Chun-Yeow Yeoh
2012-06-14 02:06:07 +08:00
committed by Johannes Berg
parent ac1073a61d
commit a69cc44fe9
3 changed files with 74 additions and 5 deletions

View File

@@ -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