From c613366113c8956ee869e12558099927586785bb Mon Sep 17 00:00:00 2001 From: Thomas Pedersen Date: Thu, 25 Aug 2011 10:36:14 -0700 Subject: mac80211: mesh gate fixes Since a v1 of the mesh gate series was accidentally applied, this patch contains the changes in v2. These are: - automatically make mesh gate a root node. - use TU_TO_EXP_TIME macro. - initialize timer instead of checking for NULL timer function. - cleanups. Signed-off-by: Thomas Pedersen Signed-off-by: John W. Linville --- net/mac80211/cfg.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'net/mac80211/cfg.c') diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7d17a9183b8a..6ab67ab34b5c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1138,6 +1138,14 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy, ieee80211_mesh_root_setup(ifmsh); } if (_chg_mesh_attr(NL80211_MESHCONF_GATE_ANNOUNCEMENTS, mask)) { + /* our current gate announcement implementation rides on root + * announcements, so require this ifmsh to also be a root node + * */ + if (nconf->dot11MeshGateAnnouncementProtocol && + !conf->dot11MeshHWMPRootMode) { + conf->dot11MeshHWMPRootMode = 1; + ieee80211_mesh_root_setup(ifmsh); + } conf->dot11MeshGateAnnouncementProtocol = nconf->dot11MeshGateAnnouncementProtocol; } -- cgit v1.2.3