Commit bd2c6e0e authored by Jack Xu's avatar Jack Xu Committed by Herbert Xu
Browse files

crypto: qat - remove unused members in suof structure



Remove the members `css_key` and `css_signature` which are not used for
doing the firmware authentication.

The signed image pointer can be calculated using the pointer to the CSS
header and the length of the CSS header, making these members redundant.

Signed-off-by: default avatarJack Xu <jack.xu@intel.com>
Reviewed-by: default avatarAhsan Atta <ahsan.atta@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ce331356
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -404,8 +404,6 @@ struct icp_qat_suof_img_hdr {
	char          *simg_buf;
	unsigned long simg_len;
	char          *css_header;
	char          *css_key;
	char          *css_signature;
	char          *css_simg;
	unsigned long simg_size;
	unsigned int  ae_num;
+2 −7
Original line number Diff line number Diff line
@@ -1064,6 +1064,7 @@ static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle,
			      struct icp_qat_suof_chunk_hdr *suof_chunk_hdr)
{
	struct icp_qat_suof_handle *suof_handle = handle->sobj_handle;
	unsigned int offset = ICP_QAT_AE_IMG_OFFSET(handle);
	struct icp_qat_simg_ae_mode *ae_mode;
	struct icp_qat_suof_objhdr *suof_objhdr;

@@ -1075,13 +1076,7 @@ static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle,
				   suof_chunk_hdr->offset))->img_length;

	suof_img_hdr->css_header = suof_img_hdr->simg_buf;
	suof_img_hdr->css_key = (suof_img_hdr->css_header +
				 sizeof(struct icp_qat_css_hdr));
	suof_img_hdr->css_signature = suof_img_hdr->css_key +
				      ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) +
				      ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle);
	suof_img_hdr->css_simg = suof_img_hdr->css_signature +
				 ICP_QAT_CSS_SIGNATURE_LEN(handle);
	suof_img_hdr->css_simg = suof_img_hdr->css_header + offset;

	ae_mode = (struct icp_qat_simg_ae_mode *)(suof_img_hdr->css_simg);
	suof_img_hdr->ae_mask = ae_mode->ae_mask;