Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2f18bfd authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 67249625
Loading
Loading
Loading
Loading
+27 −18
Original line number Original line Diff line number Diff line
@@ -428,28 +428,37 @@ static int iwl5000_send_calib_results(struct iwl_priv *priv)
{
{
	int ret = 0;
	int ret = 0;


	if (priv->calib_results.lo_res)
	struct iwl_host_cmd hcmd = {
		ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
		.id = REPLY_PHY_CALIBRATION_CMD,
					priv->calib_results.lo_res_len,
		.meta.flags = CMD_SIZE_HUGE,
					priv->calib_results.lo_res);
	};

	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 (ret)
		if (ret)
			goto err;
			goto err;
	}



	if (priv->calib_results.tx_iq_res) {
	if (priv->calib_results.tx_iq_res)
		hcmd.len = priv->calib_results.tx_iq_res_len;
		ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
		hcmd.data = priv->calib_results.tx_iq_res;
				priv->calib_results.tx_iq_res_len,
		ret = iwl_send_cmd_sync(priv, &hcmd);
				priv->calib_results.tx_iq_res);


		if (ret)
		if (ret)
			goto err;
			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 (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)
		if (ret)
			goto err;
			goto err;
	}


	return 0;
	return 0;
err:
err:
+1 −1
Original line number Original line Diff line number Diff line
@@ -307,7 +307,7 @@ struct iwl_cmd_meta {


} __attribute__ ((packed));
} __attribute__ ((packed));


#define IWL_CMD_MAX_PAYLOAD 640
#define IWL_CMD_MAX_PAYLOAD 320


/**
/**
 * struct iwl_cmd
 * struct iwl_cmd