diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-07 21:37:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:02 -0400 |
commit | be5d56ed885a2897ec813eab4a8055d495816e9a (patch) | |
tree | 26cada5850d10ec41b912f66f33130727e866a33 /drivers/net/wireless/iwlwifi/iwl-calib.c | |
parent | 1397dcebd8f1d66528e8f86b0dfb603281558f79 (diff) |
iwlwifi: make initial calibration set configurable
This patch adds ability to configure initial calibration set. Not all HW
supported by iwlwifi use the same calibration set, XTAL is one example.
Some clean ups are also included in this patch.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-calib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-calib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.c b/drivers/net/wireless/iwlwifi/iwl-calib.c index 72fbf47229d..25f4658f1a7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-calib.c | |||
@@ -70,7 +70,7 @@ | |||
70 | * INIT calibrations framework | 70 | * INIT calibrations framework |
71 | *****************************************************************************/ | 71 | *****************************************************************************/ |
72 | 72 | ||
73 | int iwl_send_calib_results(struct iwl_priv *priv) | 73 | int iwl_send_calib_results(struct iwl_priv *priv) |
74 | { | 74 | { |
75 | int ret = 0; | 75 | int ret = 0; |
76 | int i = 0; | 76 | int i = 0; |
@@ -80,14 +80,16 @@ | |||
80 | .meta.flags = CMD_SIZE_HUGE, | 80 | .meta.flags = CMD_SIZE_HUGE, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | for (i = 0; i < IWL_CALIB_MAX; i++) | 83 | for (i = 0; i < IWL_CALIB_MAX; i++) { |
84 | if (priv->calib_results[i].buf) { | 84 | if ((BIT(i) & priv->hw_params.calib_init_cfg) && |
85 | priv->calib_results[i].buf) { | ||
85 | hcmd.len = priv->calib_results[i].buf_len; | 86 | hcmd.len = priv->calib_results[i].buf_len; |
86 | hcmd.data = priv->calib_results[i].buf; | 87 | hcmd.data = priv->calib_results[i].buf; |
87 | ret = iwl_send_cmd_sync(priv, &hcmd); | 88 | ret = iwl_send_cmd_sync(priv, &hcmd); |
88 | if (ret) | 89 | if (ret) |
89 | goto err; | 90 | goto err; |
90 | } | 91 | } |
92 | } | ||
91 | 93 | ||
92 | return 0; | 94 | return 0; |
93 | err: | 95 | err: |