Linux wireless drivers development
 help / color / mirror / Atom feed
From: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, javier@cozybit.com,
	linville@tuxdriver.com, devel@lists.open80211s.org,
	Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Subject: [PATCH v2 4/4] mac80211: invoke the timer only with correct dot11MeshHWMPRootMode value
Date: Thu,  7 Jun 2012 12:39:23 +0800	[thread overview]
Message-ID: <1339043963-2043-5-git-send-email-yeohchunyeow@gmail.com> (raw)
In-Reply-To: <1339043963-2043-1-git-send-email-yeohchunyeow@gmail.com>

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>
---
v2: use constant for dot11MeshHWMPRootMode assignment (Johannes)

 net/mac80211/cfg.c  |    4 ++--
 net/mac80211/mesh.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 38e743f..85c6601 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1564,8 +1564,8 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
 		 * announcements, so require this ifmsh to also be a root node
 		 * */
 		if (nconf->dot11MeshGateAnnouncementProtocol &&
-		    !conf->dot11MeshHWMPRootMode) {
-			conf->dot11MeshHWMPRootMode = 1;
+		    !(conf->dot11MeshHWMPRootMode > 1)) {
+			conf->dot11MeshHWMPRootMode = IEEE80211_PROACTIVE_RANN;
 			ieee80211_mesh_root_setup(ifmsh);
 		}
 		conf->dot11MeshGateAnnouncementProtocol =
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index b690144..ffec13e 100644
--- a/net/mac80211/mesh.c
+++ b/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)
 {
-	if (ifmsh->mshcfg.dot11MeshHWMPRootMode)
+	if (ifmsh->mshcfg.dot11MeshHWMPRootMode > 1)
 		set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
 	else {
 		clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
-- 
1.7.0.4


  parent reply	other threads:[~2012-06-07  4:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  4:39 [PATCH v2 0/4] Support proactive PREQ mechanism in Mesh Chun-Yeow Yeoh
2012-06-07  4:39 ` [PATCH v2 1/4] {nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout Chun-Yeow Yeoh
2012-06-09  8:40   ` Johannes Berg
2012-06-09  8:41   ` Johannes Berg
2012-06-09  8:43   ` Johannes Berg
2012-06-07  4:39 ` [PATCH v2 2/4] mac80211: implement the proactive PREQ generation Chun-Yeow Yeoh
2012-06-09  8:45   ` Johannes Berg
2012-06-07  4:39 ` [PATCH v2 3/4] mac80211: implement the proactive PREP generation Chun-Yeow Yeoh
2012-06-09  8:46   ` Johannes Berg
2012-06-07  4:39 ` Chun-Yeow Yeoh [this message]
2012-06-09  8:46   ` [PATCH v2 4/4] mac80211: invoke the timer only with correct dot11MeshHWMPRootMode value Johannes Berg
2012-06-09 16:11     ` Yeoh Chun-Yeow
2012-06-11  7:24       ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339043963-2043-5-git-send-email-yeohchunyeow@gmail.com \
    --to=yeohchunyeow@gmail.com \
    --cc=devel@lists.open80211s.org \
    --cc=javier@cozybit.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox