linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, Zhu Yi <yi.zhu@intel.com>,
	Tomas Winkler <tomas.winkler@intel.com>
Subject: [PATCH] iwlwifi: limit printouts on hot path
Date: Thu, 27 Sep 2007 11:27:39 +0800	[thread overview]
Message-ID: <11908636781043-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <11908636772860-git-send-email-yi.zhu@intel.com>

This patch change printouts on TX path to the net_ratelimit version.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-4965-rs.c |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-4965.c    |    2 +-
 drivers/net/wireless/iwlwifi/iwl-debug.h   |    3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index e3a0cca..b9d7ad8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -622,7 +622,7 @@ static void rs_tx_status(void *priv_rate,
 	u16 fc = le16_to_cpu(hdr->frame_control);
 	s32 tpt = 0;
 
-	IWL_DEBUG_RATE("get frame ack response, update rate scale window\n");
+	IWL_DEBUG_RATE_LIMIT("get frame ack response, update rate scale window\n");
 
 	if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1))
 		return;
@@ -1717,7 +1717,7 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
 	struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
 	struct iwl_rate_scale_priv *lq;
 
-	IWL_DEBUG_RATE("rate scale calculate new rate for skb\n");
+	IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n");
 
 	memset(extra, 0, sizeof(*extra));
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index b704fe7..b41addf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -184,7 +184,7 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
 			goto out;
 		}
 
-	IWL_DEBUG_ASSOC("can not find STA %s total %d\n",
+	IWL_DEBUG_ASSOC_LIMIT("can not find STA " MAC_FMT " total %d\n",
 			print_mac(mac, addr), priv->num_stations);
 
  out:
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index abd344c..72318d7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -136,8 +136,11 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
 #define IWL_DEBUG_TXPOWER(f, a...) IWL_DEBUG(IWL_DL_TXPOWER, f, ## a)
 #define IWL_DEBUG_IO(f, a...) IWL_DEBUG(IWL_DL_IO, f, ## a)
 #define IWL_DEBUG_RATE(f, a...) IWL_DEBUG(IWL_DL_RATE, f, ## a)
+#define IWL_DEBUG_RATE_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_RATE, f, ## a)
 #define IWL_DEBUG_NOTIF(f, a...) IWL_DEBUG(IWL_DL_NOTIF, f, ## a)
 #define IWL_DEBUG_ASSOC(f, a...) IWL_DEBUG(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a)
+#define IWL_DEBUG_ASSOC_LIMIT(f, a...) \
+	IWL_DEBUG_LIMIT(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a)
 #define IWL_DEBUG_HT(f, a...) IWL_DEBUG(IWL_DL_HT, f, ## a)
 #define IWL_DEBUG_STATS(f, a...) IWL_DEBUG(IWL_DL_STATS, f, ## a)
 #define IWL_DEBUG_TX_REPLY(f, a...) IWL_DEBUG(IWL_DL_TX_REPLY, f, ## a)
-- 
1.5.1

  reply	other threads:[~2007-09-27  3:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11908636643693-git-send-email-yi.zhu@intel.com>
2007-09-27  3:27 ` [PATCH] iwlwifi: replacing IPW with IWL in error messages Zhu Yi
2007-09-27  3:27   ` [PATCH] iwlwifi: workaournd REPLY_COMPRESSED_BA command in iwl_rx_handle Zhu Yi
2007-09-27  3:27     ` [PATCH] iwlwifi: Correction for sending beacon in config_ap Zhu Yi
2007-09-27  3:27       ` [PATCH] iwlwifi: clear station table in rxon unconditionally Zhu Yi
2007-09-27  3:27         ` [PATCH] iwlwifi: Fix typo in rate sacling algorithm Zhu Yi
2007-09-27  3:27           ` [PATCH] iwlwifi: fix add_station to avoid FW error Zhu Yi
2007-09-27  3:27             ` [PATCH] iwlwifi: removing unnecessary memset in 4965 rate scale Zhu Yi
2007-09-27  3:27               ` [PATCH] iwlwifi: add debugfs framework to " Zhu Yi
2007-09-27  3:27                 ` [PATCH] iwlwifi: add read rate scale table debugfs function Zhu Yi
2007-09-27  3:27                   ` Zhu Yi [this message]
2007-09-27  3:27                     ` [PATCH] iwlwifi: add supp_rates to rate scale sta private data Zhu Yi
2007-09-27  3:27                       ` [PATCH] iwlwifi: rs_rate_scale_perform clean up Zhu Yi
2007-09-27  3:27                         ` [PATCH] iwlwifi: set fixed rate through debugfs Zhu Yi
2007-09-27  3:27                           ` [PATCH] iwlwifi: add debugfs rate scale stats Zhu Yi
2007-09-27  3:27                             ` [PATCH] iwlwifi: Update iwlwifi version stamp to 1.1.17 Zhu Yi
2007-09-27  4:35                           ` [PATCH] iwlwifi: set fixed rate through debugfs Randy Dunlap
2007-09-27  4:43                             ` Zhu Yi
2007-09-27 14:26                               ` Randy Dunlap
2007-09-28  7:44                                 ` Tomas Winkler
2007-09-27  4:32   ` [PATCH] iwlwifi: replacing IPW with IWL in error messages Randy Dunlap
2007-09-27  4:42     ` Zhu Yi
2007-09-27 20:41 ` iwlwifi driver updates John W. Linville

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=11908636781043-git-send-email-yi.zhu@intel.com \
    --to=yi.zhu@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomas.winkler@intel.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).