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>
This commit is contained in:
Tomas Winkler
2008-10-08 09:37:27 +08:00
committed by John W. Linville
parent 1397dcebd8
commit be5d56ed88
5 changed files with 49 additions and 35 deletions

View File

@ -70,7 +70,7 @@
* INIT calibrations framework
*****************************************************************************/
int iwl_send_calib_results(struct iwl_priv *priv)
int iwl_send_calib_results(struct iwl_priv *priv)
{
int ret = 0;
int i = 0;
@ -80,14 +80,16 @@
.meta.flags = CMD_SIZE_HUGE,
};
for (i = 0; i < IWL_CALIB_MAX; i++)
if (priv->calib_results[i].buf) {
for (i = 0; i < IWL_CALIB_MAX; i++) {
if ((BIT(i) & priv->hw_params.calib_init_cfg) &&
priv->calib_results[i].buf) {
hcmd.len = priv->calib_results[i].buf_len;
hcmd.data = priv->calib_results[i].buf;
ret = iwl_send_cmd_sync(priv, &hcmd);
if (ret)
goto err;
}
}
return 0;
err: