diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-09-11 13:38:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:32 -0400 |
commit | f2d0d0e2bab7a325071dbaba3bef51c90868e1e6 (patch) | |
tree | a61e9e036b0172483105834d064aa7f1a1a252b9 /drivers/net/wireless/iwlwifi/iwl-core.h | |
parent | c812ee24855e20f43cf211e51e3eb53fe6dc6f1d (diff) |
iwlwifi: Adjust blink rate to compensate Clock difference
Adjust led blink rate to compensate on a MAC Clock difference on every
HW. Led blink rate analysis showed an average deviation of 0% on 3945,
5% on 4965 HW and 20% on 5000 series and up.
Need to compensate on the led on/off time per HW according to the
deviation to achieve the desired led frequency
The calculation is: (100-averageDeviation)/100 * blinkTime
For code efficiency the calculation will be:
compensation = (100 - averageDeviation) * 64 / 100
NewBlinkTime = (compensation * BlinkTime) / 64
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index e50103a956b..79ea42531e2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -213,6 +213,9 @@ struct iwl_mod_params { | |||
213 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier | 213 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier |
214 | * @max_ll_items: max number of OTP blocks | 214 | * @max_ll_items: max number of OTP blocks |
215 | * @shadow_ram_support: shadow support for OTP memory | 215 | * @shadow_ram_support: shadow support for OTP memory |
216 | * @led_compensation: compensate on the led on/off time per HW according | ||
217 | * to the deviation to achieve the desired led frequency. | ||
218 | * The detail algorithm is described in iwl-led.c | ||
216 | * | 219 | * |
217 | * We enable the driver to be backward compatible wrt API version. The | 220 | * We enable the driver to be backward compatible wrt API version. The |
218 | * driver specifies which APIs it supports (with @ucode_api_max being the | 221 | * driver specifies which APIs it supports (with @ucode_api_max being the |
@@ -255,6 +258,7 @@ struct iwl_cfg { | |||
255 | const bool shadow_ram_support; | 258 | const bool shadow_ram_support; |
256 | const bool ht_greenfield_support; | 259 | const bool ht_greenfield_support; |
257 | const bool broken_powersave; | 260 | const bool broken_powersave; |
261 | u16 led_compensation; | ||
258 | }; | 262 | }; |
259 | 263 | ||
260 | /*************************** | 264 | /*************************** |