diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-30 11:38:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-10 15:54:43 -0400 |
commit | 3782cf4a04c272bdaa8476463b1d0208edbc505d (patch) | |
tree | 7209af707e90e4f0c02385b11568347501f7daa5 | |
parent | 6572e91d5fa61bb3f879a00b96d763c566ced6cb (diff) |
iwlagn: 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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index d798c2a152d3..439187f903c9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/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 }, |
@@ -125,6 +138,11 @@ static int iwl_led_cmd(struct iwl_priv *priv, | |||
125 | if (priv->blink_on == on && priv->blink_off == off) | 138 | if (priv->blink_on == on && priv->blink_off == off) |
126 | return 0; | 139 | return 0; |
127 | 140 | ||
141 | if (off == 0) { | ||
142 | /* led is SOLID_ON */ | ||
143 | on = IWL_LED_SOLID; | ||
144 | } | ||
145 | |||
128 | IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", | 146 | IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n", |
129 | priv->cfg->base_params->led_compensation); | 147 | priv->cfg->base_params->led_compensation); |
130 | led_cmd.on = iwl_blink_compensation(priv, on, | 148 | led_cmd.on = iwl_blink_compensation(priv, on, |