iwlwifi: move calib_results list from iwl_priv to iwl_trans
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-agn-calib.c
index 4d0210594956fae5200767d37663d77112eb55f0..16971a020297dab59e8efc8c99a052bd65ee384c 100644 (file)
@@ -82,7 +82,7 @@ struct statistics_general_data {
        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 = {
                .id = REPLY_PHY_CALIBRATION_CMD,
@@ -90,15 +90,15 @@ int iwl_send_calib_results(struct iwl_priv *priv)
        };
        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;
 
                hcmd.len[0] = res->cmd_len;
                hcmd.data[0] = &res->hdr;
                hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY;
-               ret = iwl_trans_send_cmd(trans(priv), &hcmd);
+               ret = iwl_trans_send_cmd(trans, &hcmd);
                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);
                        return ret;
                }
@@ -107,7 +107,7 @@ int iwl_send_calib_results(struct iwl_priv *priv)
        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)
 {
        struct iwl_calib_result *res, *tmp;
@@ -119,7 +119,7 @@ int iwl_calib_set(struct iwl_priv *priv,
        memcpy(&res->hdr, cmd, 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) {
                        list_replace(&tmp->list, &res->list);
                        kfree(tmp);
@@ -128,16 +128,16 @@ int iwl_calib_set(struct iwl_priv *priv,
        }
 
        /* wasn't in list already */
-       list_add_tail(&res->list, &priv->calib_results);
+       list_add_tail(&res->list, &trans->calib_results);
 
        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;
 
-       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);
                kfree(res);
        }
This page took 0.048903 seconds and 5 git commands to generate.