[ltp] Problems with (non-Lenovo) battery
Tino Keitel
linux-thinkpad@linux-thinkpad.org
Tue, 14 Dec 2010 22:15:59 +0100
--X1bOJ3K7DJ5YkBrT
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
On Mon, Dec 13, 2010 at 12:27:57 +0100, Bjørn Mork wrote:
[...]
> Other than that, I liked the patch solution :-)
Hi,
I have another patch solution: a kernel patch that changes the
annonying 2 Hz blinking to a more eye friendly short flicker on
activity.
Regards,
Tino
--X1bOJ3K7DJ5YkBrT
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="iwl-blink.patch"
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
index db5bfcb..fb0701c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
@@ -64,7 +64,7 @@ static const struct {
{10, 95, 95},
{5, 110, 110},
{1, 130, 130},
- {0, 167, 167},
+ {0, 25, 25},
/* SOLID_ON */
{-1, IWL_LED_SOLID, 0}
};
@@ -166,7 +166,7 @@ static int iwl_get_blink_rate(struct iwl_priv *priv)
if (!priv->allow_blinking)
i = IWL_MAX_BLINK_TBL;
else
- for (i = 0; i < IWL_MAX_BLINK_TBL; i++)
+ for (i = IWL_MAX_BLINK_TBL - 1; i < IWL_MAX_BLINK_TBL; i++)
if (tpt > (blink_tbl[i].tpt * IWL_1MB_RATE))
break;
@@ -202,7 +202,7 @@ void iwl_leds_background(struct iwl_priv *priv)
}
if (!priv->last_blink_time ||
!time_after(jiffies, priv->last_blink_time +
- msecs_to_jiffies(1000)))
+ msecs_to_jiffies(40)))
return;
blink_idx = iwl_get_blink_rate(priv);
--X1bOJ3K7DJ5YkBrT--