Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159159
b: refs/heads/master
c: e5108d0
h: refs/heads/master
i:
  159157: 5dd0448
  159155: 4f1bb38
  159151: b410001
v: v3
  • Loading branch information
Wey-Yi Guy authored and John W. Linville committed Jul 24, 2009
1 parent 152825f commit 087c298
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a283c0116b0cc5e82327e50ad4d05f6d4d42c603
refs/heads/master: e5108d075c705ed3336163d9ead2b8fe629f680d
10 changes: 6 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 087c298

Please sign in to comment.