diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-25 14:12:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-28 14:38:35 -0400 |
commit | 1501b6764f0c363a9f1d72f9d422841f81f1bd8c (patch) | |
tree | 22ad0ea3368c798f9e395646488d74eadf1467bf /drivers/net/wireless/iwlegacy | |
parent | f61583941667c96d61fc6991b9f23307f9bfa87e (diff) |
iwlegacy: led stay solid on when no traffic
commit 5ed540aecc2aae92d5c97b9a9306a5bf88ad5574 change the led behavior
for iwlwifi driver; the side effect cause led blink all the time.
Modify the led blink table to fix this problem
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-led.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c index 15eb8b707157..bda0d61b2c0d 100644 --- a/drivers/net/wireless/iwlegacy/iwl-led.c +++ b/drivers/net/wireless/iwlegacy/iwl-led.c | |||
@@ -48,8 +48,21 @@ module_param(led_mode, int, S_IRUGO); | |||
48 | MODULE_PARM_DESC(led_mode, "0=system default, " | 48 | MODULE_PARM_DESC(led_mode, "0=system default, " |
49 | "1=On(RF On)/Off(RF Off), 2=blinking"); | 49 | "1=On(RF On)/Off(RF Off), 2=blinking"); |
50 | 50 | ||
51 | /* Throughput OFF time(ms) ON time (ms) | ||
52 | * >300 25 25 | ||
53 | * >200 to 300 40 40 | ||
54 | * >100 to 200 55 55 | ||
55 | * >70 to 100 65 65 | ||
56 | * >50 to 70 75 75 | ||
57 | * >20 to 50 85 85 | ||
58 | * >10 to 20 95 95 | ||
59 | * >5 to 10 110 110 | ||
60 | * >1 to 5 130 130 | ||
61 | * >0 to 1 167 167 | ||
62 | * <=0 SOLID ON | ||
63 | */ | ||
51 | static const struct ieee80211_tpt_blink iwl_blink[] = { | 64 | static const struct ieee80211_tpt_blink iwl_blink[] = { |
52 | { .throughput = 0 * 1024 - 1, .blink_time = 334 }, | 65 | { .throughput = 0, .blink_time = 334 }, |
53 | { .throughput = 1 * 1024 - 1, .blink_time = 260 }, | 66 | { .throughput = 1 * 1024 - 1, .blink_time = 260 }, |
54 | { .throughput = 5 * 1024 - 1, .blink_time = 220 }, | 67 | { .throughput = 5 * 1024 - 1, .blink_time = 220 }, |
55 | { .throughput = 10 * 1024 - 1, .blink_time = 190 }, | 68 | { .throughput = 10 * 1024 - 1, .blink_time = 190 }, |
@@ -101,6 +114,11 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv, | |||
101 | if (priv->blink_on == on && priv->blink_off == off) | 114 | if (priv->blink_on == on && priv->blink_off == off) |
102 | return 0; | 115 | return 0; |
103 | 116 | ||
117 | if (off == 0) { | ||
118 | /* led is SOLID_ON */ | ||
119 | on = IWL_LED_SOLID; | ||
120 | } | ||
121 | |||
104 | IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", | 122 | IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", |
105 | priv->cfg->base_params->led_compensation); | 123 | priv->cfg->base_params->led_compensation); |
106 | led_cmd.on = iwl_legacy_blink_compensation(priv, on, | 124 | led_cmd.on = iwl_legacy_blink_compensation(priv, on, |