summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-05-29 16:35:27 +0800
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:27 -0400
commitd2f18bfd9bc6b51c8bb72b272ecca902a88387d4 (patch)
treebf51861dadb4fc1a0df73c254e70aff5a658b11c
parent67249625089c21ec299b337a26448312b7eb91b3 (diff)
iwlwifi: send calibration results as HUGE commands
This patch saves memory by reducing the size of the entry in the txq. It was 640 because of the calibration commands. Calibration commands are now sent as HUGE commands (using the extra 1024 bytes at the end of the command txq), hence, there is no need for 640 in every entry any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c45
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
2 files changed, 28 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 9ef4468327a..7e525ad4513 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 a2b98179117..802f1a12b1a 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