get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/105281/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 105281,
    "url": "http://patches.dpdk.org/api/patches/105281/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211220102710.3083370-1-g.singh@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20211220102710.3083370-1-g.singh@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211220102710.3083370-1-g.singh@nxp.com",
    "date": "2021-12-20T10:27:03",
    "name": "[1/8] common/dpaax: caamflib: Remove code related to SEC ERA 1 to 7",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0f204356d7a856ff633ce4928121ec8103566dfc",
    "submitter": {
        "id": 1068,
        "url": "http://patches.dpdk.org/api/people/1068/?format=api",
        "name": "Gagandeep Singh",
        "email": "g.singh@nxp.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211220102710.3083370-1-g.singh@nxp.com/mbox/",
    "series": [
        {
            "id": 20982,
            "url": "http://patches.dpdk.org/api/series/20982/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20982",
            "date": "2021-12-20T10:27:04",
            "name": "[1/8] common/dpaax: caamflib: Remove code related to SEC ERA 1 to 7",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20982/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105281/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/105281/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4C3E4A00BE;\n\tMon, 20 Dec 2021 11:27:50 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3F6C140DFD;\n\tMon, 20 Dec 2021 11:27:46 +0100 (CET)",
            "from EUR02-HE1-obe.outbound.protection.outlook.com\n (mail-eopbgr10053.outbound.protection.outlook.com [40.107.1.53])\n by mails.dpdk.org (Postfix) with ESMTP id 8E0B940040\n for <dev@dpdk.org>; Mon, 20 Dec 2021 11:27:43 +0100 (CET)",
            "from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14)\n by AM6PR04MB4134.eurprd04.prod.outlook.com (2603:10a6:209:44::30)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.15; Mon, 20 Dec\n 2021 10:27:39 +0000",
            "from AS8PR04MB8198.eurprd04.prod.outlook.com\n ([fe80::71ab:27ce:856d:5aac]) by AS8PR04MB8198.eurprd04.prod.outlook.com\n ([fe80::71ab:27ce:856d:5aac%4]) with mapi id 15.20.4801.020; Mon, 20 Dec 2021\n 10:27:39 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=M8zcwVOOwQ79rSEz6UEnJnF1CKN4RabH5UVNJNW5HC7D/PBxrMuegUCKjlLG3d4EpsFyanaCdB6UMG7Ms8Leb7YiHhRYe2i3KOfQTJVspqUwqD5pQxyslHgvjzl1zT2ujljWnPKUcvhjzmi8k/oNYXKXmICVbsdoUgKGmg3ckBF6Dw/HFj7R04Q5UWmARGnsr9FSQUfqjz16WCvLQr746eCldLdIc13oD1zESf0lLxUnq8HK1bvFAHh+IbxR6J8QS1yfenBXE+61qQgShAqFI7YxBy3rXw7JI63sFqZFZ+bMhHT4EBzh1a7iKNzDdDSUwfP56xfjwi8TXrTg4b8NoQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=WT4AmmEMaGInbk63gXqYAokeoBtZACpXZG3HW2rMlgQ=;\n b=WIBFS3Lznxop8NAaLzNrcYtdRZzU7AKbkiiDF62CQnqzIPBvjfo7ipEdykZL9AU4/xWUNvGKNFO60a6lP7x5m8WPAYAFVCni4M/Mq1OoZETSWz7FFLtsjCOGBn+EmTUSMbrT9YMqBQSSf7bczkr+yMKs98Q80s01ZhTSti+jDnVV37iY760GkAMaagwsUjg9HOo/ryg6I8mR4xLWxxGSJ0ikUNlUixB6ejE5CI1JHfOw3/P6PIS8WhxxA0R5oSWyPgGWKoXNfmbbJ8wb2t57XesewIlTTJPDN48Q0ezqwlxn918umbvEjSWXatWANEfRRXujZsStzcbWCpjyLlhk/Q==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=WT4AmmEMaGInbk63gXqYAokeoBtZACpXZG3HW2rMlgQ=;\n b=eO/PV1YXoFA6+v5VOyBz2B0vPH6Q2ZRkUEX+Q7fopKrDLDDUuBxuRpuAgTZErl2HaLtMAdf2C6xgZWyr06YhsYCQSNwbhlHOXYbWD4WouBj60O2Knwo16S70W06cKFxU0I8yE450Z+KeYlqyKUbKj8SQdklPLDv+Frw+EWSv38o=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nxp.com;",
        "From": "Gagandeep Singh <g.singh@nxp.com>",
        "To": "gakhil@marvell.com,\n\tdev@dpdk.org",
        "Cc": "Franck LENORMAND <franck.lenormand@nxp.com>,\n Gagandeep Singh <g.singh@nxp.com>",
        "Subject": "[PATCH 1/8] common/dpaax: caamflib: Remove code related to SEC ERA 1\n to 7",
        "Date": "Mon, 20 Dec 2021 15:57:03 +0530",
        "Message-Id": "<20211220102710.3083370-1-g.singh@nxp.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "SG2PR06CA0205.apcprd06.prod.outlook.com\n (2603:1096:4:68::13) To AS8PR04MB8198.eurprd04.prod.outlook.com\n (2603:10a6:20b:3b0::14)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "1acc0783-ba55-4f66-4dad-08d9c3a358f6",
        "X-MS-TrafficTypeDiagnostic": "AM6PR04MB4134:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <AM6PR04MB413480793575EA012A9F8513E17B9@AM6PR04MB4134.eurprd04.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:3044;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n V1QxjA3Uao65FhFBNLbHhkDKstfrD1I4X1GVhE2NTpYl5NgNqupsRuPaDtw9C+lPjFZ4Ps9+6RiXeD6LBGEsdx6rDd/U0im6rcPyDrTzqCX6pePWNALUAg6nCRYfx7/a6MBkz662Od85zwcs93zHiXLwneOTECf4fGt9SVnoUE0+MtR6hQmC7eIf4g0QQhHmS6PgxfahGJoRJxqtVvGAUJycv4uyf0MhG26UGwUBm0v4LJX+qOISsaS7m8PChqLeQ2wjb9hsNqAo8in87K+1xUQE3AQRIaY50DGQUx2d2mT+NupYki6pyJF+VQdDe98A24oCrE/k9BS+yinfoOew40eEiuIhvLVJhWDO/wVTkAtK1aAdNnMY09RF4NPjCZEAiQr6Cbn8LQI3DvpVXpGVi3lHW3boHnUDPY3rMcwlHRSbmqE/U7pext+HMfVJGj55NXNSEi2UW7H7uBowa2D66MLDQzdfI5n2bAHqExrBPwk1JFvhYJEle15WPm0Rwm6G0YfcOPE7nCPbT+DbbHeIPwvxc9Vkqy6vSK9F390ho7qBRYkYtXsf6XsYJ5sOXUHL6BAw/5To7y0YX5CJfmAuX3iRpDNBoERB5lMGHiqOpis37TY9L2I6KpISsACu3JutPqH5xTOaJjPkYWASuOuCGeIWa97MdQFIa26Gzrif8X32f5ARc5+mrOeaeQt6Fcb+uc2oIyCDyhvS7umUly5smQ==",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(4636009)(366004)(316002)(6486002)(186003)(26005)(66476007)(8936002)(36756003)(54906003)(52116002)(66556008)(66946007)(38100700002)(2906002)(38350700002)(6666004)(30864003)(55236004)(83380400001)(5660300002)(1076003)(508600001)(6506007)(4326008)(6512007)(86362001)(8676002)(2616005)(559001)(579004);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n SUy81yDfl5liO5eh1aeTxJB0ge5p2KFmFwBvHrQc+Jnx7AIWnHwWnpsPFw1hSWDXnLS5mqUjRw4ufE+QopXkUzWRdtq8tYQpljb1DrhPHIWQMKHU0CQgBa2lCpXPzrESXkmPic45UXoijPjRlKI+3/D/rQVUeiSCvF5lgtG7e3xpSng1E1jlfvzpdN9uesQI+YKyxRlYixk0+AMM7VKwHyyDy8lSSx7xsp0sZ24vcPaVIAR2GIJxTVSlTCA5K+HgyTEzIr1s+3G9jFJ8M0j20l9R2PZVNxqqng8RFGEF8uah0EhsZ5IGOZAimTXMcywB0TzM8MUgcl/LjOU//MLazh7uYVZ0Cj5enrjz31dj2qgZXDvB8XthnHCCW9vtnbUejb01wRw8UF/VMXnEEyLTNQ0yFoSLGONFLJjgGYu7xw40eB8k7A2Xh7LyTRnavgHy6IdPqiztLYVVw8348YIhjvHI2lvQUUs/f5W43R3hxLmAQ4+0cK1l8iBWcbIPcfcJaXUPQlLY4ynN0mPU/PJm6nVMciKLe+ujybCH3Z3fs71ENojiixDnZhh9L025Qd0l2XgUvgAPd/XNzCtd8WaCWL/HRhUUhYOcdNb0w6vLUd6hYkvTJ8ZXfWQ5aMc0SwT9LD6PZt38bSGT3U3OwArXNM2maJAlnWf9jIhLKfndTLWu7uLOfwAoTHUK1VygBHtZXNCnSiPog3PFIJtbGO5pDeZZB8MV5lFdvsVHhK0sYxtTXlelyzeCnSKxVRvB4P1ZYLO8T8oiflFsjy8kmMvhRItzadxoNVRJQo0Aj6WFq6zzP5dH6WUrkWaisO4N9JPEZUuKgz7sEr+/k74EKe/vLk7Cb/c1r18qMJLgVn3JFzunOwzKNlv0CNhk9mRXTZ+JLLvcWeJvhCsCRo6Q1l1jMu2tSOJqE5PW2HNZXrlVCtXH606AhTwxKbATMHEmR1N7h59wk9PuowwBlJuIRU13zPcdMnMSMOQeMxIexFIrpxfUGjxlbVb5pg8X1zZtpM+sGKVCfvZXzJHJT+RmowUWP3HDjAWF96Q9yDdCC8561S3c9qjYEPsjKND73iV3VJK2fRI1sWqGLwQIB2Fjoknw4JBbBalmJ7lqAIQee2Sx0OuQhi2Giy0l/IB3T0i3NLW6zBhzPPiyE23qNW9PCqJPaOHxxgLXy0/CIaaOXB5LlYmhGVkEJbU7kCoTfVn/MNp6U1e2VOCgN0X9noT/sYQahCiCbXaQuzchy8B69KPxjM/8pXhq5o5ViV20c8+xcPIHmd2e1oOa3dRxr6IcDh+5zrAnXNyerTxFxNoVZ5gtQx6nGeJoxq99koN8KdlHkC+NGvvAKTuJQZQ9ubmIFkv+wnh7+5C3JkhL+04R+tZiArrgfi8Iuu2x5Vucpt38k/YiD6co5ApQi0d2zPvR0lppfPs7plVYJmIEpHll2XKBfeQzw5ZkaN4spseLpI/DY7x6o9lYIc3Lrc9fgRQGAe0Iwqr/E86h/nNO56uC+jLuKzmFkSx2sBujWUkM2L2t+pfnPvL2WInp31P0QUcrdTaxQzovp6T3A0WTSW7ImFRrZsU=",
        "X-OriginatorOrg": "nxp.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 1acc0783-ba55-4f66-4dad-08d9c3a358f6",
        "X-MS-Exchange-CrossTenant-AuthSource": "AS8PR04MB8198.eurprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "20 Dec 2021 10:27:39.6601 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "686ea1d3-bc2b-4c6f-a92c-d99c5c301635",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n XSXAIC8qyZwCfKodxt3HbPqZKrmguJRgOBtRPnSasGWn3/KRwoY2TMfYj/3ldwbK",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM6PR04MB4134",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Franck LENORMAND <franck.lenormand@nxp.com>\n\nDPAA1 and DPAA2 platforms use SEC ERA 8 and 10 only.\n\nThis patch removes code in SDAP and PDCP header related to these\nERA to simplify the codebase:\n - Simplify logic using RTA_SEC_ERA_<> macro\n - Remove era_2_sw_hfn_ovrd dedicated to RTA_SEC_ERA_2\n\nSigned-off-by: Franck LENORMAND <franck.lenormand@nxp.com>\nSigned-off-by: Gagandeep Singh <g.singh@nxp.com>\n---\n drivers/common/dpaax/caamflib/desc/pdcp.h   | 939 ++++----------------\n drivers/common/dpaax/caamflib/desc/sdap.h   |  91 +-\n drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  14 +-\n drivers/crypto/dpaa_sec/dpaa_sec.c          |  14 +-\n 4 files changed, 183 insertions(+), 875 deletions(-)",
    "diff": "diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h\nindex 8e8daf5ba8..2fe56c53c6 100644\n--- a/drivers/common/dpaax/caamflib/desc/pdcp.h\n+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h\n@@ -329,91 +329,35 @@ pdcp_insert_cplane_null_op(struct program *p,\n \t\t\t   struct alginfo *cipherdata __maybe_unused,\n \t\t\t   struct alginfo *authdata __maybe_unused,\n \t\t\t   unsigned int dir,\n-\t\t\t   enum pdcp_sn_size sn_size __maybe_unused,\n-\t\t\t   unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t   enum pdcp_sn_size sn_size __maybe_unused)\n {\n-\tLABEL(local_offset);\n-\tREFERENCE(move_cmd_read_descbuf);\n-\tREFERENCE(move_cmd_write_descbuf);\n-\n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMATHB(p, SEQINSZ, ADD, ZERO, VSEQINSZ, 4, 0);\n-\t\tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n-\t\t\tMATHB(p, SEQINSZ, ADD, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n-\t\t\t      IMMED2);\n-\t\telse\n-\t\t\tMATHB(p, SEQINSZ, SUB, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n-\t\t\t      IMMED2);\n-\t} else {\n-\t\tMATHB(p, SEQINSZ, ADD, ONE, VSEQINSZ, 4, 0);\n-\t\tMATHB(p, VSEQINSZ, SUB, ONE, VSEQINSZ, 4, 0);\n-\n-\t\tif (dir == OP_TYPE_ENCAP_PROTOCOL) {\n-\t\t\tMATHB(p, SEQINSZ, ADD, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n-\t\t\t      IMMED2);\n-\t\t\tMATHB(p, VSEQINSZ, SUB, ONE, MATH0, 4, 0);\n-\t\t} else {\n-\t\t\tMATHB(p, VSEQINSZ, SUB, PDCP_MAC_I_LEN, VSEQINSZ, 4,\n-\t\t\t      IMMED2);\n-\t\t\tMATHB(p, SEQINSZ, SUB, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n-\t\t\t      IMMED2);\n-\t\t\tMATHB(p, VSEQOUTSZ, SUB, ONE, MATH0, 4, 0);\n-\t\t}\n-\n-\t\tMATHB(p, MATH0, ADD, ONE, MATH0, 4, 0);\n+\tMATHB(p, SEQINSZ, ADD, ZERO, VSEQINSZ, 4, 0);\n+\tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n+\t\tMATHB(p, SEQINSZ, ADD, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n+\t\t      IMMED2);\n+\telse\n+\t\tMATHB(p, SEQINSZ, SUB, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n+\t\t      IMMED2);\n \n-\t\t/*\n-\t\t * Since MOVELEN is available only starting with\n-\t\t * SEC ERA 3, use poor man's MOVELEN: create a MOVE\n-\t\t * command dynamically by writing the length from M1 by\n-\t\t * OR-ing the command in the M1 register and MOVE the\n-\t\t * result into the descriptor buffer. Care must be taken\n-\t\t * wrt. the location of the command because of SEC\n-\t\t * pipelining. The actual MOVEs are written at the end\n-\t\t * of the descriptor due to calculations needed on the\n-\t\t * offset in the descriptor for the MOVE command.\n-\t\t */\n-\t\tmove_cmd_read_descbuf = MOVE(p, DESCBUF, 0, MATH0, 0, 6,\n-\t\t\t\t\t     IMMED);\n-\t\tmove_cmd_write_descbuf = MOVE(p, MATH0, 0, DESCBUF, 0, 8,\n-\t\t\t\t\t      WAITCOMP | IMMED);\n-\t}\n \tMATHB(p, VSEQINSZ, SUB, PDCP_NULL_MAX_FRAME_LEN, NONE, 4,\n \t      IMMED2);\n \tJUMP(p, PDCP_MAX_FRAME_LEN_STATUS, HALT_STATUS, ALL_FALSE, MATH_N);\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n-\t\t\tMATHB(p, VSEQINSZ, ADD, ZERO, MATH0, 4, 0);\n-\t\telse\n-\t\t\tMATHB(p, VSEQOUTSZ, ADD, ZERO, MATH0, 4, 0);\n-\t}\n+\tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n+\t\tMATHB(p, VSEQINSZ, ADD, ZERO, MATH0, 4, 0);\n+\telse\n+\t\tMATHB(p, VSEQOUTSZ, ADD, ZERO, MATH0, 4, 0);\n+\n \tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \tSEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH0, 0);\n-\t} else {\n-\t\tSET_LABEL(p, local_offset);\n-\n-\t\t/* Shut off automatic Info FIFO entries */\n-\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t/* Placeholder for MOVE command with length from M1 register */\n-\t\tMOVE(p, IFIFOAB1, 0, OFIFO, 0, 0, IMMED);\n-\t\t/* Enable automatic Info FIFO entries */\n-\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t}\n+\tMOVE(p, AB1, 0, OFIFO, 0, MATH0, 0);\n \n \tif (dir == OP_TYPE_ENCAP_PROTOCOL) {\n \t\tMATHB(p, MATH1, XOR, MATH1, MATH0, 8, 0);\n \t\tMOVE(p, MATH0, 0, OFIFO, 0, 4, IMMED);\n \t}\n \n-\tif (rta_sec_era < RTA_SEC_ERA_3) {\n-\t\tPATCH_MOVE(p, move_cmd_read_descbuf, local_offset);\n-\t\tPATCH_MOVE(p, move_cmd_write_descbuf, local_offset);\n-\t}\n-\n \treturn 0;\n }\n \n@@ -422,66 +366,21 @@ insert_copy_frame_op(struct program *p,\n \t\t     struct alginfo *cipherdata __maybe_unused,\n \t\t     unsigned int dir __maybe_unused)\n {\n-\tLABEL(local_offset);\n-\tREFERENCE(move_cmd_read_descbuf);\n-\tREFERENCE(move_cmd_write_descbuf);\n-\n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMATHB(p, SEQINSZ, ADD, ZERO, VSEQINSZ,  4, 0);\n-\t\tMATHB(p, SEQINSZ, ADD, ZERO, VSEQOUTSZ,  4, 0);\n-\t} else {\n-\t\tMATHB(p, SEQINSZ, ADD, ONE, VSEQINSZ,  4, 0);\n-\t\tMATHB(p, VSEQINSZ, SUB, ONE, VSEQINSZ,  4, 0);\n-\t\tMATHB(p, SEQINSZ, ADD, ONE, VSEQOUTSZ,  4, 0);\n-\t\tMATHB(p, VSEQOUTSZ, SUB, ONE, VSEQOUTSZ,  4, 0);\n-\t\tMATHB(p, VSEQINSZ, SUB, ONE, MATH0,  4, 0);\n-\t\tMATHB(p, MATH0, ADD, ONE, MATH0,  4, 0);\n+\tMATHB(p, SEQINSZ, ADD, ZERO, VSEQINSZ,  4, 0);\n+\tMATHB(p, SEQINSZ, ADD, ZERO, VSEQOUTSZ,  4, 0);\n \n-\t\t/*\n-\t\t * Since MOVELEN is available only starting with\n-\t\t * SEC ERA 3, use poor man's MOVELEN: create a MOVE\n-\t\t * command dynamically by writing the length from M1 by\n-\t\t * OR-ing the command in the M1 register and MOVE the\n-\t\t * result into the descriptor buffer. Care must be taken\n-\t\t * wrt. the location of the command because of SEC\n-\t\t * pipelining. The actual MOVEs are written at the end\n-\t\t * of the descriptor due to calculations needed on the\n-\t\t * offset in the descriptor for the MOVE command.\n-\t\t */\n-\t\tmove_cmd_read_descbuf = MOVE(p, DESCBUF, 0, MATH0, 0, 6,\n-\t\t\t\t\t     IMMED);\n-\t\tmove_cmd_write_descbuf = MOVE(p, MATH0, 0, DESCBUF, 0, 8,\n-\t\t\t\t\t      WAITCOMP | IMMED);\n-\t}\n \tMATHB(p, SEQINSZ, SUB, PDCP_NULL_MAX_FRAME_LEN, NONE,  4,\n \t      IFB | IMMED2);\n \tJUMP(p, PDCP_MAX_FRAME_LEN_STATUS, HALT_STATUS, ALL_FALSE, MATH_N);\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2)\n-\t\tMATHB(p, VSEQINSZ, ADD, ZERO, MATH0,  4, 0);\n+\tMATHB(p, VSEQINSZ, ADD, ZERO, MATH0,  4, 0);\n \n \tSEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);\n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH0, 0);\n-\t} else {\n-\t\tSET_LABEL(p, local_offset);\n \n-\t\t/* Shut off automatic Info FIFO entries */\n-\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\n-\t\t/* Placeholder for MOVE command with length from M0 register */\n-\t\tMOVE(p, IFIFOAB1, 0, OFIFO, 0, 0, IMMED);\n-\n-\t\t/* Enable automatic Info FIFO entries */\n-\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t}\n+\tMOVE(p, AB1, 0, OFIFO, 0, MATH0, 0);\n \n \tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \n-\tif (rta_sec_era < RTA_SEC_ERA_3) {\n-\t\tPATCH_MOVE(p, move_cmd_read_descbuf, local_offset);\n-\t\tPATCH_MOVE(p, move_cmd_write_descbuf, local_offset);\n-\t}\n \treturn 0;\n }\n \n@@ -490,13 +389,12 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\t\t       bool swap __maybe_unused,\n \t\t\t       struct alginfo *cipherdata __maybe_unused,\n \t\t\t       struct alginfo *authdata, unsigned int dir,\n-\t\t\t       enum pdcp_sn_size sn_size,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n \t/* 12 bit SN is only supported for protocol offload case */\n-\tif (rta_sec_era >= RTA_SEC_ERA_8 && sn_size == PDCP_SN_SIZE_12) {\n+\tif (sn_size == PDCP_SN_SIZE_12) {\n \t\tKEY(p, KEY2, authdata->key_enc_flags, authdata->key,\n \t\t    authdata->keylen, INLINE_KEY(authdata));\n \n@@ -526,9 +424,6 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\treturn -ENOTSUP;\n \n \t}\n-\tLABEL(local_offset);\n-\tREFERENCE(move_cmd_read_descbuf);\n-\tREFERENCE(move_cmd_write_descbuf);\n \n \tswitch (authdata->algtype) {\n \tcase PDCP_AUTH_TYPE_SNOW:\n@@ -538,14 +433,7 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\tSEQLOAD(p, MATH0, offset, length, 0);\n \t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2 ||\n-\t\t    (rta_sec_era == RTA_SEC_ERA_2 &&\n-\t\t\t\t   era_2_sw_hfn_ovrd == 0)) {\n-\t\t\tSEQINPTR(p, 0, length, RTO);\n-\t\t} else {\n-\t\t\tSEQINPTR(p, 0, 5, RTO);\n-\t\t\tSEQFIFOLOAD(p, SKIP, 4, 0);\n-\t\t}\n+\t\tSEQINPTR(p, 0, length, RTO);\n \n \t\tif (swap == false) {\n \t\t\tMATHB(p, MATH0, AND, sn_mask, MATH1,  8,\n@@ -580,40 +468,11 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\t\tMATHB(p, SEQINSZ, SUB, PDCP_MAC_I_LEN, MATH1, 4,\n \t\t\t      IMMED2);\n \t\t} else {\n-\t\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\t} else {\n-\t\t\t\tMATHB(p, SEQINSZ, ADD, ONE, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\t\tMATHB(p, MATH1, SUB, ONE, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\t}\n+\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4, 0);\n \t\t}\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMATHB(p, MATH1, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\t\tMATHB(p, MATH1, SUB, ZERO, VSEQOUTSZ, 4, 0);\n-\t\t} else {\n-\t\t\tMATHB(p, ZERO, ADD, MATH1, VSEQINSZ, 4, 0);\n-\t\t\tMATHB(p, ZERO, ADD, MATH1, VSEQOUTSZ, 4, 0);\n-\n-\t\t\t/*\n-\t\t\t * Since MOVELEN is available only starting with\n-\t\t\t * SEC ERA 3, use poor man's MOVELEN: create a MOVE\n-\t\t\t * command dynamically by writing the length from M1 by\n-\t\t\t * OR-ing the command in the M1 register and MOVE the\n-\t\t\t * result into the descriptor buffer. Care must be taken\n-\t\t\t * wrt. the location of the command because of SEC\n-\t\t\t * pipelining. The actual MOVEs are written at the end\n-\t\t\t * of the descriptor due to calculations needed on the\n-\t\t\t * offset in the descriptor for the MOVE command.\n-\t\t\t */\n-\t\t\tmove_cmd_read_descbuf = MOVE(p, DESCBUF, 0, MATH1, 0, 6,\n-\t\t\t\t\t\t     IMMED);\n-\t\t\tmove_cmd_write_descbuf = MOVE(p, MATH1, 0, DESCBUF, 0,\n-\t\t\t\t\t\t      8, WAITCOMP | IMMED);\n-\t\t}\n+\t\tMATHB(p, MATH1, SUB, ZERO, VSEQINSZ, 4, 0);\n+\t\tMATHB(p, MATH1, SUB, ZERO, VSEQOUTSZ, 4, 0);\n \n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \t\tALG_OPERATION(p, OP_ALG_ALGSEL_SNOW_F9, OP_ALG_AAI_F9,\n@@ -622,25 +481,9 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\t\t\t     ICV_CHECK_DISABLE : ICV_CHECK_ENABLE,\n \t\t\t      DIR_ENC);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tSEQFIFOLOAD(p, MSGINSNOOP, 0,\n+\t\tSEQFIFOLOAD(p, MSGINSNOOP, 0,\n \t\t\t\t    VLF | LAST1 | LAST2 | FLUSH1);\n-\t\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH1, 0);\n-\t\t} else {\n-\t\t\tSEQFIFOLOAD(p, MSGINSNOOP, 0,\n-\t\t\t\t    VLF | LAST1 | LAST2 | FLUSH1);\n-\t\t\tSET_LABEL(p, local_offset);\n-\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t\t/*\n-\t\t\t * Placeholder for MOVE command with length from M1\n-\t\t\t * register\n-\t\t\t */\n-\t\t\tMOVE(p, IFIFOAB1, 0, OFIFO, 0, 0, IMMED);\n-\t\t\t/* Enable automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t}\n+\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH1, 0);\n \n \t\tif (dir == OP_TYPE_DECAP_PROTOCOL)\n \t\t\tSEQFIFOLOAD(p, ICV2, 4, LAST2);\n@@ -655,14 +498,7 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\t    authdata->keylen, INLINE_KEY(authdata));\n \t\tSEQLOAD(p, MATH0, offset, length, 0);\n \t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);\n-\t\tif (rta_sec_era > RTA_SEC_ERA_2 ||\n-\t\t    (rta_sec_era == RTA_SEC_ERA_2 &&\n-\t\t     era_2_sw_hfn_ovrd == 0)) {\n-\t\t\tSEQINPTR(p, 0, length, RTO);\n-\t\t} else {\n-\t\t\tSEQINPTR(p, 0, 5, RTO);\n-\t\t\tSEQFIFOLOAD(p, SKIP, 4, 0);\n-\t\t}\n+\t\tSEQINPTR(p, 0, length, RTO);\n \n \t\tif (swap == false) {\n \t\t\tMATHB(p, MATH0, AND, sn_mask, MATH1, 8,\n@@ -686,40 +522,12 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\t\tMATHB(p, SEQINSZ, SUB, PDCP_MAC_I_LEN, MATH1, 4,\n \t\t\t      IMMED2);\n \t\t} else {\n-\t\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\t} else {\n-\t\t\t\tMATHB(p, SEQINSZ, ADD, ONE, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\t\tMATHB(p, MATH1, SUB, ONE, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\t}\n+\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4, 0);\n \t\t}\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMATHB(p, MATH1, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\t\tMATHB(p, MATH1, SUB, ZERO, VSEQOUTSZ, 4, 0);\n-\t\t} else {\n-\t\t\tMATHB(p, ZERO, ADD, MATH1, VSEQINSZ, 4, 0);\n-\t\t\tMATHB(p, ZERO, ADD, MATH1, VSEQOUTSZ, 4, 0);\n-\n-\t\t\t/*\n-\t\t\t * Since MOVELEN is available only starting with\n-\t\t\t * SEC ERA 3, use poor man's MOVELEN: create a MOVE\n-\t\t\t * command dynamically by writing the length from M1 by\n-\t\t\t * OR-ing the command in the M1 register and MOVE the\n-\t\t\t * result into the descriptor buffer. Care must be taken\n-\t\t\t * wrt. the location of the command because of SEC\n-\t\t\t * pipelining. The actual MOVEs are written at the end\n-\t\t\t * of the descriptor due to calculations needed on the\n-\t\t\t * offset in the descriptor for the MOVE command.\n-\t\t\t */\n-\t\t\tmove_cmd_read_descbuf = MOVE(p, DESCBUF, 0, MATH1, 0, 6,\n-\t\t\t\t\t\t     IMMED);\n-\t\t\tmove_cmd_write_descbuf = MOVE(p, MATH1, 0, DESCBUF, 0,\n-\t\t\t\t\t\t      8, WAITCOMP | IMMED);\n-\t\t}\n+\t\tMATHB(p, MATH1, SUB, ZERO, VSEQINSZ, 4, 0);\n+\t\tMATHB(p, MATH1, SUB, ZERO, VSEQOUTSZ, 4, 0);\n+\n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \t\tALG_OPERATION(p, OP_ALG_ALGSEL_AES,\n \t\t\t      OP_ALG_AAI_CMAC,\n@@ -728,27 +536,9 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\t\t\t     ICV_CHECK_DISABLE : ICV_CHECK_ENABLE,\n \t\t\t      DIR_ENC);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMOVE(p, AB2, 0, OFIFO, 0, MATH1, 0);\n-\t\t\tSEQFIFOLOAD(p, MSGINSNOOP, 0,\n+\t\tMOVE(p, AB2, 0, OFIFO, 0, MATH1, 0);\n+\t\tSEQFIFOLOAD(p, MSGINSNOOP, 0,\n \t\t\t\t    VLF | LAST1 | LAST2 | FLUSH1);\n-\t\t} else {\n-\t\t\tSEQFIFOLOAD(p, MSGINSNOOP, 0,\n-\t\t\t\t    VLF | LAST1 | LAST2 | FLUSH1);\n-\t\t\tSET_LABEL(p, local_offset);\n-\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\n-\t\t\t/*\n-\t\t\t * Placeholder for MOVE command with length from\n-\t\t\t * M1 register\n-\t\t\t */\n-\t\t\tMOVE(p, IFIFOAB2, 0, OFIFO, 0, 0, IMMED);\n-\n-\t\t\t/* Enable automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t}\n \n \t\tif (dir == OP_TYPE_DECAP_PROTOCOL)\n \t\t\tSEQFIFOLOAD(p, ICV1, 4, LAST1 | FLUSH1);\n@@ -758,10 +548,6 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\tbreak;\n \n \tcase PDCP_AUTH_TYPE_ZUC:\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n \t\t/* Insert Auth Key */\n \t\tKEY(p, KEY2, authdata->key_enc_flags, authdata->key,\n \t\t    authdata->keylen, INLINE_KEY(authdata));\n@@ -817,11 +603,6 @@ pdcp_insert_cplane_int_only_op(struct program *p,\n \t\treturn -EINVAL;\n \t}\n \n-\tif (rta_sec_era < RTA_SEC_ERA_3) {\n-\t\tPATCH_MOVE(p, move_cmd_read_descbuf, local_offset);\n-\t\tPATCH_MOVE(p, move_cmd_write_descbuf, local_offset);\n-\t}\n-\n \treturn 0;\n }\n \n@@ -831,15 +612,14 @@ pdcp_insert_cplane_enc_only_op(struct program *p,\n \t\t\t       struct alginfo *cipherdata,\n \t\t\t       struct alginfo *authdata __maybe_unused,\n \t\t\t       unsigned int dir,\n-\t\t\t       enum pdcp_sn_size sn_size,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t       enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \t/* Insert Cipher Key */\n \tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n \t    cipherdata->keylen, INLINE_KEY(cipherdata));\n \n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18 &&\n+\tif ((sn_size != PDCP_SN_SIZE_18 &&\n \t\t\t!(rta_sec_era == RTA_SEC_ERA_8 &&\n \t\t\t\tauthdata->algtype == 0))\n \t\t\t|| (rta_sec_era == RTA_SEC_ERA_10)) {\n@@ -889,12 +669,7 @@ pdcp_insert_cplane_enc_only_op(struct program *p,\n \tcase PDCP_CIPHER_TYPE_SNOW:\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 8, WAITCOMP | IMMED);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\t} else {\n-\t\t\tMATHB(p, SEQINSZ, SUB, ONE, MATH1, 4, 0);\n-\t\t\tMATHB(p, MATH1, ADD, ONE, VSEQINSZ, 4, 0);\n-\t\t}\n+\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n \n \t\tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n \t\t\tMATHB(p, SEQINSZ, ADD, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n@@ -913,12 +688,7 @@ pdcp_insert_cplane_enc_only_op(struct program *p,\n \tcase PDCP_CIPHER_TYPE_AES:\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0x10, 0x10, WAITCOMP | IMMED);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\t} else {\n-\t\t\tMATHB(p, SEQINSZ, SUB, ONE, MATH1, 4, 0);\n-\t\t\tMATHB(p, MATH1, ADD, ONE, VSEQINSZ, 4, 0);\n-\t\t}\n+\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n \n \t\tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n \t\t\tMATHB(p, SEQINSZ, ADD, PDCP_MAC_I_LEN, VSEQOUTSZ, 4,\n@@ -937,11 +707,6 @@ pdcp_insert_cplane_enc_only_op(struct program *p,\n \t\tbreak;\n \n \tcase PDCP_CIPHER_TYPE_ZUC:\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 0x08, IMMED);\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0x08, 0x08, WAITCOMP | IMMED);\n \t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n@@ -988,8 +753,7 @@ pdcp_insert_uplane_snow_snow_op(struct program *p,\n \t\t\t      struct alginfo *cipherdata,\n \t\t\t      struct alginfo *authdata,\n \t\t\t      unsigned int dir,\n-\t\t\t      enum pdcp_sn_size sn_size,\n-\t\t\t      unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t      enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n@@ -998,7 +762,7 @@ pdcp_insert_uplane_snow_snow_op(struct program *p,\n \tKEY(p, KEY2, authdata->key_enc_flags, authdata->key, authdata->keylen,\n \t    INLINE_KEY(authdata));\n \n-\tif (rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) {\n+\tif (sn_size != PDCP_SN_SIZE_18) {\n \t\tint pclid;\n \n \t\tif (sn_size == PDCP_SN_SIZE_5)\n@@ -1014,18 +778,13 @@ pdcp_insert_uplane_snow_snow_op(struct program *p,\n \t}\n \t/* Non-proto is supported only for 5bit cplane and 18bit uplane */\n \tswitch (sn_size) {\n-\tcase PDCP_SN_SIZE_5:\n-\t\toffset = 7;\n-\t\tlength = 1;\n-\t\tsn_mask = (swap == false) ? PDCP_C_PLANE_SN_MASK :\n-\t\t\t\t\tPDCP_C_PLANE_SN_MASK_BE;\n-\t\tbreak;\n \tcase PDCP_SN_SIZE_18:\n \t\toffset = 5;\n \t\tlength = 3;\n \t\tsn_mask = (swap == false) ? PDCP_U_PLANE_18BIT_SN_MASK :\n \t\t\t\t\tPDCP_U_PLANE_18BIT_SN_MASK_BE;\n \t\tbreak;\n+\tcase PDCP_SN_SIZE_5:\n \tcase PDCP_SN_SIZE_7:\n \tcase PDCP_SN_SIZE_12:\n \tcase PDCP_SN_SIZE_15:\n@@ -1094,20 +853,13 @@ pdcp_insert_uplane_snow_snow_op(struct program *p,\n \t\tSEQFIFOLOAD(p, MSG1, 4, LAST1 | FLUSH1);\n \t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CLASS1 | NOP | NIFP);\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_6)\n-\t\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n+\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n \n \t\tMOVE(p, OFIFO, 0, MATH0, 0, 4, WAITCOMP | IMMED);\n \n \t\tNFIFOADD(p, IFIFO, ICV2, 4, LAST2);\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_2) {\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t\tMOVE(p, MATH0, 0, IFIFOAB2, 0, 4, WAITCOMP | IMMED);\n-\t\t} else {\n-\t\t\tMOVE(p, MATH0, 0, IFIFO, 0, 4, WAITCOMP | IMMED);\n-\t\t}\n+\t\tMOVE(p, MATH0, 0, IFIFO, 0, 4, WAITCOMP | IMMED);\n \t}\n \n \treturn 0;\n@@ -1119,19 +871,13 @@ pdcp_insert_uplane_zuc_zuc_op(struct program *p,\n \t\t\t      struct alginfo *cipherdata,\n \t\t\t      struct alginfo *authdata,\n \t\t\t      unsigned int dir,\n-\t\t\t      enum pdcp_sn_size sn_size,\n-\t\t\t      unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t      enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n \tLABEL(keyjump);\n \tREFERENCE(pkeyjump);\n \n-\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\treturn -ENOTSUP;\n-\t}\n-\n \tpkeyjump = JUMP(p, keyjump, LOCAL_JUMP, ALL_TRUE, SHRD | SELF | BOTH);\n \tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n \t    cipherdata->keylen, INLINE_KEY(cipherdata));\n@@ -1141,7 +887,7 @@ pdcp_insert_uplane_zuc_zuc_op(struct program *p,\n \tSET_LABEL(p, keyjump);\n \tPATCH_JUMP(p, pkeyjump, keyjump);\n \n-\tif (rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) {\n+\tif (sn_size != PDCP_SN_SIZE_18) {\n \t\tint pclid;\n \n \t\tif (sn_size == PDCP_SN_SIZE_5)\n@@ -1157,18 +903,13 @@ pdcp_insert_uplane_zuc_zuc_op(struct program *p,\n \t}\n \t/* Non-proto is supported only for 5bit cplane and 18bit uplane */\n \tswitch (sn_size) {\n-\tcase PDCP_SN_SIZE_5:\n-\t\toffset = 7;\n-\t\tlength = 1;\n-\t\tsn_mask = (swap == false) ? PDCP_C_PLANE_SN_MASK :\n-\t\t\t\t\tPDCP_C_PLANE_SN_MASK_BE;\n-\t\tbreak;\n \tcase PDCP_SN_SIZE_18:\n \t\toffset = 5;\n \t\tlength = 3;\n \t\tsn_mask = (swap == false) ? PDCP_U_PLANE_18BIT_SN_MASK :\n \t\t\t\t\tPDCP_U_PLANE_18BIT_SN_MASK_BE;\n \t\tbreak;\n+\tcase PDCP_SN_SIZE_5:\n \tcase PDCP_SN_SIZE_7:\n \tcase PDCP_SN_SIZE_12:\n \tcase PDCP_SN_SIZE_15:\n@@ -1243,12 +984,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,\n \t\t\t      struct alginfo *cipherdata,\n \t\t\t      struct alginfo *authdata,\n \t\t\t      unsigned int dir,\n-\t\t\t      enum pdcp_sn_size sn_size,\n-\t\t\t      unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t      enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18)) {\n+\tif (sn_size != PDCP_SN_SIZE_18) {\n \t\t/* Insert Auth Key */\n \t\tKEY(p, KEY2, authdata->key_enc_flags, authdata->key,\n \t\t    authdata->keylen, INLINE_KEY(authdata));\n@@ -1392,8 +1132,7 @@ pdcp_insert_cplane_acc_op(struct program *p,\n \t\t\t  struct alginfo *cipherdata,\n \t\t\t  struct alginfo *authdata,\n \t\t\t  unsigned int dir,\n-\t\t\t  enum pdcp_sn_size sn_size,\n-\t\t\t  unsigned char era_2_hfn_ovrd __maybe_unused)\n+\t\t\t  enum pdcp_sn_size sn_size)\n {\n \t/* Insert Auth Key */\n \tKEY(p, KEY2, authdata->key_enc_flags, authdata->key, authdata->keylen,\n@@ -1420,8 +1159,7 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\t\t       struct alginfo *cipherdata,\n \t\t\t       struct alginfo *authdata,\n \t\t\t       unsigned int dir,\n-\t\t\t       enum pdcp_sn_size sn_size,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n@@ -1429,14 +1167,12 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \tLABEL(end_desc);\n \tLABEL(local_offset);\n \tLABEL(jump_to_beginning);\n-\tLABEL(fifo_load_mac_i_offset);\n \tREFERENCE(seqin_ptr_read);\n \tREFERENCE(seqin_ptr_write);\n \tREFERENCE(seq_out_read);\n \tREFERENCE(jump_back_to_sd_cmd);\n-\tREFERENCE(move_mac_i_to_desc_buf);\n \n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) ||\n+\tif ((sn_size != PDCP_SN_SIZE_18) ||\n \t\t(rta_sec_era == RTA_SEC_ERA_10)) {\n \t\tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n \t\t\t\tcipherdata->keylen, INLINE_KEY(cipherdata));\n@@ -1484,56 +1220,17 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \tMATHB(p, MATH1, OR, MATH2, MATH2, 8, 0);\n \tSEQSTORE(p, MATH0, offset, length, 0);\n \tif (dir == OP_TYPE_ENCAP_PROTOCOL) {\n-\t\tif (rta_sec_era > RTA_SEC_ERA_2 ||\n-\t\t    (rta_sec_era == RTA_SEC_ERA_2 &&\n-\t\t\t\t   era_2_sw_hfn_ovrd == 0)) {\n-\t\t\tSEQINPTR(p, 0, length, RTO);\n-\t\t} else {\n-\t\t\tSEQINPTR(p, 0, 5, RTO);\n-\t\t\tSEQFIFOLOAD(p, SKIP, 4, 0);\n-\t\t}\n+\t\tSEQINPTR(p, 0, length, RTO);\n+\n \t\tKEY(p, KEY1, authdata->key_enc_flags, authdata->key,\n \t\t    authdata->keylen, INLINE_KEY(authdata));\n \t\tMOVEB(p, MATH2, 0, IFIFOAB1, 0, 0x08, IMMED);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4, 0);\n-\t\t\tMATHB(p, VSEQINSZ, ADD, PDCP_MAC_I_LEN - 1, VSEQOUTSZ,\n-\t\t\t      4, IMMED2);\n-\t\t} else {\n-\t\t\tMATHB(p, SEQINSZ, SUB, MATH3, VSEQINSZ, 4, 0);\n-\t\t\tMATHB(p, VSEQINSZ, ADD, PDCP_MAC_I_LEN - 1, VSEQOUTSZ,\n-\t\t\t      4, IMMED2);\n-\t\t\t/*\n-\t\t\t * Note: Although the calculations below might seem a\n-\t\t\t * little off, the logic is the following:\n-\t\t\t *\n-\t\t\t * - SEQ IN PTR RTO below needs the full length of the\n-\t\t\t *   frame; in case of P4080_REV_2_HFN_OV_WORKAROUND,\n-\t\t\t *   this means the length of the frame to be processed\n-\t\t\t *   + 4 bytes (the HFN override flag and value).\n-\t\t\t *   The length of the frame to be processed minus 1\n-\t\t\t *   byte is in the VSIL register (because\n-\t\t\t *   VSIL = SIL + 3, due to 1 byte, the header being\n-\t\t\t *   already written by the SEQ STORE above). So for\n-\t\t\t *   calculating the length to use in RTO, I add one\n-\t\t\t *   to the VSIL value in order to obtain the total\n-\t\t\t *   frame length. This helps in case of P4080 which\n-\t\t\t *   can have the value 0 as an operand in a MATH\n-\t\t\t *   command only as SRC1 When the HFN override\n-\t\t\t *   workaround is not enabled, the length of the\n-\t\t\t *   frame is given by the SIL register; the\n-\t\t\t *   calculation is similar to the one in the SEC 4.2\n-\t\t\t *   and SEC 5.3 cases.\n-\t\t\t */\n-\t\t\tif (era_2_sw_hfn_ovrd)\n-\t\t\t\tMATHB(p, VSEQOUTSZ, ADD, ONE, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t\telse\n-\t\t\t\tMATHB(p, SEQINSZ, ADD, MATH3, MATH1, 4,\n-\t\t\t\t      0);\n-\t\t}\n+\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n+\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4, 0);\n+\t\tMATHB(p, VSEQINSZ, ADD, PDCP_MAC_I_LEN - 1, VSEQOUTSZ,\n+\t\t      4, IMMED2);\n+\n \t\t/*\n \t\t * Placeholder for filling the length in\n \t\t * SEQIN PTR RTO below\n@@ -1548,24 +1245,14 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\t\t      DIR_DEC);\n \t\tSEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);\n \t\tMOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);\n-\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\tLOAD(p, CLRW_CLR_C1KEY |\n-\t\t\t     CLRW_CLR_C1CTX |\n-\t\t\t     CLRW_CLR_C1ICV |\n-\t\t\t     CLRW_CLR_C1DATAS |\n-\t\t\t     CLRW_CLR_C1MODE,\n-\t\t\t     CLRW, 0, 4, IMMED);\n-\t\telse\n-\t\t\tLOAD(p, CLRW_RESET_CLS1_CHA |\n-\t\t\t     CLRW_CLR_C1KEY |\n-\t\t\t     CLRW_CLR_C1CTX |\n-\t\t\t     CLRW_CLR_C1ICV |\n-\t\t\t     CLRW_CLR_C1DATAS |\n-\t\t\t     CLRW_CLR_C1MODE,\n-\t\t\t     CLRW, 0, 4, IMMED);\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\tLOAD(p, CCTRL_RESET_CHA_ALL, CCTRL, 0, 4, IMMED);\n+\t\tLOAD(p, CLRW_RESET_CLS1_CHA |\n+\t\t     CLRW_CLR_C1KEY |\n+\t\t     CLRW_CLR_C1CTX |\n+\t\t     CLRW_CLR_C1ICV |\n+\t\t     CLRW_CLR_C1DATAS |\n+\t\t     CLRW_CLR_C1MODE,\n+\t\t     CLRW, 0, 4, IMMED);\n \n \t\tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n \t\t    cipherdata->keylen, INLINE_KEY(cipherdata));\n@@ -1573,11 +1260,6 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 8, IMMED);\n \t\tSEQINPTR(p, 0, 0, RTO);\n \n-\t\tif (rta_sec_era == RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd) {\n-\t\t\tSEQFIFOLOAD(p, SKIP, 5, 0);\n-\t\t\tMATHB(p, SEQINSZ, ADD, ONE, SEQINSZ, 4, 0);\n-\t\t}\n-\n \t\tMATHB(p, SEQINSZ, SUB, length, VSEQINSZ, 4, IMMED2);\n \t\tALG_OPERATION(p, OP_ALG_ALGSEL_SNOW_F8,\n \t\t\t      OP_ALG_AAI_F8,\n@@ -1586,10 +1268,7 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\t\t      DIR_ENC);\n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2 ||\n-\t\t    (rta_sec_era == RTA_SEC_ERA_2 &&\n-\t\t\t\t   era_2_sw_hfn_ovrd == 0))\n-\t\t\tSEQFIFOLOAD(p, SKIP, length, 0);\n+\t\tSEQFIFOLOAD(p, SKIP, length, 0);\n \n \t\tSEQFIFOLOAD(p, MSG1, 0, VLF);\n \t\tMOVEB(p, MATH3, 0, IFIFOAB1, 0, 4, LAST1 | FLUSH1 | IMMED);\n@@ -1598,13 +1277,9 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t} else {\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 8, IMMED);\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_5)\n-\t\t\tMOVE(p, CONTEXT1, 0, CONTEXT2, 0, 8, IMMED);\n+\t\tMOVE(p, CONTEXT1, 0, CONTEXT2, 0, 8, IMMED);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2)\n-\t\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\telse\n-\t\t\tMATHB(p, SEQINSZ, SUB, MATH3, VSEQINSZ, 4, 0);\n+\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n \n \t\tMATHI(p, SEQINSZ, SUB, PDCP_MAC_I_LEN, VSEQOUTSZ, 4, IMMED2);\n /*\n@@ -1649,10 +1324,7 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n \t\t    cipherdata->keylen, INLINE_KEY(cipherdata));\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_4)\n-\t\t\tMOVE(p, CONTEXT1, 0, CONTEXT2, 0, 8, IMMED);\n-\t\telse\n-\t\t\tMOVE(p, CONTEXT1, 0, MATH3, 0, 8, IMMED);\n+\t\tMOVE(p, CONTEXT1, 0, CONTEXT2, 0, 8, IMMED);\n \n \t\tALG_OPERATION(p, OP_ALG_ALGSEL_SNOW_F8,\n \t\t\t      OP_ALG_AAI_F8,\n@@ -1662,22 +1334,15 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF | CONT);\n \t\tSEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\tmove_mac_i_to_desc_buf = MOVE(p, OFIFO, 0, DESCBUF, 0,\n-\t\t\t\t\t\t      4, WAITCOMP | IMMED);\n-\t\telse\n-\t\t\tMOVE(p, OFIFO, 0, MATH3, 0, 4, IMMED);\n+\t\tMOVE(p, OFIFO, 0, MATH3, 0, 4, IMMED);\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\tLOAD(p, CCTRL_RESET_CHA_ALL, CCTRL, 0, 4, IMMED);\n-\t\telse\n-\t\t\tLOAD(p, CLRW_RESET_CLS1_CHA |\n-\t\t\t     CLRW_CLR_C1KEY |\n-\t\t\t     CLRW_CLR_C1CTX |\n-\t\t\t     CLRW_CLR_C1ICV |\n-\t\t\t     CLRW_CLR_C1DATAS |\n-\t\t\t     CLRW_CLR_C1MODE,\n-\t\t\t     CLRW, 0, 4, IMMED);\n+\t\tLOAD(p, CLRW_RESET_CLS1_CHA |\n+\t\t     CLRW_CLR_C1KEY |\n+\t\t     CLRW_CLR_C1CTX |\n+\t\t     CLRW_CLR_C1ICV |\n+\t\t     CLRW_CLR_C1DATAS |\n+\t\t     CLRW_CLR_C1MODE,\n+\t\t     CLRW, 0, 4, IMMED);\n \n \t\tKEY(p, KEY1, authdata->key_enc_flags, authdata->key,\n \t\t    authdata->keylen, INLINE_KEY(authdata));\n@@ -1698,28 +1363,17 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\t/* Read the # of bytes written in the output buffer + 1 (HDR) */\n \t\tMATHI(p, VSEQOUTSZ, ADD, length, VSEQINSZ, 4, IMMED2);\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\tMOVE(p, MATH3, 0, IFIFOAB1, 0, 8, IMMED);\n-\t\telse\n-\t\t\tMOVE(p, CONTEXT2, 0, IFIFOAB1, 0, 8, IMMED);\n-\n-\t\tif (rta_sec_era == RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd)\n-\t\t\tSEQFIFOLOAD(p, SKIP, 4, 0);\n+\t\tMOVE(p, CONTEXT2, 0, IFIFOAB1, 0, 8, IMMED);\n \n \t\tSEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_4) {\n-\t\t\tLOAD(p, NFIFOENTRY_STYPE_ALTSOURCE |\n-\t\t\t     NFIFOENTRY_DEST_CLASS1 |\n-\t\t\t     NFIFOENTRY_DTYPE_ICV |\n-\t\t\t     NFIFOENTRY_LC1 |\n-\t\t\t     NFIFOENTRY_FC1 | 4, NFIFO_SZL, 0, 4, IMMED);\n-\t\t\tMOVE(p, MATH3, 0, ALTSOURCE, 0, 4, IMMED);\n-\t\t} else {\n-\t\t\tSET_LABEL(p, fifo_load_mac_i_offset);\n-\t\t\tFIFOLOAD(p, ICV1, fifo_load_mac_i_offset, 4,\n-\t\t\t\t LAST1 | FLUSH1 | IMMED);\n-\t\t}\n+\t\tLOAD(p, NFIFOENTRY_STYPE_ALTSOURCE |\n+\t\t     NFIFOENTRY_DEST_CLASS1 |\n+\t\t     NFIFOENTRY_DTYPE_ICV |\n+\t\t     NFIFOENTRY_LC1 |\n+\t\t     NFIFOENTRY_FC1 | 4, NFIFO_SZL, 0, 4, IMMED);\n+\t\tMOVE(p, MATH3, 0, ALTSOURCE, 0, 4, IMMED);\n+\n \n \t\tSET_LABEL(p, end_desc);\n \n@@ -1727,18 +1381,10 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,\n \t\t\tPATCH_MOVE(p, seq_out_read, end_desc + 1);\n \t\t\tPATCH_JUMP(p, jump_back_to_sd_cmd,\n \t\t\t\t   back_to_sd_offset + jump_back_to_sd_cmd - 5);\n-\n-\t\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\t\tPATCH_MOVE(p, move_mac_i_to_desc_buf,\n-\t\t\t\t\t   fifo_load_mac_i_offset + 1);\n \t\t} else {\n \t\t\tPATCH_MOVE(p, seq_out_read, end_desc + 2);\n \t\t\tPATCH_JUMP(p, jump_back_to_sd_cmd,\n \t\t\t\t   back_to_sd_offset + jump_back_to_sd_cmd - 5);\n-\n-\t\t\tif (rta_sec_era <= RTA_SEC_ERA_3)\n-\t\t\t\tPATCH_MOVE(p, move_mac_i_to_desc_buf,\n-\t\t\t\t\t   fifo_load_mac_i_offset + 1);\n \t\t}\n \t}\n \n@@ -1751,8 +1397,7 @@ pdcp_insert_cplane_aes_snow_op(struct program *p,\n \t\t\t       struct alginfo *cipherdata,\n \t\t\t       struct alginfo *authdata,\n \t\t\t       unsigned int dir,\n-\t\t\t       enum pdcp_sn_size sn_size,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t       enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n@@ -1761,7 +1406,7 @@ pdcp_insert_cplane_aes_snow_op(struct program *p,\n \tKEY(p, KEY2, authdata->key_enc_flags, authdata->key, authdata->keylen,\n \t    INLINE_KEY(authdata));\n \n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) ||\n+\tif ((sn_size != PDCP_SN_SIZE_18) ||\n \t\t(rta_sec_era == RTA_SEC_ERA_10)) {\n \t\tint pclid;\n \n@@ -1860,20 +1505,13 @@ pdcp_insert_cplane_aes_snow_op(struct program *p,\n \t\tSEQFIFOLOAD(p, MSG1, 4, LAST1 | FLUSH1);\n \t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CLASS1 | NOP | NIFP);\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_6)\n-\t\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n+\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n \n \t\tMOVE(p, OFIFO, 0, MATH0, 0, 4, WAITCOMP | IMMED);\n \n \t\tNFIFOADD(p, IFIFO, ICV2, 4, LAST2);\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_2) {\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t\tMOVE(p, MATH0, 0, IFIFOAB2, 0, 4, WAITCOMP | IMMED);\n-\t\t} else {\n-\t\t\tMOVE(p, MATH0, 0, IFIFO, 0, 4, WAITCOMP | IMMED);\n-\t\t}\n+\t\tMOVE(p, MATH0, 0, IFIFO, 0, 4, WAITCOMP | IMMED);\n \t}\n \n \treturn 0;\n@@ -1885,20 +1523,14 @@ pdcp_insert_cplane_snow_zuc_op(struct program *p,\n \t\t\t       struct alginfo *cipherdata,\n \t\t\t       struct alginfo *authdata,\n \t\t\t       unsigned int dir,\n-\t\t\t       enum pdcp_sn_size sn_size,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t       enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \n \tLABEL(keyjump);\n \tREFERENCE(pkeyjump);\n \n-\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\treturn -ENOTSUP;\n-\t}\n-\n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) ||\n+\tif ((sn_size != PDCP_SN_SIZE_18) ||\n \t\t(rta_sec_era == RTA_SEC_ERA_10)) {\n \t\tint pclid;\n \t\tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n@@ -2010,19 +1642,13 @@ pdcp_insert_cplane_aes_zuc_op(struct program *p,\n \t\t\t      struct alginfo *cipherdata,\n \t\t\t      struct alginfo *authdata,\n \t\t\t      unsigned int dir,\n-\t\t\t      enum pdcp_sn_size sn_size,\n-\t\t\t      unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t      enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \tLABEL(keyjump);\n \tREFERENCE(pkeyjump);\n \n-\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\treturn -ENOTSUP;\n-\t}\n-\n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) ||\n+\tif ((sn_size != PDCP_SN_SIZE_18) ||\n \t\t(rta_sec_era == RTA_SEC_ERA_10)) {\n \t\tint pclid;\n \t\tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n@@ -2138,19 +1764,13 @@ pdcp_insert_cplane_zuc_snow_op(struct program *p,\n \t\t\t       struct alginfo *cipherdata,\n \t\t\t       struct alginfo *authdata,\n \t\t\t       unsigned int dir,\n-\t\t\t       enum pdcp_sn_size sn_size,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t       enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \tLABEL(keyjump);\n \tREFERENCE(pkeyjump);\n \n-\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\treturn -ENOTSUP;\n-\t}\n-\n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) ||\n+\tif ((sn_size != PDCP_SN_SIZE_18) ||\n \t\t(rta_sec_era == RTA_SEC_ERA_10)) {\n \t\tint pclid;\n \t\tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n@@ -2259,13 +1879,12 @@ pdcp_insert_cplane_zuc_snow_op(struct program *p,\n \t\tSEQFIFOLOAD(p, MSG1, 4, LAST1 | FLUSH1);\n \t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CLASS1 | NOP | NIFP);\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_6)\n-\t\t\t/*\n-\t\t\t * For SEC ERA 6, there's a problem with the OFIFO\n-\t\t\t * pointer, and thus it needs to be reset here before\n-\t\t\t * moving to M0.\n-\t\t\t */\n-\t\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n+\t\t/*\n+\t\t * For SEC ERA 6, there's a problem with the OFIFO\n+\t\t * pointer, and thus it needs to be reset here before\n+\t\t * moving to M0.\n+\t\t */\n+\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n \n \t\t/* Put ICV to M0 before sending it to C2 for comparison. */\n \t\tMOVEB(p, OFIFO, 0, MATH0, 0, 4, WAITCOMP | IMMED);\n@@ -2287,16 +1906,11 @@ pdcp_insert_cplane_zuc_aes_op(struct program *p,\n \t\t\t      struct alginfo *cipherdata,\n \t\t\t      struct alginfo *authdata,\n \t\t\t      unsigned int dir,\n-\t\t\t      enum pdcp_sn_size sn_size,\n-\t\t\t      unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t      enum pdcp_sn_size sn_size)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n-\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\treturn -ENOTSUP;\n-\t}\n \n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size != PDCP_SN_SIZE_18) ||\n+\tif ((sn_size != PDCP_SN_SIZE_18) ||\n \t\t(rta_sec_era == RTA_SEC_ERA_10)) {\n \t\tint pclid;\n \n@@ -2459,7 +2073,7 @@ pdcp_insert_uplane_no_int_op(struct program *p,\n \tKEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,\n \t    cipherdata->keylen, INLINE_KEY(cipherdata));\n \n-\tif ((rta_sec_era >= RTA_SEC_ERA_8 && sn_size == PDCP_SN_SIZE_15) ||\n+\tif ((sn_size == PDCP_SN_SIZE_15) ||\n \t\t\t(rta_sec_era >= RTA_SEC_ERA_10)) {\n \t\tPROTOCOL(p, dir, OP_PCLID_LTE_PDCP_USER,\n \t\t\t (uint16_t)cipherdata->algtype);\n@@ -2513,10 +2127,6 @@ pdcp_insert_uplane_no_int_op(struct program *p,\n \t\tbreak;\n \n \tcase PDCP_CIPHER_TYPE_ZUC:\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 0x08, IMMED);\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0x08, 0x08, WAITCOMP | IMMED);\n \n@@ -2546,7 +2156,6 @@ static inline int\n insert_hfn_ov_op(struct program *p,\n \t\t uint32_t shift,\n \t\t enum pdb_type_e pdb_type,\n-\t\t unsigned char era_2_sw_hfn_ovrd,\n \t\t bool clear_dpovrd_at_end)\n {\n \tuint32_t imm = PDCP_DPOVRD_HFN_OV_EN;\n@@ -2554,9 +2163,6 @@ insert_hfn_ov_op(struct program *p,\n \tLABEL(keyjump);\n \tREFERENCE(pkeyjump);\n \n-\tif (rta_sec_era == RTA_SEC_ERA_2 && !era_2_sw_hfn_ovrd)\n-\t\treturn 0;\n-\n \tswitch (pdb_type) {\n \tcase PDCP_PDB_TYPE_NO_PDB:\n \t\t/*\n@@ -2579,26 +2185,16 @@ insert_hfn_ov_op(struct program *p,\n \t\treturn -EINVAL;\n \t}\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMATHB(p, DPOVRD, AND, imm, NONE, 8, IFB | IMMED2);\n-\t} else {\n-\t\tSEQLOAD(p, MATH0, 4, 4, 0);\n-\t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);\n-\t\tMATHB(p, MATH0, AND, imm, NONE, 8, IFB | IMMED2);\n-\t\tSEQSTORE(p, MATH0, 4, 4, 0);\n-\t}\n+\tMATHB(p, DPOVRD, AND, imm, NONE, 8, IFB | IMMED2);\n \n \tpkeyjump = JUMP(p, keyjump, LOCAL_JUMP, ALL_TRUE, MATH_Z);\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2)\n-\t\tMATHI(p, DPOVRD, LSHIFT, shift, MATH0, 4, IMMED2);\n-\telse\n-\t\tMATHB(p, MATH0, LSHIFT, shift, MATH0, 4, IMMED2);\n+\tMATHI(p, DPOVRD, LSHIFT, shift, MATH0, 4, IMMED2);\n \n \tMATHB(p, MATH0, SHLD, MATH0, MATH0, 8, 0);\n \tMOVE(p, MATH0, 0, DESCBUF, hfn_pdb_offset, 4, IMMED);\n \n-\tif (clear_dpovrd_at_end && (rta_sec_era >= RTA_SEC_ERA_8)) {\n+\tif (clear_dpovrd_at_end) {\n \t\t/*\n \t\t * For ERA8, DPOVRD could be handled by the PROTOCOL command\n \t\t * itself. For now, this is not done. Thus, clear DPOVRD here\n@@ -2621,97 +2217,28 @@ cnstr_pdcp_c_plane_pdb(struct program *p,\n \t\t       enum pdcp_sn_size sn_size,\n \t\t       unsigned char bearer,\n \t\t       unsigned char direction,\n-\t\t       uint32_t hfn_threshold,\n-\t\t       struct alginfo *cipherdata,\n-\t\t       struct alginfo *authdata)\n+\t\t       uint32_t hfn_threshold)\n {\n \tstruct pdcp_pdb pdb;\n-\tenum pdb_type_e\n-\t\tpdb_mask[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID] = {\n-\t\t\t{\t/* NULL */\n-\t\t\t\tPDCP_PDB_TYPE_NO_PDB,\t\t/* NULL */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* SNOW f9 */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* AES CMAC */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB\t\t/* ZUC-I */\n-\t\t\t},\n-\t\t\t{\t/* SNOW f8 */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* NULL */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* SNOW f9 */\n-\t\t\t\tPDCP_PDB_TYPE_REDUCED_PDB,\t/* AES CMAC */\n-\t\t\t\tPDCP_PDB_TYPE_REDUCED_PDB\t/* ZUC-I */\n-\t\t\t},\n-\t\t\t{\t/* AES CTR */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* NULL */\n-\t\t\t\tPDCP_PDB_TYPE_REDUCED_PDB,\t/* SNOW f9 */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* AES CMAC */\n-\t\t\t\tPDCP_PDB_TYPE_REDUCED_PDB\t/* ZUC-I */\n-\t\t\t},\n-\t\t\t{\t/* ZUC-E */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB,\t\t/* NULL */\n-\t\t\t\tPDCP_PDB_TYPE_REDUCED_PDB,\t/* SNOW f9 */\n-\t\t\t\tPDCP_PDB_TYPE_REDUCED_PDB,\t/* AES CMAC */\n-\t\t\t\tPDCP_PDB_TYPE_FULL_PDB\t\t/* ZUC-I */\n-\t\t\t},\n-\t};\n-\n-\tif (rta_sec_era >= RTA_SEC_ERA_8) {\n-\t\tmemset(&pdb, 0x00, sizeof(struct pdcp_pdb));\n-\n-\t\t/* To support 12-bit seq numbers, we use u-plane opt in pdb.\n-\t\t * SEC supports 5-bit only with c-plane opt in pdb.\n-\t\t */\n-\t\tif (sn_size == PDCP_SN_SIZE_12) {\n-\t\t\tpdb.hfn_res = hfn << PDCP_U_PLANE_PDB_LONG_SN_HFN_SHIFT;\n-\t\t\tpdb.bearer_dir_res = (uint32_t)\n-\t\t\t\t((bearer << PDCP_U_PLANE_PDB_BEARER_SHIFT) |\n-\t\t\t\t (direction << PDCP_U_PLANE_PDB_DIR_SHIFT));\n-\n-\t\t\tpdb.hfn_thr_res =\n-\t\t\thfn_threshold << PDCP_U_PLANE_PDB_LONG_SN_HFN_THR_SHIFT;\n-\n-\t\t} else {\n-\t\t\t/* This means 5-bit c-plane.\n-\t\t\t * Here we use c-plane opt in pdb\n-\t\t\t */\n-\n-\t\t\t/* This is a HW issue. Bit 2 should be set to zero,\n-\t\t\t * but it does not work this way. Override here.\n-\t\t\t */\n-\t\t\tpdb.opt_res.rsvd = 0x00000002;\n-\n-\t\t\t/* Copy relevant information from user to PDB */\n-\t\t\tpdb.hfn_res = hfn << PDCP_C_PLANE_PDB_HFN_SHIFT;\n-\t\t\tpdb.bearer_dir_res = (uint32_t)\n-\t\t\t\t((bearer << PDCP_C_PLANE_PDB_BEARER_SHIFT) |\n-\t\t\t\t(direction << PDCP_C_PLANE_PDB_DIR_SHIFT));\n-\t\t\tpdb.hfn_thr_res =\n-\t\t\thfn_threshold << PDCP_C_PLANE_PDB_HFN_THR_SHIFT;\n-\t\t}\n-\n-\t\t/* copy PDB in descriptor*/\n-\t\t__rta_out32(p, pdb.opt_res.opt);\n-\t\t__rta_out32(p, pdb.hfn_res);\n-\t\t__rta_out32(p, pdb.bearer_dir_res);\n-\t\t__rta_out32(p, pdb.hfn_thr_res);\n \n-\t\treturn PDCP_PDB_TYPE_FULL_PDB;\n-\t}\n+\tmemset(&pdb, 0x00, sizeof(struct pdcp_pdb));\n \n-\tswitch (pdb_mask[cipherdata->algtype][authdata->algtype]) {\n-\tcase PDCP_PDB_TYPE_NO_PDB:\n-\t\tbreak;\n+\t/* To support 12-bit seq numbers, we use u-plane opt in pdb.\n+\t * SEC supports 5-bit only with c-plane opt in pdb.\n+\t */\n+\tif (sn_size == PDCP_SN_SIZE_12) {\n+\t\tpdb.hfn_res = hfn << PDCP_U_PLANE_PDB_LONG_SN_HFN_SHIFT;\n+\t\tpdb.bearer_dir_res = (uint32_t)\n+\t\t\t((bearer << PDCP_U_PLANE_PDB_BEARER_SHIFT) |\n+\t\t\t (direction << PDCP_U_PLANE_PDB_DIR_SHIFT));\n \n-\tcase PDCP_PDB_TYPE_REDUCED_PDB:\n-\t\t__rta_out32(p, (hfn << PDCP_C_PLANE_PDB_HFN_SHIFT));\n-\t\t__rta_out32(p,\n-\t\t\t    (uint32_t)((bearer <<\n-\t\t\t\t\tPDCP_C_PLANE_PDB_BEARER_SHIFT) |\n-\t\t\t\t\t(direction <<\n-\t\t\t\t\t PDCP_C_PLANE_PDB_DIR_SHIFT)));\n-\t\tbreak;\n+\t\tpdb.hfn_thr_res =\n+\t\thfn_threshold << PDCP_U_PLANE_PDB_LONG_SN_HFN_THR_SHIFT;\n \n-\tcase PDCP_PDB_TYPE_FULL_PDB:\n-\t\tmemset(&pdb, 0x00, sizeof(struct pdcp_pdb));\n+\t} else {\n+\t\t/* This means 5-bit c-plane.\n+\t\t * Here we use c-plane opt in pdb\n+\t\t */\n \n \t\t/* This is a HW issue. Bit 2 should be set to zero,\n \t\t * but it does not work this way. Override here.\n@@ -2722,23 +2249,18 @@ cnstr_pdcp_c_plane_pdb(struct program *p,\n \t\tpdb.hfn_res = hfn << PDCP_C_PLANE_PDB_HFN_SHIFT;\n \t\tpdb.bearer_dir_res = (uint32_t)\n \t\t\t((bearer << PDCP_C_PLANE_PDB_BEARER_SHIFT) |\n-\t\t\t (direction << PDCP_C_PLANE_PDB_DIR_SHIFT));\n+\t\t\t(direction << PDCP_C_PLANE_PDB_DIR_SHIFT));\n \t\tpdb.hfn_thr_res =\n-\t\t\thfn_threshold << PDCP_C_PLANE_PDB_HFN_THR_SHIFT;\n-\n-\t\t/* copy PDB in descriptor*/\n-\t\t__rta_out32(p, pdb.opt_res.opt);\n-\t\t__rta_out32(p, pdb.hfn_res);\n-\t\t__rta_out32(p, pdb.bearer_dir_res);\n-\t\t__rta_out32(p, pdb.hfn_thr_res);\n-\n-\t\tbreak;\n-\n-\tdefault:\n-\t\treturn PDCP_PDB_TYPE_INVALID;\n+\t\thfn_threshold << PDCP_C_PLANE_PDB_HFN_THR_SHIFT;\n \t}\n \n-\treturn pdb_mask[cipherdata->algtype][authdata->algtype];\n+\t/* copy PDB in descriptor*/\n+\t__rta_out32(p, pdb.opt_res.opt);\n+\t__rta_out32(p, pdb.hfn_res);\n+\t__rta_out32(p, pdb.bearer_dir_res);\n+\t__rta_out32(p, pdb.hfn_thr_res);\n+\n+\treturn PDCP_PDB_TYPE_FULL_PDB;\n }\n \n /*\n@@ -2817,7 +2339,7 @@ cnstr_pdcp_u_plane_pdb(struct program *p,\n \t\tpdb.hfn_thr_res =\n \t\t\thfn_threshold<<PDCP_U_PLANE_PDB_18BIT_SN_HFN_THR_SHIFT;\n \n-\t\tif (rta_sec_era <= RTA_SEC_ERA_8) {\n+\t\tif (rta_sec_era == RTA_SEC_ERA_8) {\n \t\t\tif (cipherdata && authdata)\n \t\t\t\tpdb_type = pdb_mask[cipherdata->algtype]\n \t\t\t\t\t\t   [authdata->algtype];\n@@ -2857,6 +2379,7 @@ cnstr_pdcp_u_plane_pdb(struct program *p,\n \n \treturn pdb_type;\n }\n+\n /**\n  * cnstr_shdsc_pdcp_c_plane_encap - Function for creating a PDCP Control Plane\n  *                                  encapsulation descriptor.\n@@ -2874,9 +2397,6 @@ cnstr_pdcp_u_plane_pdb(struct program *p,\n  *              Valid algorithm values are those from cipher_type_pdcp enum.\n  * @authdata: pointer to authentication transform definitions\n  *            Valid algorithm values are those from auth_type_pdcp enum.\n- * @era_2_sw_hfn_ovrd: if software HFN override mechanism is desired for\n- *                     this descriptor. Note: Can only be used for\n- *                     SEC ERA 2.\n  * Return: size of descriptor written in words or negative number on error.\n  *         Once the function returns, the value of this parameter can be used\n  *         for reclaiming the space that wasn't used for the descriptor.\n@@ -2895,14 +2415,12 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf,\n \t\t\t       unsigned char direction,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n-\t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       struct alginfo *authdata)\n {\n \tstatic int\n \t\t(*pdcp_cp_fp[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID])\n \t\t\t(struct program*, bool swap, struct alginfo *,\n-\t\t\t struct alginfo *, unsigned int, enum pdcp_sn_size,\n-\t\t\tunsigned char __maybe_unused) = {\n+\t\t\t struct alginfo *, unsigned int dir, enum pdcp_sn_size) = {\n \t\t{\t/* NULL */\n \t\t\tpdcp_insert_cplane_null_op,\t/* NULL */\n \t\t\tpdcp_insert_cplane_int_only_op,\t/* SNOW f9 */\n@@ -2961,11 +2479,6 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf,\n \tint err;\n \tLABEL(pdb_end);\n \n-\tif (rta_sec_era != RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd) {\n-\t\tpr_err(\"Cannot select SW HFN override for other era than 2\");\n-\t\treturn -EINVAL;\n-\t}\n-\n \tif (sn_size != PDCP_SN_SIZE_12 && sn_size != PDCP_SN_SIZE_5) {\n \t\tpr_err(\"C-plane supports only 5-bit and 12-bit sequence numbers\\n\");\n \t\treturn -EINVAL;\n@@ -2984,14 +2497,11 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf,\n \t\t\tsn_size,\n \t\t\tbearer,\n \t\t\tdirection,\n-\t\t\thfn_threshold,\n-\t\t\tcipherdata,\n-\t\t\tauthdata);\n+\t\t\thfn_threshold);\n \n \tSET_LABEL(p, pdb_end);\n \n-\terr = insert_hfn_ov_op(p, sn_size, pdb_type,\n-\t\t\t       era_2_sw_hfn_ovrd, true);\n+\terr = insert_hfn_ov_op(p, sn_size, pdb_type, true);\n \tif (err)\n \t\treturn err;\n \n@@ -3000,8 +2510,7 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf,\n \t\tcipherdata,\n \t\tauthdata,\n \t\tOP_TYPE_ENCAP_PROTOCOL,\n-\t\tsn_size,\n-\t\tera_2_sw_hfn_ovrd);\n+\t\tsn_size);\n \tif (err)\n \t\treturn err;\n \n@@ -3027,9 +2536,6 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf,\n  *              Valid algorithm values are those from cipher_type_pdcp enum.\n  * @authdata: pointer to authentication transform definitions\n  *            Valid algorithm values are those from auth_type_pdcp enum.\n- * @era_2_sw_hfn_ovrd: if software HFN override mechanism is desired for\n- *                     this descriptor. Note: Can only be used for\n- *                     SEC ERA 2.\n  *\n  * Return: size of descriptor written in words or negative number on error.\n  *         Once the function returns, the value of this parameter can be used\n@@ -3049,14 +2555,12 @@ cnstr_shdsc_pdcp_c_plane_decap(uint32_t *descbuf,\n \t\t\t       unsigned char direction,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n-\t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       struct alginfo *authdata)\n {\n \tstatic int\n \t\t(*pdcp_cp_fp[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID])\n \t\t\t(struct program*, bool swap, struct alginfo *,\n-\t\t\t struct alginfo *, unsigned int, enum pdcp_sn_size,\n-\t\t\t unsigned char) = {\n+\t\t\t struct alginfo *, unsigned int dir, enum pdcp_sn_size) = {\n \t\t{\t/* NULL */\n \t\t\tpdcp_insert_cplane_null_op,\t/* NULL */\n \t\t\tpdcp_insert_cplane_int_only_op,\t/* SNOW f9 */\n@@ -3115,11 +2619,6 @@ cnstr_shdsc_pdcp_c_plane_decap(uint32_t *descbuf,\n \tint err;\n \tLABEL(pdb_end);\n \n-\tif (rta_sec_era != RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd) {\n-\t\tpr_err(\"Cannot select SW HFN override for other era than 2\");\n-\t\treturn -EINVAL;\n-\t}\n-\n \tif (sn_size != PDCP_SN_SIZE_12 && sn_size != PDCP_SN_SIZE_5) {\n \t\tpr_err(\"C-plane supports only 5-bit and 12-bit sequence numbers\\n\");\n \t\treturn -EINVAL;\n@@ -3138,14 +2637,11 @@ cnstr_shdsc_pdcp_c_plane_decap(uint32_t *descbuf,\n \t\t\tsn_size,\n \t\t\tbearer,\n \t\t\tdirection,\n-\t\t\thfn_threshold,\n-\t\t\tcipherdata,\n-\t\t\tauthdata);\n+\t\t\thfn_threshold);\n \n \tSET_LABEL(p, pdb_end);\n \n-\terr = insert_hfn_ov_op(p, sn_size, pdb_type,\n-\t\t\t       era_2_sw_hfn_ovrd, true);\n+\terr = insert_hfn_ov_op(p, sn_size, pdb_type, true);\n \tif (err)\n \t\treturn err;\n \n@@ -3154,8 +2650,7 @@ cnstr_shdsc_pdcp_c_plane_decap(uint32_t *descbuf,\n \t\tcipherdata,\n \t\tauthdata,\n \t\tOP_TYPE_DECAP_PROTOCOL,\n-\t\tsn_size,\n-\t\tera_2_sw_hfn_ovrd);\n+\t\tsn_size);\n \tif (err)\n \t\treturn err;\n \n@@ -3170,14 +2665,12 @@ pdcp_insert_uplane_with_int_op(struct program *p,\n \t\t\t      struct alginfo *cipherdata,\n \t\t\t      struct alginfo *authdata,\n \t\t\t      enum pdcp_sn_size sn_size,\n-\t\t\t      unsigned char era_2_sw_hfn_ovrd,\n \t\t\t      unsigned int dir)\n {\n \tstatic int\n \t\t(*pdcp_cp_fp[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID])\n \t\t\t(struct program*, bool swap, struct alginfo *,\n-\t\t\t struct alginfo *, unsigned int, enum pdcp_sn_size,\n-\t\t\tunsigned char __maybe_unused) = {\n+\t\t\t struct alginfo *, unsigned int dir, enum pdcp_sn_size) = {\n \t\t{\t/* NULL */\n \t\t\tpdcp_insert_cplane_null_op,\t/* NULL */\n \t\t\tpdcp_insert_cplane_int_only_op,\t/* SNOW f9 */\n@@ -3210,8 +2703,7 @@ pdcp_insert_uplane_with_int_op(struct program *p,\n \t\tcipherdata,\n \t\tauthdata,\n \t\tdir,\n-\t\tsn_size,\n-\t\tera_2_sw_hfn_ovrd);\n+\t\tsn_size);\n \tif (err)\n \t\treturn err;\n \n@@ -3234,9 +2726,6 @@ pdcp_insert_uplane_with_int_op(struct program *p,\n  *                 keys should be renegotiated at the earliest convenience.\n  * @cipherdata: pointer to block cipher transform definitions\n  *              Valid algorithm values are those from cipher_type_pdcp enum.\n- * @era_2_sw_hfn_ovrd: if software HFN override mechanism is desired for\n- *                     this descriptor. Note: Can only be used for\n- *                     SEC ERA 2.\n  *\n  * Return: size of descriptor written in words or negative number on error.\n  *         Once the function returns, the value of this parameter can be used\n@@ -3256,8 +2745,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n \t\t\t       unsigned short direction,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n-\t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       struct alginfo *authdata)\n {\n \tstruct program prg;\n \tstruct program *p = &prg;\n@@ -3292,16 +2780,6 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n \t};\n \tLABEL(pdb_end);\n \n-\tif (rta_sec_era != RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd) {\n-\t\tpr_err(\"Cannot select SW HFN ovrd for other era than 2\");\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (authdata && !authdata->algtype && rta_sec_era < RTA_SEC_ERA_8) {\n-\t\tpr_err(\"Cannot use u-plane auth with era < 8\");\n-\t\treturn -EINVAL;\n-\t}\n-\n \tPROGRAM_CNTXT_INIT(p, descbuf, 0);\n \tif (swap)\n \t\tPROGRAM_SET_BSWAP(p);\n@@ -3321,7 +2799,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n \t}\n \tSET_LABEL(p, pdb_end);\n \n-\terr = insert_hfn_ov_op(p, sn_size, pdb_type, era_2_sw_hfn_ovrd, true);\n+\terr = insert_hfn_ov_op(p, sn_size, pdb_type, true);\n \tif (err)\n \t\treturn err;\n \n@@ -3330,10 +2808,6 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n \tcase PDCP_SN_SIZE_12:\n \t\tswitch (cipherdata->algtype) {\n \t\tcase PDCP_CIPHER_TYPE_ZUC:\n-\t\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\t\treturn -ENOTSUP;\n-\t\t\t}\n \t\t\t/* fallthrough */\n \t\tcase PDCP_CIPHER_TYPE_AES:\n \t\tcase PDCP_CIPHER_TYPE_SNOW:\n@@ -3342,7 +2816,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n \t\t\t\t\tauthdata && authdata->algtype == 0){\n \t\t\t\terr = pdcp_insert_uplane_with_int_op(p, swap,\n \t\t\t\t\t\tcipherdata, authdata,\n-\t\t\t\t\t\tsn_size, era_2_sw_hfn_ovrd,\n+\t\t\t\t\t\tsn_size,\n \t\t\t\t\t\tOP_TYPE_ENCAP_PROTOCOL);\n \t\t\t\tif (err)\n \t\t\t\t\treturn err;\n@@ -3388,7 +2862,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n \t\tif (authdata) {\n \t\t\terr = pdcp_insert_uplane_with_int_op(p, swap,\n \t\t\t\t\tcipherdata, authdata,\n-\t\t\t\t\tsn_size, era_2_sw_hfn_ovrd,\n+\t\t\t\t\tsn_size,\n \t\t\t\t\tOP_TYPE_ENCAP_PROTOCOL);\n \t\t\tif (err)\n \t\t\t\treturn err;\n@@ -3437,9 +2911,6 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,\n  *                 keys should be renegotiated at the earliest convenience.\n  * @cipherdata: pointer to block cipher transform definitions\n  *              Valid algorithm values are those from cipher_type_pdcp enum.\n- * @era_2_sw_hfn_ovrd: if software HFN override mechanism is desired for\n- *                     this descriptor. Note: Can only be used for\n- *                     SEC ERA 2.\n  *\n  * Return: size of descriptor written in words or negative number on error.\n  *         Once the function returns, the value of this parameter can be used\n@@ -3459,8 +2930,7 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,\n \t\t\t       unsigned short direction,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n-\t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       struct alginfo *authdata)\n {\n \tstruct program prg;\n \tstruct program *p = &prg;\n@@ -3496,16 +2966,6 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,\n \n \tLABEL(pdb_end);\n \n-\tif (rta_sec_era != RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd) {\n-\t\tpr_err(\"Cannot select SW HFN override for other era than 2\");\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (authdata && !authdata->algtype && rta_sec_era < RTA_SEC_ERA_8) {\n-\t\tpr_err(\"Cannot use u-plane auth with era < 8\");\n-\t\treturn -EINVAL;\n-\t}\n-\n \tPROGRAM_CNTXT_INIT(p, descbuf, 0);\n \tif (swap)\n \t\tPROGRAM_SET_BSWAP(p);\n@@ -3525,7 +2985,7 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,\n \t}\n \tSET_LABEL(p, pdb_end);\n \n-\terr = insert_hfn_ov_op(p, sn_size, pdb_type, era_2_sw_hfn_ovrd, true);\n+\terr = insert_hfn_ov_op(p, sn_size, pdb_type, true);\n \tif (err)\n \t\treturn err;\n \n@@ -3534,10 +2994,6 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,\n \tcase PDCP_SN_SIZE_12:\n \t\tswitch (cipherdata->algtype) {\n \t\tcase PDCP_CIPHER_TYPE_ZUC:\n-\t\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\t\treturn -ENOTSUP;\n-\t\t\t}\n \t\t\t/* fallthrough */\n \t\tcase PDCP_CIPHER_TYPE_AES:\n \t\tcase PDCP_CIPHER_TYPE_SNOW:\n@@ -3555,7 +3011,7 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,\n \t\t\telse if (authdata && authdata->algtype == 0) {\n \t\t\t\terr = pdcp_insert_uplane_with_int_op(p, swap,\n \t\t\t\t\t\tcipherdata, authdata,\n-\t\t\t\t\t\tsn_size, era_2_sw_hfn_ovrd,\n+\t\t\t\t\t\tsn_size,\n \t\t\t\t\t\tOP_TYPE_DECAP_PROTOCOL);\n \t\t\t\tif (err)\n \t\t\t\t\treturn err;\n@@ -3589,7 +3045,7 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,\n \t\tif (authdata) {\n \t\t\terr = pdcp_insert_uplane_with_int_op(p, swap,\n \t\t\t\t\tcipherdata, authdata,\n-\t\t\t\t\tsn_size, era_2_sw_hfn_ovrd,\n+\t\t\t\t\tsn_size,\n \t\t\t\t\tOP_TYPE_DECAP_PROTOCOL);\n \t\t\tif (err)\n \t\t\t\treturn err;\n@@ -3649,9 +3105,6 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,\n \tstruct program prg;\n \tstruct program *p = &prg;\n \tuint32_t iv[3] = {0, 0, 0};\n-\tLABEL(local_offset);\n-\tREFERENCE(move_cmd_read_descbuf);\n-\tREFERENCE(move_cmd_write_descbuf);\n \n \tPROGRAM_CNTXT_INIT(p, descbuf, 0);\n \tif (swap)\n@@ -3661,52 +3114,15 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,\n \n \tSHR_HDR(p, SHR_ALWAYS, 1, 0);\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4, 0);\n-\t} else {\n-\t\tMATHB(p, SEQINSZ, ADD, ONE, MATH1, 4, 0);\n-\t\tMATHB(p, MATH1, SUB, ONE, MATH1, 4, 0);\n-\t\tMATHB(p, ZERO, ADD, MATH1, VSEQINSZ, 4, 0);\n-\t\tMOVE(p, MATH1, 0, MATH0, 0, 8, IMMED);\n+\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n+\tMATHB(p, SEQINSZ, SUB, ZERO, MATH1, 4, 0);\n \n-\t\t/*\n-\t\t * Since MOVELEN is available only starting with\n-\t\t * SEC ERA 3, use poor man's MOVELEN: create a MOVE\n-\t\t * command dynamically by writing the length from M1 by\n-\t\t * OR-ing the command in the M1 register and MOVE the\n-\t\t * result into the descriptor buffer. Care must be taken\n-\t\t * wrt. the location of the command because of SEC\n-\t\t * pipelining. The actual MOVEs are written at the end\n-\t\t * of the descriptor due to calculations needed on the\n-\t\t * offset in the descriptor for the MOVE command.\n-\t\t */\n-\t\tmove_cmd_read_descbuf = MOVE(p, DESCBUF, 0, MATH0, 0, 6,\n-\t\t\t\t\t     IMMED);\n-\t\tmove_cmd_write_descbuf = MOVE(p, MATH0, 0, DESCBUF, 0, 8,\n-\t\t\t\t\t      WAITCOMP | IMMED);\n-\t}\n \tMATHB(p, ZERO, ADD, MATH1, VSEQOUTSZ, 4, 0);\n \n \tswitch (authdata->algtype) {\n \tcase PDCP_AUTH_TYPE_NULL:\n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH1, 0);\n-\t\t} else {\n-\t\t\tSET_LABEL(p, local_offset);\n-\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\n-\t\t\t/* Placeholder for MOVE command with length from M1\n-\t\t\t * register\n-\t\t\t */\n-\t\t\tMOVE(p, IFIFOAB1, 0, OFIFO, 0, 0, IMMED);\n-\n-\t\t\t/* Enable automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t}\n+\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH1, 0);\n \n \t\tLOAD(p, (uintptr_t)iv, MATH0, 0, 8, IMMED | COPY);\n \t\tSEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | LAST2 | FLUSH1);\n@@ -3730,23 +3146,8 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,\n \t\t\t      DIR_ENC);\n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH1, 0);\n-\t\t} else {\n-\t\t\tSET_LABEL(p, local_offset);\n-\n-\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\n-\t\t\t/* Placeholder for MOVE command with length from M1\n-\t\t\t * register\n-\t\t\t */\n-\t\t\tMOVE(p, IFIFOAB1, 0, OFIFO, 0, 0, IMMED);\n+\t\tMOVE(p, AB1, 0, OFIFO, 0, MATH1, 0);\n \n-\t\t\t/* Enable automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t}\n \t\tSEQFIFOLOAD(p, MSGINSNOOP, 0, VLF | LAST1 | LAST2 | FLUSH1);\n \t\tSEQSTORE(p, CONTEXT2, 0, 4, 0);\n \n@@ -3768,32 +3169,14 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,\n \t\t\t      DIR_ENC);\n \t\tSEQFIFOSTORE(p, MSG, 0, 0, VLF);\n \n-\t\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\t\tMOVE(p, AB2, 0, OFIFO, 0, MATH1, 0);\n-\t\t} else {\n-\t\t\tSET_LABEL(p, local_offset);\n-\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n+\t\tMOVE(p, AB2, 0, OFIFO, 0, MATH1, 0);\n \n-\t\t\t/* Placeholder for MOVE command with length from M1\n-\t\t\t * register\n-\t\t\t */\n-\t\t\tMOVE(p, IFIFOAB2, 0, OFIFO, 0, 0, IMMED);\n-\n-\t\t\t/* Enable automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_ENABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t}\n \t\tSEQFIFOLOAD(p, MSGINSNOOP, 0, VLF | LAST1 | LAST2 | FLUSH1);\n \t\tSEQSTORE(p, CONTEXT1, 0, 4, 0);\n \n \t\tbreak;\n \n \tcase PDCP_AUTH_TYPE_ZUC:\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n \t\tiv[0] = 0xFFFFFFFF;\n \t\tiv[1] = swap ? swab32(0xFC000000) : 0xFC000000;\n \t\tiv[2] = 0x00000000; /* unused */\n@@ -3819,12 +3202,6 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,\n \t\treturn -EINVAL;\n \t}\n \n-\n-\tif (rta_sec_era < RTA_SEC_ERA_3) {\n-\t\tPATCH_MOVE(p, move_cmd_read_descbuf, local_offset);\n-\t\tPATCH_MOVE(p, move_cmd_write_descbuf, local_offset);\n-\t}\n-\n \treturn PROGRAM_FINALIZE(p);\n }\n \ndiff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h\nindex b2497a5424..ee03e95990 100644\n--- a/drivers/common/dpaax/caamflib/desc/sdap.h\n+++ b/drivers/common/dpaax/caamflib/desc/sdap.h\n@@ -225,10 +225,6 @@ static inline int pdcp_sdap_insert_no_int_op(struct program *p,\n \t\tbreak;\n \n \tcase PDCP_CIPHER_TYPE_ZUC:\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n \t\t/* The LSB and MSB is the same for ZUC context */\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 0x08, IMMED);\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0x08, 0x08, WAITCOMP | IMMED);\n@@ -253,7 +249,6 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused,\n \t\t\t     struct alginfo *cipherdata,\n \t\t\t     struct alginfo *authdata __maybe_unused,\n \t\t\t     unsigned int dir, enum pdcp_sn_size sn_size,\n-\t\t\t     unsigned char era_2_sw_hfn_ovrd __maybe_unused,\n \t\t\t     enum pdb_type_e pdb_type)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n@@ -293,12 +288,7 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused,\n \t/* Write header */\n \tSEQSTORE(p, MATH0, offset, length, 0);\n \n-\tif (rta_sec_era > RTA_SEC_ERA_2) {\n-\t\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n-\t} else {\n-\t\tMATHB(p, SEQINSZ, SUB, ONE, MATH1, 4, 0);\n-\t\tMATHB(p, MATH1, ADD, ONE, VSEQINSZ, 4, 0);\n-\t}\n+\tMATHB(p, SEQINSZ, SUB, ZERO, VSEQINSZ, 4, 0);\n \n \tif (dir == OP_TYPE_ENCAP_PROTOCOL)\n \t\tMATHB(p, SEQINSZ, ADD, PDCP_MAC_I_LEN, VSEQOUTSZ, 4, IMMED2);\n@@ -326,11 +316,6 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused,\n \t\tbreak;\n \n \tcase PDCP_CIPHER_TYPE_ZUC:\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0, 0x08, IMMED);\n \t\tMOVEB(p, MATH2, 0, CONTEXT1, 0x08, 0x08, WAITCOMP | IMMED);\n \n@@ -378,7 +363,6 @@ static inline int\n pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n \t\t\t  struct alginfo *cipherdata, struct alginfo *authdata,\n \t\t\t  unsigned int dir, enum pdcp_sn_size sn_size,\n-\t\t\t  unsigned char era_2_sw_hfn_ovrd __maybe_unused,\n \t\t\t  enum pdb_type_e pdb_type)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n@@ -391,13 +375,6 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n \t\t\tFULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET :\n \t\t\tREDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \n-\tif (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) {\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\t}\n-\n \tif (pdcp_sdap_get_sn_parameters(sn_size, swap, &offset, &length,\n \t\t\t\t\t&sn_mask))\n \t\treturn -ENOTSUP;\n@@ -588,8 +565,7 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n \t\t */\n \t\tJUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CLASS1 | NOP | NIFP);\n \n-\t\tif (rta_sec_era >= RTA_SEC_ERA_6)\n-\t\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n+\t\tLOAD(p, 0, DCTRL, 0, LDLEN_RST_CHA_OFIFO_PTR, IMMED);\n \n \t\t/* Save the content left in the Output FIFO (the ICV) to MATH0\n \t\t */\n@@ -604,13 +580,7 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n \t\t * Note: As configured by the altsource, this will send\n \t\t * the\n \t\t */\n-\t\tif (rta_sec_era <= RTA_SEC_ERA_2) {\n-\t\t\t/* Shut off automatic Info FIFO entries */\n-\t\t\tLOAD(p, 0, DCTRL, LDOFF_DISABLE_AUTO_NFIFO, 0, IMMED);\n-\t\t\tMOVE(p, MATH0, 0, IFIFOAB2, 0, 4, WAITCOMP | IMMED);\n-\t\t} else {\n-\t\t\tMOVE(p, MATH0, 0, IFIFO, 0, 4, WAITCOMP | IMMED);\n-\t\t}\n+\t\tMOVE(p, MATH0, 0, IFIFO, 0, 4, WAITCOMP | IMMED);\n \t}\n \n \tif (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) {\n@@ -638,7 +608,6 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n static inline int pdcp_sdap_insert_no_snoop_op(\n \tstruct program *p, bool swap __maybe_unused, struct alginfo *cipherdata,\n \tstruct alginfo *authdata, unsigned int dir, enum pdcp_sn_size sn_size,\n-\tunsigned char era_2_sw_hfn_ovrd __maybe_unused,\n \tenum pdb_type_e pdb_type)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n@@ -649,13 +618,6 @@ static inline int pdcp_sdap_insert_no_snoop_op(\n \t\t\tFULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET :\n \t\t\tREDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \n-\tif (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) {\n-\t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n-\t\t\tpr_err(\"Invalid era for selected algorithm\\n\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\t}\n-\n \tif (pdcp_sdap_get_sn_parameters(sn_size, swap, &offset, &length,\n \t\t\t\t\t&sn_mask))\n \t\treturn -ENOTSUP;\n@@ -842,11 +804,10 @@ pdcp_sdap_insert_cplane_null_op(struct program *p,\n \t\t\t   struct alginfo *authdata,\n \t\t\t   unsigned int dir,\n \t\t\t   enum pdcp_sn_size sn_size,\n-\t\t\t   unsigned char era_2_sw_hfn_ovrd,\n \t\t\t   enum pdb_type_e pdb_type __maybe_unused)\n {\n \treturn pdcp_insert_cplane_null_op(p, swap, cipherdata, authdata, dir,\n-\t\t\t\t\t  sn_size, era_2_sw_hfn_ovrd);\n+\t\t\t\t\t  sn_size);\n }\n \n static inline int\n@@ -856,24 +817,22 @@ pdcp_sdap_insert_cplane_int_only_op(struct program *p,\n \t\t\t   struct alginfo *authdata,\n \t\t\t   unsigned int dir,\n \t\t\t   enum pdcp_sn_size sn_size,\n-\t\t\t   unsigned char era_2_sw_hfn_ovrd,\n \t\t\t   enum pdb_type_e pdb_type __maybe_unused)\n {\n \treturn pdcp_insert_cplane_int_only_op(p, swap, cipherdata, authdata,\n-\t\t\t\tdir, sn_size, era_2_sw_hfn_ovrd);\n+\t\t\t\tdir, sn_size);\n }\n \n static int pdcp_sdap_insert_with_int_op(\n \tstruct program *p, bool swap __maybe_unused, struct alginfo *cipherdata,\n \tstruct alginfo *authdata, enum pdcp_sn_size sn_size,\n-\tunsigned char era_2_sw_hfn_ovrd, unsigned int dir,\n+\tunsigned int dir,\n \tenum pdb_type_e pdb_type)\n {\n \tstatic int (\n \t\t*pdcp_cp_fp[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID])(\n \t\tstruct program *, bool swap, struct alginfo *, struct alginfo *,\n-\t\tunsigned int, enum pdcp_sn_size,\n-\t\tunsigned char __maybe_unused, enum pdb_type_e pdb_type) = {\n+\t\tunsigned int dir, enum pdcp_sn_size, enum pdb_type_e pdb_type) = {\n \t\t{\n \t\t\t/* NULL */\n \t\t\tpdcp_sdap_insert_cplane_null_op,     /* NULL */\n@@ -907,7 +866,7 @@ static int pdcp_sdap_insert_with_int_op(\n \n \terr = pdcp_cp_fp[cipherdata->algtype]\n \t\t\t[authdata->algtype](p, swap, cipherdata, authdata, dir,\n-\t\t\t\t\tsn_size, era_2_sw_hfn_ovrd, pdb_type);\n+\t\t\t\t\tsn_size, pdb_type);\n \tif (err)\n \t\treturn err;\n \n@@ -925,7 +884,6 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n \t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd,\n \t\t\t       uint32_t caps_mode)\n {\n \tstruct program prg;\n@@ -966,12 +924,6 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \n \tLABEL(pdb_end);\n \n-\t/* Check HFN override for ERA 2 */\n-\tif (rta_sec_era != RTA_SEC_ERA_2 && era_2_sw_hfn_ovrd) {\n-\t\tpr_err(\"Cannot select SW HFN ovrd for other era than 2\");\n-\t\treturn -EINVAL;\n-\t}\n-\n \t/* Check the confidentiality algorithm is supported by the code */\n \tswitch (cipherdata->algtype) {\n \tcase PDCP_CIPHER_TYPE_NULL:\n@@ -1013,14 +965,6 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \t\treturn -ENOTSUP;\n \t}\n \n-\t/* Check that we are not performing ZUC algo on old platforms */\n-\tif (cipherdata->algtype == PDCP_CIPHER_TYPE_ZUC &&\n-\t\t\trta_sec_era < RTA_SEC_ERA_5) {\n-\t\tpr_err(\"ZUC algorithm not supported for era: %d\\n\",\n-\t\t\t\trta_sec_era);\n-\t\treturn -ENOTSUP;\n-\t}\n-\n \t/* Initialize the program */\n \tPROGRAM_CNTXT_INIT(p, descbuf, 0);\n \n@@ -1047,7 +991,7 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \tSET_LABEL(p, pdb_end);\n \n \t/* Inser the HFN override operation */\n-\terr = insert_hfn_ov_op(p, sn_size, pdb_type, era_2_sw_hfn_ovrd, false);\n+\terr = insert_hfn_ov_op(p, sn_size, pdb_type, false);\n \tif (err)\n \t\treturn err;\n \n@@ -1068,7 +1012,6 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \t} else {\n \t\terr = pdcp_sdap_insert_with_int_op(p, swap, cipherdata,\n \t\t\t\t\t\t   authdata, sn_size,\n-\t\t\t\t\t\t   era_2_sw_hfn_ovrd,\n \t\t\t\t\t\t   caps_mode, pdb_type);\n \t\tif (err) {\n \t\t\tpr_err(\"Fail pdcp_sdap_insert_with_int_op\\n\");\n@@ -1096,9 +1039,6 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n  *                 keys should be renegotiated at the earliest convenience.\n  * @cipherdata: pointer to block cipher transform definitions\n  *              Valid algorithm values are those from cipher_type_pdcp enum.\n- * @era_2_sw_hfn_ovrd: if software HFN override mechanism is desired for\n- *                     this descriptor. Note: Can only be used for\n- *                     SEC ERA 2.\n  *\n  * Return: size of descriptor written in words or negative number on error.\n  *         Once the function returns, the value of this parameter can be used\n@@ -1118,12 +1058,11 @@ cnstr_shdsc_pdcp_sdap_u_plane_encap(uint32_t *descbuf,\n \t\t\t       unsigned short direction,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n-\t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       struct alginfo *authdata)\n {\n \treturn cnstr_shdsc_pdcp_sdap_u_plane(descbuf, ps, swap, sn_size,\n \t\t\thfn, bearer, direction, hfn_threshold, cipherdata,\n-\t\t\tauthdata, era_2_sw_hfn_ovrd, OP_TYPE_ENCAP_PROTOCOL);\n+\t\t\tauthdata, OP_TYPE_ENCAP_PROTOCOL);\n }\n \n /**\n@@ -1141,9 +1080,6 @@ cnstr_shdsc_pdcp_sdap_u_plane_encap(uint32_t *descbuf,\n  *                 keys should be renegotiated at the earliest convenience.\n  * @cipherdata: pointer to block cipher transform definitions\n  *              Valid algorithm values are those from cipher_type_pdcp enum.\n- * @era_2_sw_hfn_ovrd: if software HFN override mechanism is desired for\n- *                     this descriptor. Note: Can only be used for\n- *                     SEC ERA 2.\n  *\n  * Return: size of descriptor written in words or negative number on error.\n  *         Once the function returns, the value of this parameter can be used\n@@ -1163,12 +1099,11 @@ cnstr_shdsc_pdcp_sdap_u_plane_decap(uint32_t *descbuf,\n \t\t\t       unsigned short direction,\n \t\t\t       uint32_t hfn_threshold,\n \t\t\t       struct alginfo *cipherdata,\n-\t\t\t       struct alginfo *authdata,\n-\t\t\t       unsigned char era_2_sw_hfn_ovrd)\n+\t\t\t       struct alginfo *authdata)\n {\n \treturn cnstr_shdsc_pdcp_sdap_u_plane(descbuf, ps, swap, sn_size, hfn,\n \t\t\tbearer, direction, hfn_threshold, cipherdata, authdata,\n-\t\t\tera_2_sw_hfn_ovrd, OP_TYPE_DECAP_PROTOCOL);\n+\t\t\tOP_TYPE_DECAP_PROTOCOL);\n }\n \n #endif /* __DESC_SDAP_H__ */\ndiff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\nindex a5b052375d..1e6b3e548a 100644\n--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n@@ -3297,8 +3297,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,\n \t\t\t\t\tpdcp_xform->bearer,\n \t\t\t\t\tpdcp_xform->pkt_dir,\n \t\t\t\t\tpdcp_xform->hfn_threshold,\n-\t\t\t\t\t&cipherdata, &authdata,\n-\t\t\t\t\t0);\n+\t\t\t\t\t&cipherdata, &authdata);\n \t\telse if (session->dir == DIR_DEC)\n \t\t\tbufsize = cnstr_shdsc_pdcp_c_plane_decap(\n \t\t\t\t\tpriv->flc_desc[0].desc, 1, swap,\n@@ -3307,8 +3306,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,\n \t\t\t\t\tpdcp_xform->bearer,\n \t\t\t\t\tpdcp_xform->pkt_dir,\n \t\t\t\t\tpdcp_xform->hfn_threshold,\n-\t\t\t\t\t&cipherdata, &authdata,\n-\t\t\t\t\t0);\n+\t\t\t\t\t&cipherdata, &authdata);\n \n \t} else if (pdcp_xform->domain == RTE_SECURITY_PDCP_MODE_SHORT_MAC) {\n \t\tbufsize = cnstr_shdsc_pdcp_short_mac(priv->flc_desc[0].desc,\n@@ -3323,7 +3321,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,\n \t\t\t\t\tpdcp_xform->bearer,\n \t\t\t\t\tpdcp_xform->pkt_dir,\n \t\t\t\t\tpdcp_xform->hfn_threshold,\n-\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t&cipherdata, p_authdata);\n \t\t\telse\n \t\t\t\tbufsize = cnstr_shdsc_pdcp_u_plane_encap(\n \t\t\t\t\tpriv->flc_desc[0].desc, 1, swap,\n@@ -3332,7 +3330,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,\n \t\t\t\t\tpdcp_xform->bearer,\n \t\t\t\t\tpdcp_xform->pkt_dir,\n \t\t\t\t\tpdcp_xform->hfn_threshold,\n-\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t&cipherdata, p_authdata);\n \t\t} else if (session->dir == DIR_DEC) {\n \t\t\tif (pdcp_xform->sdap_enabled)\n \t\t\t\tbufsize = cnstr_shdsc_pdcp_sdap_u_plane_decap(\n@@ -3342,7 +3340,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,\n \t\t\t\t\tpdcp_xform->bearer,\n \t\t\t\t\tpdcp_xform->pkt_dir,\n \t\t\t\t\tpdcp_xform->hfn_threshold,\n-\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t&cipherdata, p_authdata);\n \t\t\telse\n \t\t\t\tbufsize = cnstr_shdsc_pdcp_u_plane_decap(\n \t\t\t\t\tpriv->flc_desc[0].desc, 1, swap,\n@@ -3351,7 +3349,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,\n \t\t\t\t\tpdcp_xform->bearer,\n \t\t\t\t\tpdcp_xform->pkt_dir,\n \t\t\t\t\tpdcp_xform->hfn_threshold,\n-\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t&cipherdata, p_authdata);\n \t\t}\n \t}\n \ndiff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c\nindex a552e64506..1dedd9eee5 100644\n--- a/drivers/crypto/dpaa_sec/dpaa_sec.c\n+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c\n@@ -296,8 +296,7 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\tses->pdcp.bearer,\n \t\t\t\t\tses->pdcp.pkt_dir,\n \t\t\t\t\tses->pdcp.hfn_threshold,\n-\t\t\t\t\t&cipherdata, &authdata,\n-\t\t\t\t\t0);\n+\t\t\t\t\t&cipherdata, &authdata);\n \t\telse if (ses->dir == DIR_DEC)\n \t\t\tshared_desc_len = cnstr_shdsc_pdcp_c_plane_decap(\n \t\t\t\t\tcdb->sh_desc, 1, swap,\n@@ -306,8 +305,7 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\tses->pdcp.bearer,\n \t\t\t\t\tses->pdcp.pkt_dir,\n \t\t\t\t\tses->pdcp.hfn_threshold,\n-\t\t\t\t\t&cipherdata, &authdata,\n-\t\t\t\t\t0);\n+\t\t\t\t\t&cipherdata, &authdata);\n \t} else if (ses->pdcp.domain == RTE_SECURITY_PDCP_MODE_SHORT_MAC) {\n \t\tshared_desc_len = cnstr_shdsc_pdcp_short_mac(cdb->sh_desc,\n \t\t\t\t\t\t     1, swap, &authdata);\n@@ -322,7 +320,7 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\t\tses->pdcp.bearer,\n \t\t\t\t\t\tses->pdcp.pkt_dir,\n \t\t\t\t\t\tses->pdcp.hfn_threshold,\n-\t\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t\t&cipherdata, p_authdata);\n \t\t\telse\n \t\t\t\tshared_desc_len =\n \t\t\t\t\tcnstr_shdsc_pdcp_u_plane_encap(\n@@ -332,7 +330,7 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\t\tses->pdcp.bearer,\n \t\t\t\t\t\tses->pdcp.pkt_dir,\n \t\t\t\t\t\tses->pdcp.hfn_threshold,\n-\t\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t\t&cipherdata, p_authdata);\n \t\t} else if (ses->dir == DIR_DEC) {\n \t\t\tif (ses->pdcp.sdap_enabled)\n \t\t\t\tshared_desc_len =\n@@ -343,7 +341,7 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\t\tses->pdcp.bearer,\n \t\t\t\t\t\tses->pdcp.pkt_dir,\n \t\t\t\t\t\tses->pdcp.hfn_threshold,\n-\t\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t\t&cipherdata, p_authdata);\n \t\t\telse\n \t\t\t\tshared_desc_len =\n \t\t\t\t\tcnstr_shdsc_pdcp_u_plane_decap(\n@@ -353,7 +351,7 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\t\tses->pdcp.bearer,\n \t\t\t\t\t\tses->pdcp.pkt_dir,\n \t\t\t\t\t\tses->pdcp.hfn_threshold,\n-\t\t\t\t\t\t&cipherdata, p_authdata, 0);\n+\t\t\t\t\t\t&cipherdata, p_authdata);\n \t\t}\n \t}\n \treturn shared_desc_len;\n",
    "prefixes": [
        "1/8"
    ]
}