summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_hwmp.c
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-08-09 16:45:10 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-08-24 13:59:43 -0400
commit0507e159a2b590666982b53ecf6fb2843a5bb423 (patch)
treea5c0aefae3ea789fb1b0ef9019372e534b93aecc /net/mac80211/mesh_hwmp.c
parent699403dbd41998a56d1d92d612ac261e5085a99f (diff)
downloadop-kernel-dev-0507e159a2b590666982b53ecf6fb2843a5bb423.zip
op-kernel-dev-0507e159a2b590666982b53ecf6fb2843a5bb423.tar.gz
{nl,cfg,mac}80211: let userspace set RANN interval
Allow userspace to set Root Announcement Interval for our mesh interface. Also, RANN interval is now in proper units of TUs. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r--net/mac80211/mesh_hwmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 7b517c4..ae3de75 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -695,7 +695,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
u8 ttl, flags, hopcount;
u8 *orig_addr;
u32 orig_sn, metric;
- u32 interval = cpu_to_le32(IEEE80211_MESH_RANN_INTERVAL);
+ u32 interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval;
bool root_is_gate;
ttl = rann->rann_ttl;
@@ -743,7 +743,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr,
cpu_to_le32(orig_sn),
0, NULL, 0, broadcast_addr,
- hopcount, ttl, interval,
+ hopcount, ttl, cpu_to_le32(interval),
cpu_to_le32(metric + mpath->metric),
0, sdata);
mpath->sn = orig_sn;
@@ -1044,11 +1044,11 @@ void
mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
- u32 interval = cpu_to_le32(IEEE80211_MESH_RANN_INTERVAL);
+ u32 interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval;
mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->vif.addr,
cpu_to_le32(++ifmsh->sn),
0, NULL, 0, broadcast_addr,
0, sdata->u.mesh.mshcfg.element_ttl,
- interval, 0, 0, sdata);
+ cpu_to_le32(interval), 0, 0, sdata);
}
OpenPOWER on IntegriCloud