Set proper bits in the context based on key length for PDCP
algorithms. This is required to support ZUC 256bit key cases.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
{
roc_se_pdcp_mac_len_type mac_type = 0;
+ if (roc_model_is_cn9k()) {
+ if (mac_len != 4) {
+ plt_err("Only mac len 4 is supported on cn9k");
+ return -ENOTSUP;
+ }
+ }
+
switch (mac_len) {
case 4:
mac_type = ROC_SE_PDCP_MAC_LEN_32_BIT;
case ROC_SE_ZUC_EIA3:
zs_ctx->zuc.otk_ctx.w0.s.alg_type =
ROC_SE_PDCP_ALG_TYPE_ZUC;
+ ret = cpt_pdcp_key_type_set(zs_ctx, key_len);
+ if (ret)
+ return ret;
ret = cpt_pdcp_mac_len_set(zs_ctx, mac_len);
if (ret)
return ret;