diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-calib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 28 |
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 03bac48558b2..c7bcafabb3b3 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 { | |||
84 | 84 | ||
85 | int iwl_send_calib_results(struct iwl_priv *priv) | 85 | int iwl_send_calib_results(struct iwl_priv *priv) |
86 | { | 86 | { |
87 | int ret = 0; | ||
88 | int i = 0; | ||
89 | |||
90 | struct iwl_host_cmd hcmd = { | 87 | struct iwl_host_cmd hcmd = { |
91 | .id = REPLY_PHY_CALIBRATION_CMD, | 88 | .id = REPLY_PHY_CALIBRATION_CMD, |
92 | .flags = CMD_SYNC, | 89 | .flags = CMD_SYNC, |
93 | }; | 90 | }; |
91 | int i = 0; | ||
94 | 92 | ||
95 | for (i = 0; i < IWL_CALIB_MAX; i++) { | 93 | for (i = 0; i < IWL_CALIB_MAX; i++) { |
96 | if ((BIT(i) & hw_params(priv).calib_init_cfg) && | 94 | int ret; |
97 | priv->calib_results[i].buf) { | 95 | |
98 | hcmd.len[0] = priv->calib_results[i].buf_len; | 96 | if (!priv->calib_results[i].buf) |
99 | hcmd.data[0] = priv->calib_results[i].buf; | 97 | continue; |
100 | hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; | 98 | hcmd.len[0] = priv->calib_results[i].buf_len; |
101 | ret = iwl_trans_send_cmd(trans(priv), &hcmd); | 99 | hcmd.data[0] = priv->calib_results[i].buf; |
102 | if (ret) { | 100 | hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; |
103 | IWL_ERR(priv, "Error %d iteration %d\n", | 101 | ret = iwl_trans_send_cmd(trans(priv), &hcmd); |
104 | ret, i); | 102 | if (ret) { |
105 | break; | 103 | IWL_ERR(priv, "Error %d iteration %d\n", ret, i); |
106 | } | 104 | return ret; |
107 | } | 105 | } |
108 | } | 106 | } |
109 | 107 | ||
110 | return ret; | 108 | return 0; |
111 | } | 109 | } |
112 | 110 | ||
113 | int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len) | 111 | int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len) |