diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 9ef4468327af37bd1066f24970a3558e232dab06..7e525ad45135513f1612c106c55a96888ef3a22e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c @@ -428,28 +428,37 @@ static int iwl5000_send_calib_results(struct iwl_priv *priv) { int ret = 0; - if (priv->calib_results.lo_res) - ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, - priv->calib_results.lo_res_len, - priv->calib_results.lo_res); - if (ret) - goto err; + struct iwl_host_cmd hcmd = { + .id = REPLY_PHY_CALIBRATION_CMD, + .meta.flags = CMD_SIZE_HUGE, + }; + if (priv->calib_results.lo_res) { + hcmd.len = priv->calib_results.lo_res_len; + hcmd.data = priv->calib_results.lo_res; + ret = iwl_send_cmd_sync(priv, &hcmd); - if (priv->calib_results.tx_iq_res) - ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, - priv->calib_results.tx_iq_res_len, - priv->calib_results.tx_iq_res); + if (ret) + goto err; + } - if (ret) - goto err; + if (priv->calib_results.tx_iq_res) { + hcmd.len = priv->calib_results.tx_iq_res_len; + hcmd.data = priv->calib_results.tx_iq_res; + ret = iwl_send_cmd_sync(priv, &hcmd); - if (priv->calib_results.tx_iq_perd_res) - ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, - priv->calib_results.tx_iq_perd_res_len, - priv->calib_results.tx_iq_perd_res); - if (ret) - goto err; + if (ret) + goto err; + } + + if (priv->calib_results.tx_iq_perd_res) { + hcmd.len = priv->calib_results.tx_iq_perd_res_len; + hcmd.data = priv->calib_results.tx_iq_perd_res; + ret = iwl_send_cmd_sync(priv, &hcmd); + + if (ret) + goto err; + } return 0; err: diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index a2b98179117efc75c3b0a135f926828a5bd9c461..802f1a12b1aa9dcf986019265c876144d6626d04 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h @@ -307,7 +307,7 @@ struct iwl_cmd_meta { } __attribute__ ((packed)); -#define IWL_CMD_MAX_PAYLOAD 640 +#define IWL_CMD_MAX_PAYLOAD 320 /** * struct iwl_cmd