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:

committed by
Johannes Berg

parent
ac1073a61d
commit
a69cc44fe9
@@ -1154,13 +1154,34 @@ mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata)
|
||||
{
|
||||
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
u32 interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval;
|
||||
u8 flags;
|
||||
u8 flags, target_flags = 0;
|
||||
|
||||
flags = (ifmsh->mshcfg.dot11MeshGateAnnouncementProtocol)
|
||||
? RANN_FLAG_IS_GATE : 0;
|
||||
mesh_path_sel_frame_tx(MPATH_RANN, flags, sdata->vif.addr,
|
||||
|
||||
switch (ifmsh->mshcfg.dot11MeshHWMPRootMode) {
|
||||
case IEEE80211_PROACTIVE_RANN:
|
||||
mesh_path_sel_frame_tx(MPATH_RANN, flags, sdata->vif.addr,
|
||||
cpu_to_le32(++ifmsh->sn),
|
||||
0, NULL, 0, broadcast_addr,
|
||||
0, sdata->u.mesh.mshcfg.element_ttl,
|
||||
0, ifmsh->mshcfg.element_ttl,
|
||||
cpu_to_le32(interval), 0, 0, sdata);
|
||||
break;
|
||||
case IEEE80211_PROACTIVE_PREQ_WITH_PREP:
|
||||
flags |= IEEE80211_PREQ_PROACTIVE_PREP_FLAG;
|
||||
case IEEE80211_PROACTIVE_PREQ_NO_PREP:
|
||||
interval = ifmsh->mshcfg.dot11MeshHWMPactivePathToRootTimeout;
|
||||
target_flags |= IEEE80211_PREQ_TO_FLAG |
|
||||
IEEE80211_PREQ_USN_FLAG;
|
||||
mesh_path_sel_frame_tx(MPATH_PREQ, flags, sdata->vif.addr,
|
||||
cpu_to_le32(++ifmsh->sn), target_flags,
|
||||
(u8 *) broadcast_addr, 0, broadcast_addr,
|
||||
0, ifmsh->mshcfg.element_ttl,
|
||||
cpu_to_le32(interval),
|
||||
0, cpu_to_le32(ifmsh->preq_id++), sdata);
|
||||
break;
|
||||
default:
|
||||
mhwmp_dbg("Proactive mechanism not supported");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user