|
@@ -82,7 +82,7 @@ struct statistics_general_data {
|
|
u32 beacon_energy_c;
|
|
u32 beacon_energy_c;
|
|
};
|
|
};
|
|
|
|
|
|
-int iwl_send_calib_results(struct iwl_priv *priv)
|
|
|
|
|
|
+int iwl_send_calib_results(struct iwl_trans *trans)
|
|
{
|
|
{
|
|
struct iwl_host_cmd hcmd = {
|
|
struct iwl_host_cmd hcmd = {
|
|
.id = REPLY_PHY_CALIBRATION_CMD,
|
|
.id = REPLY_PHY_CALIBRATION_CMD,
|
|
@@ -90,15 +90,15 @@ int iwl_send_calib_results(struct iwl_priv *priv)
|
|
};
|
|
};
|
|
struct iwl_calib_result *res;
|
|
struct iwl_calib_result *res;
|
|
|
|
|
|
- list_for_each_entry(res, &priv->calib_results, list) {
|
|
|
|
|
|
+ list_for_each_entry(res, &trans->calib_results, list) {
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
hcmd.len[0] = res->cmd_len;
|
|
hcmd.len[0] = res->cmd_len;
|
|
hcmd.data[0] = &res->hdr;
|
|
hcmd.data[0] = &res->hdr;
|
|
hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY;
|
|
hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY;
|
|
- ret = iwl_trans_send_cmd(trans(priv), &hcmd);
|
|
|
|
|
|
+ ret = iwl_trans_send_cmd(trans, &hcmd);
|
|
if (ret) {
|
|
if (ret) {
|
|
- IWL_ERR(priv, "Error %d on calib cmd %d\n",
|
|
|
|
|
|
+ IWL_ERR(trans, "Error %d on calib cmd %d\n",
|
|
ret, res->hdr.op_code);
|
|
ret, res->hdr.op_code);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -107,7 +107,7 @@ int iwl_send_calib_results(struct iwl_priv *priv)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-int iwl_calib_set(struct iwl_priv *priv,
|
|
|
|
|
|
+int iwl_calib_set(struct iwl_trans *trans,
|
|
const struct iwl_calib_hdr *cmd, int len)
|
|
const struct iwl_calib_hdr *cmd, int len)
|
|
{
|
|
{
|
|
struct iwl_calib_result *res, *tmp;
|
|
struct iwl_calib_result *res, *tmp;
|
|
@@ -119,7 +119,7 @@ int iwl_calib_set(struct iwl_priv *priv,
|
|
memcpy(&res->hdr, cmd, len);
|
|
memcpy(&res->hdr, cmd, len);
|
|
res->cmd_len = len;
|
|
res->cmd_len = len;
|
|
|
|
|
|
- list_for_each_entry(tmp, &priv->calib_results, list) {
|
|
|
|
|
|
+ list_for_each_entry(tmp, &trans->calib_results, list) {
|
|
if (tmp->hdr.op_code == res->hdr.op_code) {
|
|
if (tmp->hdr.op_code == res->hdr.op_code) {
|
|
list_replace(&tmp->list, &res->list);
|
|
list_replace(&tmp->list, &res->list);
|
|
kfree(tmp);
|
|
kfree(tmp);
|
|
@@ -128,16 +128,16 @@ int iwl_calib_set(struct iwl_priv *priv,
|
|
}
|
|
}
|
|
|
|
|
|
/* wasn't in list already */
|
|
/* wasn't in list already */
|
|
- list_add_tail(&res->list, &priv->calib_results);
|
|
|
|
|
|
+ list_add_tail(&res->list, &trans->calib_results);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-void iwl_calib_free_results(struct iwl_priv *priv)
|
|
|
|
|
|
+void iwl_calib_free_results(struct iwl_trans *trans)
|
|
{
|
|
{
|
|
struct iwl_calib_result *res, *tmp;
|
|
struct iwl_calib_result *res, *tmp;
|
|
|
|
|
|
- list_for_each_entry_safe(res, tmp, &priv->calib_results, list) {
|
|
|
|
|
|
+ list_for_each_entry_safe(res, tmp, &trans->calib_results, list) {
|
|
list_del(&res->list);
|
|
list_del(&res->list);
|
|
kfree(res);
|
|
kfree(res);
|
|
}
|
|
}
|