From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net,
Wey-Yi Guy <wey-yi.w.guy@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 07/14] iwlwifi: Led blinking counting both tx and rx
Date: Fri, 17 Jul 2009 09:30:20 -0700 [thread overview]
Message-ID: <1247848227-24031-8-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1247848227-24031-7-git-send-email-reinette.chatre@intel.com>
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
For controlling led blinking, counting both tx and rx data traffic; this
will be able to handle traffic in either direction
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-led.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
index 36d88a0..8c81152 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
@@ -54,7 +54,7 @@ static const char *led_type_str[] = {
static const struct {
- u16 tpt;
+ u16 tpt; /* Mb/s */
u8 on_time;
u8 off_time;
} blink_tbl[] =
@@ -264,13 +264,15 @@ static int iwl_leds_register_led(struct iwl_priv *priv, struct iwl_led *led,
/*
- * calculate blink rate according to last 2 sec Tx/Rx activities
+ * calculate blink rate according to last second Tx/Rx activities
*/
static int iwl_get_blink_rate(struct iwl_priv *priv)
{
int i;
- u64 current_tpt = priv->tx_stats[2].bytes;
- /* FIXME: + priv->rx_stats[2].bytes; */
+ /* count both tx and rx traffic to be able to
+ * handle traffic in either direction
+ */
+ u64 current_tpt = priv->tx_stats[2].bytes + priv->rx_stats[2].bytes;
s64 tpt = current_tpt - priv->led_tpt;
if (tpt < 0) /* wraparound */
--
1.5.6.3
next prev parent reply other threads:[~2009-07-17 16:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 16:30 [PATCH 0/14] iwlwifi driver updates 07/17/2009 Reinette Chatre
2009-07-17 16:30 ` [PATCH 01/14] iwlagn: modify digital SVR for 1000 Reinette Chatre
2009-07-17 16:30 ` [PATCH 02/14] iwlwifi: fix rx signal quality reporting in dmesg Reinette Chatre
2009-07-17 16:30 ` [PATCH 03/14] iwlwifi: Handle new firmware file with ucode build number in header Reinette Chatre
2009-07-17 16:30 ` [PATCH 04/14] iwlwifi: make led functions generic Reinette Chatre
2009-07-17 16:30 ` [PATCH 05/14 w-t and 2.6.31] iwlagn: do not send key clear commands when rfkill enabled Reinette Chatre
2009-07-17 16:30 ` [PATCH 06/14] iwlwifi: add led debugfs function Reinette Chatre
2009-07-17 16:30 ` Reinette Chatre [this message]
2009-07-17 16:30 ` [PATCH 08/14] iwlwifi: checking unknown HW type Reinette Chatre
2009-07-17 16:30 ` [PATCH 09/14] iwlwifi: update 1000 series API version to match firmware Reinette Chatre
2009-07-17 16:30 ` [PATCH 10/14] iwlwifi: uCode Alive notification with timeout Reinette Chatre
2009-07-17 16:30 ` [PATCH 11/14] iwlwifi: make debug level more user friendly Reinette Chatre
2009-07-17 16:30 ` [PATCH 12/14] iwlwifi: clarify hardware error message Reinette Chatre
2009-07-17 16:30 ` [PATCH 13/14] iwlwifi: inform user about rfkill state changes Reinette Chatre
2009-07-17 16:30 ` [PATCH 14/14] iwlwifi: change iwl_enable/disable_interrupts to "inline" Reinette Chatre
2009-07-30 20:12 ` [PATCH 05/14 w-t and 2.6.31] iwlagn: do not send key clear commands when rfkill enabled reinette chatre
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=1247848227-24031-8-git-send-email-reinette.chatre@intel.com \
--to=reinette.chatre@intel.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=wey-yi.w.guy@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).