diff options
author | Javier Cardona <javier@cozybit.com> | 2011-08-09 19:45:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-24 13:59:43 -0400 |
commit | 0507e159a2b590666982b53ecf6fb2843a5bb423 (patch) | |
tree | a5c0aefae3ea789fb1b0ef9019372e534b93aecc /net/mac80211/mesh_hwmp.c | |
parent | 699403dbd41998a56d1d92d612ac261e5085a99f (diff) |
{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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 7b517c46100d..ae3de755fada 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, | |||
695 | u8 ttl, flags, hopcount; | 695 | u8 ttl, flags, hopcount; |
696 | u8 *orig_addr; | 696 | u8 *orig_addr; |
697 | u32 orig_sn, metric; | 697 | u32 orig_sn, metric; |
698 | u32 interval = cpu_to_le32(IEEE80211_MESH_RANN_INTERVAL); | 698 | u32 interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval; |
699 | bool root_is_gate; | 699 | bool root_is_gate; |
700 | 700 | ||
701 | ttl = rann->rann_ttl; | 701 | ttl = rann->rann_ttl; |
@@ -743,7 +743,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, | |||
743 | mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, | 743 | mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, |
744 | cpu_to_le32(orig_sn), | 744 | cpu_to_le32(orig_sn), |
745 | 0, NULL, 0, broadcast_addr, | 745 | 0, NULL, 0, broadcast_addr, |
746 | hopcount, ttl, interval, | 746 | hopcount, ttl, cpu_to_le32(interval), |
747 | cpu_to_le32(metric + mpath->metric), | 747 | cpu_to_le32(metric + mpath->metric), |
748 | 0, sdata); | 748 | 0, sdata); |
749 | mpath->sn = orig_sn; | 749 | mpath->sn = orig_sn; |
@@ -1044,11 +1044,11 @@ void | |||
1044 | mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata) | 1044 | mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata) |
1045 | { | 1045 | { |
1046 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 1046 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
1047 | u32 interval = cpu_to_le32(IEEE80211_MESH_RANN_INTERVAL); | 1047 | u32 interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval; |
1048 | 1048 | ||
1049 | mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->vif.addr, | 1049 | mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->vif.addr, |
1050 | cpu_to_le32(++ifmsh->sn), | 1050 | cpu_to_le32(++ifmsh->sn), |
1051 | 0, NULL, 0, broadcast_addr, | 1051 | 0, NULL, 0, broadcast_addr, |
1052 | 0, sdata->u.mesh.mshcfg.element_ttl, | 1052 | 0, sdata->u.mesh.mshcfg.element_ttl, |
1053 | interval, 0, 0, sdata); | 1053 | cpu_to_le32(interval), 0, 0, sdata); |
1054 | } | 1054 | } |