Skip to content

Commit

Permalink
mac80211: expire mesh peers based on mesh configuration
Browse files Browse the repository at this point in the history
The time it takes to see the peer link expire may differ
by a minute since sta_expire() is run once a minute as a
mesh housekeeping task.

Signed-off-by: Colleen Twitty <colleen@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Colleen Twitty authored and Johannes Berg committed Jun 11, 2013
1 parent 8e7c053 commit 66de671
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,8 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
if (_chg_mesh_attr(NL80211_MESHCONF_AWAKE_WINDOW, mask))
conf->dot11MeshAwakeWindowDuration =
nconf->dot11MeshAwakeWindowDuration;
if (_chg_mesh_attr(NL80211_MESHCONF_PLINK_TIMEOUT, mask))
conf->plink_timeout = nconf->plink_timeout;
ieee80211_mbss_info_change_notify(sdata, BSS_CHANGED_BEACON);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata)
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
u32 changed;

ieee80211_sta_expire(sdata, IEEE80211_MESH_PEER_INACTIVITY_LIMIT);
ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ);
mesh_path_expire(sdata);

changed = mesh_accept_plinks_update(sdata);
Expand Down
1 change: 0 additions & 1 deletion net/mac80211/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ struct mesh_rmc {
u32 idx_mask;
};

#define IEEE80211_MESH_PEER_INACTIVITY_LIMIT (1800 * HZ)
#define IEEE80211_MESH_HOUSEKEEPING_INTERVAL (60 * HZ)

#define MESH_PATH_EXPIRE (600 * HZ)
Expand Down

0 comments on commit 66de671

Please sign in to comment.