Procházet zdrojové kódy

mac80211: invoke the timer only with correct dot11MeshHWMPRootMode value

mesh_path_root_timer is invoked once the dot11MeshHWMPRootMode
is larger than 1. This patch also adds the backward compatible
to the previous setting on dot11MeshHWMPRootMode. If the user
configures as follow, it will still trigger the proactive RANN
with Gate Announcement.

iw mesh0 set mesh_param mesh_hwmp_rootmode 1
iw mesh0 set mesh_param mesh_gate_announcements 1

similar to the following setting:

iw mesh0 set mesh_param mesh_hwmp_rootmode 4
iw mesh0 set mesh_param mesh_gate_announcements 1

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
[line-break commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Chun-Yeow Yeoh před 13 roky
rodič
revize
dbb912cd4c
2 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 2 2
      net/mac80211/cfg.c
  2. 1 1
      net/mac80211/mesh.c

+ 2 - 2
net/mac80211/cfg.c

@@ -1565,8 +1565,8 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
 		 * announcements, so require this ifmsh to also be a root node
 		 * announcements, so require this ifmsh to also be a root node
 		 * */
 		 * */
 		if (nconf->dot11MeshGateAnnouncementProtocol &&
 		if (nconf->dot11MeshGateAnnouncementProtocol &&
-		    !conf->dot11MeshHWMPRootMode) {
-			conf->dot11MeshHWMPRootMode = 1;
+		    !(conf->dot11MeshHWMPRootMode > IEEE80211_ROOTMODE_ROOT)) {
+			conf->dot11MeshHWMPRootMode = IEEE80211_PROACTIVE_RANN;
 			ieee80211_mesh_root_setup(ifmsh);
 			ieee80211_mesh_root_setup(ifmsh);
 		}
 		}
 		conf->dot11MeshGateAnnouncementProtocol =
 		conf->dot11MeshGateAnnouncementProtocol =

+ 1 - 1
net/mac80211/mesh.c

@@ -443,7 +443,7 @@ static void ieee80211_mesh_path_root_timer(unsigned long data)
 
 
 void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh)
 void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh)
 {
 {
-	if (ifmsh->mshcfg.dot11MeshHWMPRootMode)
+	if (ifmsh->mshcfg.dot11MeshHWMPRootMode > IEEE80211_ROOTMODE_ROOT)
 		set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
 		set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
 	else {
 	else {
 		clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
 		clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);