From patchwork Thu Jun 17 15:59:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viktor Barna X-Patchwork-Id: 12328463 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E49A4C49361 for ; Thu, 17 Jun 2021 16:06:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF4E7613F9 for ; Thu, 17 Jun 2021 16:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233673AbhFQQIM (ORCPT ); Thu, 17 Jun 2021 12:08:12 -0400 Received: from mail-eopbgr60088.outbound.protection.outlook.com ([40.107.6.88]:43502 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231326AbhFQQHc (ORCPT ); Thu, 17 Jun 2021 12:07:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BupSPGVRCY8IaudsdADTWSNmgqaRm/VgxO5O5QnXlsuPiBxbW3BYwZzoHYqxZfRPvHsPxclXAG6E/wwepEyRNDvJk0CUHa489cT7L2KZtzTsKG3xid0KGR7bS993Z2OsCALwhbmIiUbKphd5IJt7bL3rQzymfGXxoh6OrHQ76L+MIVgkCXKUfSE0+ND1NMQpCPuHWWSr+6P/7IxHHRlxs9Tz9myHPLUHNAol+ITGTC+rVm90+wgj7ID/DSvDGGzrRCOCnozbtXs9fg98C5aGkh91S4ohqFnPf/aaUCJ7fLmjJjLzwtac8kByGoV7RRcdp2Sde4UcVvsd6DvAp5jEoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rod/+7Qkhyw4UJhd97EfRp9Savc5EM6wA0cK5hvQA1M=; b=fnbHR4JoRcrSeYNUw0+jOqZG1nHwHgWMLVNv6G+Ps5i6zsUm9Pbm9dsx/yMKWUHijcBJcsBw5kN8QUCfiCkJ5gdVCWAO69tzxk5fJaXZX+jXNRDA9Xo1eHHayqWuf03pxF/jVMN2rrNtfXXiQQiSqAGYs8JBGOBqdW8XT5aayCayKo3VgVRqo5cJNF/LZtBa3aAMLDoiSZHyiF4smMFSNOaZ8ZbLnFZfN5pnDj1FH6dQ2LqNjpQblRmnCOcV7QRlf+5Jxt4gA7YjjfZvIST95ZyDHs6/U4+ke/PmYOKdHYkey5KFD8RRaLV25WbjyQEtdqRecheF5I3ubkefsG6CDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=celeno.com; dmarc=pass action=none header.from=celeno.com; dkim=pass header.d=celeno.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=celeno.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rod/+7Qkhyw4UJhd97EfRp9Savc5EM6wA0cK5hvQA1M=; b=ztDNaSqDEjOWPAgCWthPhKsaQy1bYGmT40gp2PFd4UJKN+ngpebREBx1tKkPkod8uxquu7t/c5p+nJbg00nuH7NXPkgQP4qB09EQwxpjMMFkGtllJvbbyIumcDbDgoRO5ur2iMUrvjcwlZiwvwpSg3DaJr1PFcUd6AjQWJFU3HQ= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=celeno.com; Received: from AM9P192MB1412.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:38b::16) by AM9P192MB1268.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:3a9::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 16:04:21 +0000 Received: from AM9P192MB1412.EURP192.PROD.OUTLOOK.COM ([fe80::1847:5583:4db7:102f]) by AM9P192MB1412.EURP192.PROD.OUTLOOK.COM ([fe80::1847:5583:4db7:102f%4]) with mapi id 15.20.4242.021; Thu, 17 Jun 2021 16:04:21 +0000 From: viktor.barna@celeno.com To: linux-wireless@vger.kernel.org Cc: Kalle Valo , "David S . Miller" , Jakub Kicinski , Aviad Brikman , Eliav Farber , Oleksandr Savchenko , Shay Bar , Viktor Barna Subject: [RFC v1 069/256] cl8k: add edca.c Date: Thu, 17 Jun 2021 15:59:16 +0000 Message-Id: <20210617160223.160998-70-viktor.barna@celeno.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210617160223.160998-1-viktor.barna@celeno.com> References: <20210617160223.160998-1-viktor.barna@celeno.com> X-Originating-IP: [62.216.42.54] X-ClientProxiedBy: PR3PR09CA0018.eurprd09.prod.outlook.com (2603:10a6:102:b7::23) To AM9P192MB1412.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:38b::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (62.216.42.54) by PR3PR09CA0018.eurprd09.prod.outlook.com (2603:10a6:102:b7::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18 via Frontend Transport; Thu, 17 Jun 2021 16:03:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64835f21-14a9-4d31-9237-08d931a97f2e X-MS-TrafficTypeDiagnostic: AM9P192MB1268: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:480; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nLYfEJeSOXI4QoZ6JnVwyQYx50E7cio/kzYp9eu7V4Ps+Xr1gAh1dA/GXXL/EcltyK2O5M0JPb4tUn+FDlMm2NweiLlKn22esSzXdDuLnBbB4Zb5Id0BjD6RhSYTgpUzjCWmTo0i/g1DOj7RizIcNgJuXDsRCtIGN/cVgYtv0kFe4gfjUdBGqSwEIRSR+SRvnR3ZHdKooZwiRNrMGMiAn2AQhlhah8OoYQOjKV2YYWq/eevZsPBGtW4EBposoHPQzEBb1u8I7WmO5OO+/cMk+MblRgjBZE+Jacr/6Se10N1W6VxQQDo/Z+NnR7ywTyEsbLOSrWL2Kep53o4TDndhF/GnaTCxMtFSMbwwLLQ55YRX+jA3O1hnsHU+X+3FefZy/dGv9TyaENnfFFuJ+6iOC0N0CSviSxOMzLrYpnEz9xXO1pl7FJwKMnIRMuELVDDVxHCq1U/hrHGATChBIyNb3PpE7zR6zpmf0t9M8Yxy23CaWB+a8m46jmEWjqIaHF6+JDbdBGaM8dSrqRSqWT5mIu+Iw5eRXXn5ctyPmmWj1kO+WfTxb+l1C6BHTfkxZMYpb0FaZrKipDIze2uqOEKQlD+y8gjqeCZWa/Xa/23T+sPAihBcHHF+9AAuJ5xYechgxV+lg8aZRDg+xh3rjDsf/ix0qDyhCoyYmB5uLbZ1SYGl2H0jUF0UPi+832qYHIc+KOKrNit4tE36PTw+puEXzg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9P192MB1412.EURP192.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(6486002)(956004)(54906003)(4326008)(2616005)(186003)(38100700002)(16526019)(8676002)(5660300002)(38350700002)(8936002)(26005)(2906002)(6512007)(9686003)(52116002)(83380400001)(6916009)(66946007)(66556008)(66476007)(86362001)(55236004)(498600001)(6666004)(6506007)(1076003)(107886003)(36756003)(69590400013)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ug5eYJ7T5qg+Z9/ce+bg+IIHgrdW48hr32Gr5X93bawk3wI08kLdStq75cKv1ZCarrS9hVgoUdyzkw3+0kkKViXUsl0spb6Y6DDOFUObHWDNWpukUVBzB5IpxXdw1U+PS85Tcu6jaD7NUXawwIhthtBCh1ouqbv4yAC5ALvDjdWX0kyIeDPz0xUUHFlB82owFgnXVqQwHy+3gI5oQBm30cBuqSXMz8Yg9D+fl7B1bzB5EUz9P7imx0Ihe3fKpAtrpc2pezFTZ+QcdTbfFFmSq5hFD/HQf+0ft8wA1i3ixrZkAAUHSIqYc6QqW9tCrB0N69+UjpY+UiqvDKOWFbe3gIb34tBPg1jpA+OVILr1VDNzqFqxe+RqK4HV7yYAaMj6aXqwHfVW0/RjV1QNu54uEei0erfrSl++9gLe3Fv5jeH/UAPi80/iZH8SAdqSHYhTRgoANyx84BdIHr8HMlCX1Eb2qdBe1RNszawm+W9GkTv+lcObjjhPtVUHu3BWQvVV8or8wIv3poy6gGNFZT+OqpqsKQEy8Y3UEsVwODY5ffpTGp1fRFDr1vPbFA86riwHJqqDb8lyha4XjiYoE2Lxd4CDT2VemVHLMhzZH+KKr4hR291F//AKJqTKgVS/BzLPoUmwxbPoBOz05ZRDV3CTVKiuEBncy7lxZKqhds1HiDQImvOMMh8BIPrY4MI/5ZXl5InIvCDjE90+aAfPYAdbLX83H8GqmQtVo8p0aIy7RewuvSgk9i6ZPltN4WlXJ9QsYuT5UPJnGD+B0pSjOD0JlrLkH22u0kixoVFJyzzDiH3CF9KV2SKPY1ciV9P0mh0ZsYavyAtCV+8V0xxLiobL1B63HFGb7zLS4cYN8uMSOQ4gDsO4yXL5H0rbfnmxSEvruzy9wIrgXu58toPJelweBHz9fOzClzc9KfXugknQDVoSh2Kyd73RdZ2XpE8JIne45eyCvchohfODeR4H9Ca2W3zmt/nt9k8l/ioetZugEnsrurSpWugY/xCG7LL4qMuGOQ/ooG2fHNPJKlRaQVdPzIjNkbkKyRZ3FRw3ThnBpCEPAF4oM6ynoNr4tVLVpTcVdq53qsYeHCgHBCjl+FmwKTd1qOPwM4QO5I68mGqrGyOK//anEL8g09/XhGWj0dLKUalj6pOhv1e3Ym08K4wVNxBhU8zL4L65ztXriRqJCO7YOphdSlAsy4EUJdJnMZ7dopZcRK14ZVmUgTN2jeLOw2zEcZaB62eg78MII62UkkO/j5w4SlY9+1TFuXMBXLOhuw+p9M60Q69WFpYkuMO8jDgKEEM5bvony3TvctHe5hmByfNptpby7lq4AiU0sq3r X-OriginatorOrg: celeno.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64835f21-14a9-4d31-9237-08d931a97f2e X-MS-Exchange-CrossTenant-AuthSource: AM9P192MB1412.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 16:03:50.4759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f313103b-4c9f-4fd3-b5cf-b97f91c4afa8 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 49I3VNZOMBhmIJKoatcySFbdYBXc7DDSfF7flt43+CmyAVDlCFFXr8pxhD3iGo4tqvhMaP2sal/iw8cbxmln8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P192MB1268 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Viktor Barna (Part of the split. Please, take a look at the cover letter for more details). Signed-off-by: Viktor Barna --- drivers/net/wireless/celeno/cl8k/edca.c | 265 ++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 drivers/net/wireless/celeno/cl8k/edca.c -- 2.30.0 diff --git a/drivers/net/wireless/celeno/cl8k/edca.c b/drivers/net/wireless/celeno/cl8k/edca.c new file mode 100644 index 000000000000..d17a7bd674c5 --- /dev/null +++ b/drivers/net/wireless/celeno/cl8k/edca.c @@ -0,0 +1,265 @@ +// SPDX-License-Identifier: MIT +/* Copyright(c) 2019-2021, Celeno Communications Ltd. */ + +#include "edca.h" +#include "sta.h" +#include "vendor_cmd.h" +#include "fw/msg_tx.h" +#include "utils/utils.h" + +static u8 conv_to_fw_ac[EDCA_AC_MAX] = { + [EDCA_AC_BE] = AC_BE, + [EDCA_AC_BK] = AC_BK, + [EDCA_AC_VI] = AC_VI, + [EDCA_AC_VO] = AC_VO +}; + +static const char *edca_ac_str[EDCA_AC_MAX] = { + [EDCA_AC_BE] = "BE", + [EDCA_AC_BK] = "BK", + [EDCA_AC_VI] = "VI", + [EDCA_AC_VO] = "VO" +}; + +static int cl_edca_print(struct cl_hw *cl_hw) +{ + u8 ac = 0; + struct edca_params *params; + char *buf = NULL; + ssize_t buf_size; + int err = 0; + int len = 0; + + cl_snprintf(&buf, &len, &buf_size, + "---------------------------------------\n" + "| ac | aifsn | cw_min | cw_max | txop |\n" + "|----+-------+--------+--------+------|\n"); + + for (ac = 0; ac < AC_MAX; ac++) { + params = &cl_hw->edca_db.hw_params[ac]; + cl_snprintf(&buf, &len, &buf_size, + "| %s | %5u | %6u | %6u | %4u |\n", + edca_ac_str[ac], params->aifsn, params->cw_min, + params->cw_max, params->txop); + } + + cl_snprintf(&buf, &len, &buf_size, + "---------------------------------------\n\n"); + + err = cl_vendor_reply(cl_hw, buf, len); + kfree(buf); + + return err; +} + +static void cl_edca_set_conf(struct cl_hw *cl_hw, u8 ac) +{ + struct edca_params params = { + .aifsn = cl_hw->conf->ce_wmm_aifsn[ac], + .cw_min = cl_hw->conf->ce_wmm_cwmin[ac], + .cw_max = cl_hw->conf->ce_wmm_cwmax[ac], + .txop = cl_hw->conf->ce_wmm_txop[ac] + }; + + cl_edca_set(cl_hw, ac, ¶ms, NULL); +} + +static void cl_edca_ac_set(struct cl_hw *cl_hw, u8 ac, u8 aifsn, u8 cw_min, u8 cw_max, u16 txop) +{ + pr_debug("ac = %u, aifsn = %u, cw_min = %u, cw_max = %u, txop = %u\n", + ac, aifsn, cw_min, cw_max, txop); + + cl_hw->conf->ce_wmm_aifsn[ac] = aifsn; + cl_hw->conf->ce_wmm_cwmin[ac] = cw_min; + cl_hw->conf->ce_wmm_cwmax[ac] = cw_max; + cl_hw->conf->ce_wmm_txop[ac] = txop; + + cl_edca_set_conf(cl_hw, ac); +} + +static void cl_edca_aifsn_set(struct cl_hw *cl_hw, s32 aifsn[AC_MAX]) +{ + u8 ac = 0; + + pr_debug("Set aifsn: BE = %d, BK = %d, VI = %d, VO = %d\n", + aifsn[0], aifsn[1], aifsn[2], aifsn[3]); + + for (ac = 0; ac < AC_MAX; ac++) { + cl_hw->conf->ce_wmm_aifsn[ac] = (u8)aifsn[ac]; + cl_edca_set_conf(cl_hw, ac); + } +} + +static void cl_edca_cwmin_set(struct cl_hw *cl_hw, s32 cw_min[AC_MAX]) +{ + u8 ac = 0; + + pr_debug("Set cw_min: BE = %d, BK = %d, VI = %d, VO = %d\n", + cw_min[0], cw_min[1], cw_min[2], cw_min[3]); + + for (ac = 0; ac < AC_MAX; ac++) { + cl_hw->conf->ce_wmm_cwmin[ac] = (u8)cw_min[ac]; + cl_edca_set_conf(cl_hw, ac); + } +} + +static void cl_edca_cwmax_set(struct cl_hw *cl_hw, s32 cw_max[AC_MAX]) +{ + u8 ac = 0; + + pr_debug("Set cw_max: BE = %d, BK = %d, VI = %d, VO = %d\n", + cw_max[0], cw_max[1], cw_max[2], cw_max[3]); + + for (ac = 0; ac < AC_MAX; ac++) { + cl_hw->conf->ce_wmm_cwmax[ac] = (u8)cw_max[ac]; + cl_edca_set_conf(cl_hw, ac); + } +} + +static void cl_edca_txop_set(struct cl_hw *cl_hw, s32 txop[AC_MAX]) +{ + u8 ac = 0; + + pr_debug("Set txop: BE = %d, BK = %d, VI = %d, VO = %d\n", + txop[0], txop[1], txop[2], txop[3]); + + for (ac = 0; ac < AC_MAX; ac++) { + cl_hw->conf->ce_wmm_txop[ac] = (u16)txop[ac]; + cl_edca_set_conf(cl_hw, ac); + } +} + +static int cl_edca_cli_help(struct cl_hw *cl_hw) +{ + char *buf = kzalloc(PAGE_SIZE, GFP_KERNEL); + int err = 0; + + if (!buf) + return -ENOMEM; + + snprintf(buf, PAGE_SIZE, + "edca usage:\n" + "-a : Print current configuration\n" + "-b : Set per AC [0-BE,1-BK,2-VI,3-VO].[aifsn].[cw_min]." + "[cw_max].[txop]\n" + "-c : Set aifsn [BE].[BK].[VI].[VO]\n" + "-d : Set cw_min [BE].[BK].[VI].[VO]\n" + "-e : Set cw_max [BE].[BK].[VI].[VO]\n" + "-f : Set txop [BE].[BK].[VI].[VO]\n"); + + err = cl_vendor_reply(cl_hw, buf, strlen(buf)); + kfree(buf); + + return err; +} + +void cl_edca_hw_conf(struct cl_hw *cl_hw) +{ + u8 ac = 0; + struct cl_tcv_conf *conf = cl_hw->conf; + + for (ac = 0; ac < AC_MAX; ac++) { + struct edca_params params = { + .aifsn = conf->ce_wmm_aifsn[ac], + .cw_min = conf->ce_wmm_cwmin[ac], + .cw_max = conf->ce_wmm_cwmax[ac], + .txop = conf->ce_wmm_txop[ac] + }; + + cl_edca_set(cl_hw, ac, ¶ms, NULL); + } +} + +void cl_edca_set(struct cl_hw *cl_hw, u8 ac, struct edca_params *params, + struct ieee80211_he_mu_edca_param_ac_rec *mu_edca) +{ + u32 edca_reg_val = 0; + + if (ac >= AC_MAX) { + pr_err("%s: Invalid AC index\n", __func__); + return; + } + + edca_reg_val = (u32)(params->aifsn); + edca_reg_val |= (u32)(params->cw_min << 4); + edca_reg_val |= (u32)(params->cw_max << 8); + edca_reg_val |= (u32)(params->txop << 12); + + memcpy(&cl_hw->edca_db.hw_params[ac], params, sizeof(struct edca_params)); + + cl_msg_tx_set_edca(cl_hw, conv_to_fw_ac[ac], edca_reg_val, mu_edca); + + cl_dbg_trace(cl_hw, "EDCA-%s: aifsn=%u, cw_min=%u, cw_max=%u, txop=%u\n", + edca_ac_str[ac], params->aifsn, params->cw_min, params->cw_max, params->txop); +} + +void cl_edca_restore_conf(struct cl_hw *cl_hw, u8 ac) +{ + cl_edca_set_conf(cl_hw, ac); +} + +void cl_edca_recovery(struct cl_hw *cl_hw) +{ + u8 ac; + + for (ac = 0; ac < AC_MAX; ac++) + cl_edca_set(cl_hw, ac, &cl_hw->edca_db.hw_params[ac], NULL); +} + +int cl_edca_cli(struct cl_hw *cl_hw, struct cli_params *cli_params) +{ + u8 ac, aifsn, cw_min, cw_max; + u16 txop; + + switch (cli_params->option) { + case 'a': + return cl_edca_print(cl_hw); + case 'b': + if (cli_params->num_params != 5) + goto err_num_of_arg; + + ac = (u8)cli_params->params[0]; + aifsn = (u8)cli_params->params[1]; + cw_min = (u8)cli_params->params[2]; + cw_max = (u8)cli_params->params[3]; + txop = (u16)cli_params->params[4]; + + cl_edca_ac_set(cl_hw, ac, aifsn, cw_min, cw_max, txop); + break; + case 'c': + if (cli_params->num_params != AC_MAX) + goto err_num_of_arg; + + cl_edca_aifsn_set(cl_hw, cli_params->params); + break; + case 'd': + if (cli_params->num_params != AC_MAX) + goto err_num_of_arg; + + cl_edca_cwmin_set(cl_hw, cli_params->params); + break; + case 'e': + if (cli_params->num_params != AC_MAX) + goto err_num_of_arg; + + cl_edca_cwmax_set(cl_hw, cli_params->params); + break; + case 'f': + if (cli_params->num_params != AC_MAX) + goto err_num_of_arg; + + cl_edca_txop_set(cl_hw, cli_params->params); + break; + case '?': + return cl_edca_cli_help(cl_hw); + default: + cl_dbg_err(cl_hw, "Illegal option (%c) - try '?' for help\n", cli_params->option); + break; + } + + return 0; + +err_num_of_arg: + pr_err("wrong number of arguments\n"); + return 0; +}