aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-05-29 04:35:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:27 -0400
commitd2f18bfd9bc6b51c8bb72b272ecca902a88387d4 (patch)
treebf51861dadb4fc1a0df73c254e70aff5a658b11c /drivers/net/wireless/iwlwifi/iwl-5000.c
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c45
1 files changed, 27 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 9ef4468327af..7e525ad45135 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)
428{ 428{
429 int ret = 0; 429 int ret = 0;
430 430
431 if (priv->calib_results.lo_res) 431 struct iwl_host_cmd hcmd = {
432 ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, 432 .id = REPLY_PHY_CALIBRATION_CMD,
433 priv->calib_results.lo_res_len, 433 .meta.flags = CMD_SIZE_HUGE,
434 priv->calib_results.lo_res); 434 };
435 if (ret)
436 goto err;
437 435
436 if (priv->calib_results.lo_res) {
437 hcmd.len = priv->calib_results.lo_res_len;
438 hcmd.data = priv->calib_results.lo_res;
439 ret = iwl_send_cmd_sync(priv, &hcmd);
438 440
439 if (priv->calib_results.tx_iq_res) 441 if (ret)
440 ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, 442 goto err;
441 priv->calib_results.tx_iq_res_len, 443 }
442 priv->calib_results.tx_iq_res);
443 444
444 if (ret) 445 if (priv->calib_results.tx_iq_res) {
445 goto err; 446 hcmd.len = priv->calib_results.tx_iq_res_len;
447 hcmd.data = priv->calib_results.tx_iq_res;
448 ret = iwl_send_cmd_sync(priv, &hcmd);
446 449
447 if (priv->calib_results.tx_iq_perd_res) 450 if (ret)
448 ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, 451 goto err;
449 priv->calib_results.tx_iq_perd_res_len, 452 }
450 priv->calib_results.tx_iq_perd_res); 453
451 if (ret) 454 if (priv->calib_results.tx_iq_perd_res) {
452 goto err; 455 hcmd.len = priv->calib_results.tx_iq_perd_res_len;
456 hcmd.data = priv->calib_results.tx_iq_perd_res;
457 ret = iwl_send_cmd_sync(priv, &hcmd);
458
459 if (ret)
460 goto err;
461 }
453 462
454 return 0; 463 return 0;
455err: 464err: