From: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, devel@lists.open80211s.org,
Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Subject: [PATCH v3] mac80211: add extra checking for RC init upon receiving mesh beacon
Date: Tue, 24 Jul 2012 09:15:54 +0800 [thread overview]
Message-ID: <1343092554-17734-1-git-send-email-yeohchunyeow@gmail.com> (raw)
Rate control statistic is flushed whenever the mesh beacon
is received. This may not optimizes the performance of rate
control algorithm. This patch ensures that we return early
from mesh_peer_init if the plink_state is ESTAB. Thus, avoid
calling the rate_control_rate_init again for established mesh
STA.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
v2: simplify the logic checking (Thomas Pedersen)
v3: updating the sta last rx activity (Thomas Pedersen)
net/mac80211/mesh_plink.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 4256859..4f5740e 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -360,6 +360,12 @@ static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata,
}
spin_lock_bh(&sta->lock);
+ if (sta->plink_state == NL80211_PLINK_ESTAB) {
+ sta->last_rx = jiffies;
+ spin_unlock_bh(&sta->lock);
+ return sta;
+ }
+
sta->last_rx = jiffies;
sta->sta.supp_rates[band] = rates;
if (elems->ht_cap_elem &&
--
1.7.0.4
next reply other threads:[~2012-07-24 1:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 1:15 Chun-Yeow Yeoh [this message]
2012-07-24 3:11 ` [PATCH v3] mac80211: add extra checking for RC init upon receiving mesh beacon Thomas Pedersen
2012-07-24 3:40 ` Yeoh Chun-Yeow
2012-07-24 3:44 ` Julian Calaby
2012-07-24 3:47 ` Yeoh Chun-Yeow
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=1343092554-17734-1-git-send-email-yeohchunyeow@gmail.com \
--to=yeohchunyeow@gmail.com \
--cc=devel@lists.open80211s.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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