From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
To: "John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>,
Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>,
Joe Perches <joe@perches.com>
Subject: [PATCH] mac80211: ratelimit few aggregated messages
Date: Thu, 7 Jun 2012 11:32:23 +0530 [thread overview]
Message-ID: <1339048943-4643-1-git-send-email-mohammed@qca.qualcomm.com> (raw)
From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
ratelimit few aggregation related messages, these messages
floods the log when aggregation is disabled in the AP(for some
wifi testcases) and we run traffic between STA and AP.
mac80211 gives up after 15 addba requests, but
ieee80211_start_tx_ba_session will be repeatedly called
by drivers rate control tx_status callback. These net_dbg_ratelimited
messages will be visible only when dynamic debug is enabled for
mac80211 module.
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
net/mac80211/agg-tx.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index da07f01..c2dc766 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -449,8 +449,11 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
(local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW))
return -EINVAL;
- ht_vdbg("Open BA session requested for %pM tid %u\n",
- pubsta->addr, tid);
+#ifdef CONFIG_MAC80211_HT_DEBUG
+ net_dbg_ratelimited("Open BA session requested for %pM tid %u\n",
+ pubsta->addr, tid);
+#endif /* CONFIG_MAC80211_HT_DEBUG */
+
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
@@ -485,8 +488,11 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
spin_lock_bh(&sta->lock);
- /* we have tried too many times, receiver does not want A-MPDU */
if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_MAX_RETRIES) {
+#ifdef CONFIG_MAC80211_HT_DEBUG
+ net_dbg_ratelimited("receiver does not wants A-MPDU, maximum addba requests tried for tid %u\n",
+ tid);
+#endif /* CONFIG_MAC80211_HT_DEBUG */
ret = -EBUSY;
goto err_unlock_sta;
}
@@ -499,8 +505,10 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_BURST_RETRIES &&
time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] +
HT_AGG_RETRIES_PERIOD)) {
- ht_vdbg("BA request denied - waiting a grace period after %d failed requests on tid %u\n",
- sta->ampdu_mlme.addba_req_num[tid], tid);
+#ifdef CONFIG_MAC80211_HT_DEBUG
+ net_dbg_ratelimited("BA request denied - waiting a grace period after %d failed requests on tid %u\n",
+ sta->ampdu_mlme.addba_req_num[tid], tid);
+#endif /* CONFIG_MAC80211_HT_DEBUG */
ret = -EBUSY;
goto err_unlock_sta;
}
--
1.7.0.4
next reply other threads:[~2012-06-07 6:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 6:02 Mohammed Shafi Shajakhan [this message]
2012-06-07 6:15 ` [PATCH] mac80211: ratelimit few aggregated messages Sujith Manoharan
2012-06-07 6:27 ` Mohammed Shafi Shajakhan
2012-06-07 6:25 ` Joe Perches
2012-06-07 7:11 ` Mohammed Shafi Shajakhan
2012-06-07 7:24 ` Joe Perches
2012-06-07 7:37 ` Mohammed Shafi Shajakhan
2012-06-07 7:57 ` Joe Perches
2012-06-07 8:38 ` Mohammed Shafi Shajakhan
2012-06-07 19:52 ` Joe Perches
2012-06-13 4:59 ` Mohammed Shafi Shajakhan
2012-06-14 1:13 ` Joe Perches
2012-06-14 4:37 ` Mohammed Shafi Shajakhan
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=1339048943-4643-1-git-send-email-mohammed@qca.qualcomm.com \
--to=mohammed@qca.qualcomm.com \
--cc=joe@perches.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;
as well as URLs for NNTP newsgroup(s).