summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-17 08:51:53 -0800
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-11-25 10:49:04 -0800
commit93b64105e5642728cfc441e20a42164323fe4ad0 (patch)
treea9d0ddd217744d94e3405f93c210c5d50a8a7f6e /drivers/net/wireless/iwlwifi/iwl-agn-calib.c
parent72bcacc2bd237423eea8c00c2794e67dc7eebca6 (diff)
downloadop-kernel-dev-93b64105e5642728cfc441e20a42164323fe4ad0.zip
op-kernel-dev-93b64105e5642728cfc441e20a42164323fe4ad0.tar.gz
iwlagn: remove calibration knowledge
The init microcode knows very well which calibrations are required and sends us results for those that are. Consequently, we can just send all of those to the RT uCode again. The problem with having the driver know about this is that it is a uCode feature, not a hardware feature so the config is completely unsuitable. The only thing we need to check is whether the device needs crystal calibration or not, add a new parameter to the configuration for that. This makes new uCode work on 6000 series devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-calib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-calib.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
index 03bac48..c7bcafa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
@@ -84,30 +84,28 @@ struct statistics_general_data {
int iwl_send_calib_results(struct iwl_priv *priv)
{
- int ret = 0;
- int i = 0;
-
struct iwl_host_cmd hcmd = {
.id = REPLY_PHY_CALIBRATION_CMD,
.flags = CMD_SYNC,
};
+ int i = 0;
for (i = 0; i < IWL_CALIB_MAX; i++) {
- if ((BIT(i) & hw_params(priv).calib_init_cfg) &&
- priv->calib_results[i].buf) {
- hcmd.len[0] = priv->calib_results[i].buf_len;
- hcmd.data[0] = priv->calib_results[i].buf;
- hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY;
- ret = iwl_trans_send_cmd(trans(priv), &hcmd);
- if (ret) {
- IWL_ERR(priv, "Error %d iteration %d\n",
- ret, i);
- break;
- }
+ int ret;
+
+ if (!priv->calib_results[i].buf)
+ continue;
+ hcmd.len[0] = priv->calib_results[i].buf_len;
+ hcmd.data[0] = priv->calib_results[i].buf;
+ hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY;
+ ret = iwl_trans_send_cmd(trans(priv), &hcmd);
+ if (ret) {
+ IWL_ERR(priv, "Error %d iteration %d\n", ret, i);
+ return ret;
}
}
- return ret;
+ return 0;
}
int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len)
OpenPOWER on IntegriCloud