From patchwork Thu Jan 13 08:55:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 12712454 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33C37C433EF for ; Thu, 13 Jan 2022 08:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233179AbiAMI4Y (ORCPT ); Thu, 13 Jan 2022 03:56:24 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231853AbiAMI4R (ORCPT ); Thu, 13 Jan 2022 03:56:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWLQywJJpAz6LC0VXQW/sASyaix6Dz+MID5zatn4COwfYAYs5um/7I1O8N1rid2nftrIXxvbvoYxGQcU+tN40W9ow88zxOSsybIR19eVo07psppwNOdhiazN/HdWtpKEEncvw+pbARDA25puIDsulNNgMegTjZBAR59ELat2m+AqrRbH2aZSAFRfMvkxNQl9Z4iVZh5jsEc4NRugp5U79dw6kbcNu5lyXlH29SX6wWEYfv7UIman05KcpZ/H0zeRvStP2Ol7TnDZMTWEPfBy9N4yfHI309l+VNejqe74Fn2j5PqIoB05Li0k694n2WJbw3Ndb+gb4c/KwThI5J6JWA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AhoMa+qKUdTLLWGtJiak6+0cbIxssJb92W/+xQDb1VI=; b=QFsjdJLOZYgLbjyfnMjOp2I+pS3MLwkAhBS7R0SWvCehL7qv6gNrq0XS0NZunq63oBAIGZhlM8bFrFCJi59ls7dP8+AJbef6uAoqMfRMiYf1Rdp/zA8VoNc4SUnQImuErQ047LPWmBZsFdeo6i0Q+e6PWzDJsjAucR+VdIZKLS5dOZT538BFa8fR6oAfKSojvbt1HcmTbxAqKDQEYqGRvjTZz7XgsY3vxSjZAtRSY6XoOZry/tlHAy8PfF5od7ca69ntlO28pHG6N+7kj3jmqGF/dzyzQ/8dYmD5n6C5wwO4VjT8Gw9alb7WI2+11iwJua00RJxq9upB1oCc4nKedA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AhoMa+qKUdTLLWGtJiak6+0cbIxssJb92W/+xQDb1VI=; b=AWrcjtK1c+SCiDhr4cgZ5p5Ds/yJXrqyMM0iqDUrwF58UI90F7bBe2NXMJmk1YxxiiZzx983YB02Mb+3+cPeNprafsFPK+qeka1GNVy9hNj9rQiDgadknaf5QN/0jBPRYSPo/2NSFBKYpqbHChs7Qla7ykrB/90u+Dq6ZaizIWo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:56:05 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:05 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 14/31] staging: wfx: prefix functions from hif_*.h with wfx_ Date: Thu, 13 Jan 2022 09:55:07 +0100 Message-Id: <20220113085524.1110708-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ffc0467a-f323-429b-4b68-08d9d6728844 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:109; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NK0Hf9RC1HBcXn2ZzPtIKunD6kQwXyJSBZ7WUcVKFvoPRXPSg7AeHMi4Q6xB56uiQjSLrQiZzBLmtx+DPADlSnEQy8g5MjRpYdC1rfH4huxXhwedMpOeAfEykPodCmCPJuV4VXGtOD5si3Bs4CsxOd8lWntkd4UmTT4X6Cvd9IWtm8AaUUVy8wgK/IuCQ3rYmWHRtZ1FklGOcF0yvBzU99934GQy4qNWFrA2jovK27jRCU9lVeMqE4iKhkYl3Ow1UlPs9p4R1zOiuL65OmNhzKsmGvmpi7AjzhrR7fSJjVinoikqV5CUPtSf140fcWOcf+TiFR1/FVAcETl2ZFMjfRgEcjeZtwLgzjbCpgTK3b9+r7k5zr/A3yUmW3Zpt83pg+d+MlSbEgerbeeaCBnQUQqmG/noThI74dbXzjDgOtwi8u0i1aNnzBc5bMhF1wx6b734Oj63x3rVAnB69oSwNV0GpZQuLOKBwqcafoRC4VK6JpOWRbtDhOPoVr765VibyRMIs14u96qTNDqkh6TzQVLKZs8+MoZ6p6oCtJhmB0cdVi7Kb7KyrnOFnOj7jwzCz5ViUF/fftIP5Tj/Oci11yzMQBebyYDi5rnpsaDvxXE8fTLI/LfH1cWcSILkwIs0qumUHSiWPcGiKSSDfyo+NA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(6506007)(508600001)(186003)(38100700002)(30864003)(4326008)(8936002)(6512007)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003)(559001)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HdAuHwls5MJaSQhxhRH/2OjiEppM?= =?utf-8?q?PRdWZYYCTFX85LmflSfvrFrNU9cmupCZ+ND6FXWNiYVvkbygzGHcT4/sHNkQJ0r/1?= =?utf-8?q?Q5nlHq8q+PYrJ4f6Wn9iTIfefGZqHZCNF9dG61MqE81wjvnxCjr1h5ULBa2MF6FXz?= =?utf-8?q?y6LdGn+3t050aRZ/9jhcCQrNpyILj8PQRzIlIl9v+b//kH2nUPYXMTMXiYARiymOR?= =?utf-8?q?MAMXss5MhH3y/HPDHFr46doDClF24Y1sToRon+QypupO1mB/vaTcGdlUqbw9HCpgb?= =?utf-8?q?sksD3brUlZJKFrASylyalfA5aZvLGdnwsxZC9tpXqIcuewKV/nRx9WGVvVE3Oq6Kp?= =?utf-8?q?RVQwZ/NWUZ151wJTHw6Py5Elzn4lwMIgwYaTnr3tVxYv4KVTFRUrUO6/81BuoIFx1?= =?utf-8?q?3PT9zf70gc5drhRbeHcoOF7lFrqa8oKHmzGBxLNjzI9iTFfc5gOnrHAlXll4L76UE?= =?utf-8?q?cYZauTByHKNrtE6y0lfeh0n0YbKt7ySKTww+oBVG/DaGXaxdss4qYl7uMW6apOs2a?= =?utf-8?q?sg0f/tSrMdcw3rcKyAzBtrlHtAjMwVY4VsdH0lbe04BRivpIPShVXso9Pij9WzETl?= =?utf-8?q?8Lu4RCmI7qOYCedrtznX4D0nXrkdUnzMblhlHjrCNuhobcx3/rc755bMk/plQ+9Nu?= =?utf-8?q?TP0jGItjODPlzXjzYtmk7vd4Zd0AEwyKtovSlQVbYwOSdXfzkVRoxOq0nX5CGs2qN?= =?utf-8?q?KzjdvgR+71UFHbj4aqSmUDxirbWQrxiu2EZE1W6YU6xewldaRXsYWM9y27HX3GUgW?= =?utf-8?q?iWRWTylTBy+LteC6V59WXRlofFAzX8tA8Dop6hUuiYeQafuS13Ojr8upk0rmKXXBX?= =?utf-8?q?SNMG4Uig2zHyuIKLiOtiSm8w+uUlttWPphcmpaa6CkunFAZhnH/5caDU69i616f4m?= =?utf-8?q?0o+tJQhqi6JSJCdHK8mJY1t40r3avGV/3nuC+cvdtwAbY4ygKQK0gWbijvxTip6XN?= =?utf-8?q?5t3RYPuzfV6zW0U6K9Xsax6qOkko8G3UNkBIuQFI6UDk2twrhoD2tDN1VrLb0xS9k?= =?utf-8?q?zE+yySvCwVfg+YJ8Uki9rmXtYQpNJyjZVv4Y4LWNT3u1qw5Nlh1HNiCigK/pq3lle?= =?utf-8?q?i3LctSB+yfv+x5bXngEzzJtEHFvaS6o2a8mofUDbADJM+KY/tFzNLj0zWPbzs7Kly?= =?utf-8?q?7iditWUQ8PQULHdY+8lrEFG4oz/lknwdRKEPogvEFKs8o081GCvZK20LbLwwzSs6h?= =?utf-8?q?7Yk2mbzR4AzLNs57jx+BNIHqxIp3v4CE3RPallJfoFm9Q0UHErvcDwsqjkditBcUa?= =?utf-8?q?VT5X467eIzBoHx7rhEfka/pE4MWeRJQLicq7d5Q9M1EQsCti1ZbvnKpM/ZTvU9le4?= =?utf-8?q?nC71AF+T/QAcHfhiOp9H77ja5DQCT7nK29ltQiLV835rEdLrk+nunj7myCtxx/t2l?= =?utf-8?q?hQogpLWeLdFBE7l5MlniJoXc5m6fOTVnIGBIvifDvgIc4VTDb1ZCoRZUE7Yj3bevn?= =?utf-8?q?ii0BWJt13tVgEbisX77nsaU/MUjFiIuoAxZ1EhrnVXbELxiUwY/5EpWhvsjRxc1Ss?= =?utf-8?q?IRUsRYOTUwHe61udERG7WNMbFw3uvQpm8LkyO+FtPF8UKAvKsIXJ7YF/w/cRR92wF?= =?utf-8?q?LqoLWzFsgp7JiieN4b+a9poC18ZpsukAISWvY5TDwU9itEWTrAtJgk=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffc0467a-f323-429b-4b68-08d9d6728844 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:05.5271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OYHjO80VnaJn/hp8/KkAf6JHiCdBwOGZ7kibDVdo7eQgLM3IqzUchbWNwfMwcif4PsO5yUEP20j52fxWAL1Buw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller All the functions related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/debug.c | 2 +- drivers/staging/wfx/hif_rx.c | 103 +++++++++--------- drivers/staging/wfx/hif_tx.c | 48 +++++---- drivers/staging/wfx/hif_tx.h | 48 ++++----- drivers/staging/wfx/hif_tx_mib.c | 177 ++++++++++++++++--------------- drivers/staging/wfx/hif_tx_mib.h | 67 ++++++------ drivers/staging/wfx/key.c | 4 +- drivers/staging/wfx/main.c | 12 +-- drivers/staging/wfx/scan.c | 10 +- drivers/staging/wfx/sta.c | 92 ++++++++-------- 11 files changed, 291 insertions(+), 274 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 9ff9cca5eb66..54ff9bca78d6 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -173,7 +173,7 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) policies[i].uploaded = true; memcpy(tmp_rates, policies[i].rates, sizeof(tmp_rates)); spin_unlock_bh(&wvif->tx_policy_cache.lock); - hif_set_tx_rate_retry_policy(wvif, i, tmp_rates); + wfx_hif_set_tx_rate_retry_policy(wvif, i, tmp_rates); } else { spin_unlock_bh(&wvif->tx_policy_cache.lock); } diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 9f93268a3202..e5f940f19bbe 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -66,7 +66,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v) struct hif_mib_extended_count_table counters[3]; for (i = 0; i < ARRAY_SIZE(counters); i++) { - ret = hif_get_counters_table(wdev, i, counters + i); + ret = wfx_hif_get_counters_table(wdev, i, counters + i); if (ret < 0) return ret; if (ret > 0) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index ea6d192ce28c..7a2a32e3ceb9 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -16,8 +16,8 @@ #include "data_rx.h" #include "hif_api_cmd.h" -static int hif_generic_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_generic_confirm(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { /* All confirm messages start with status */ int status = le32_to_cpup((__le32 *)buf); @@ -50,8 +50,8 @@ static int hif_generic_confirm(struct wfx_dev *wdev, return status; } -static int hif_tx_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_tx_confirm(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { const struct hif_cnf_tx *body = buf; @@ -59,8 +59,8 @@ static int hif_tx_confirm(struct wfx_dev *wdev, return 0; } -static int hif_multi_tx_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_multi_tx_confirm(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { const struct hif_cnf_multi_transmit *body = buf; int i; @@ -71,8 +71,9 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, return 0; } -static int hif_startup_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_startup_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_startup *body = buf; @@ -85,8 +86,8 @@ static int hif_startup_indication(struct wfx_dev *wdev, return 0; } -static int hif_wakeup_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_wakeup_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { if (!wdev->pdata.gpio_wakeup || gpiod_get_value(wdev->pdata.gpio_wakeup) == 0) { @@ -96,9 +97,9 @@ static int hif_wakeup_indication(struct wfx_dev *wdev, return 0; } -static int hif_receive_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf, struct sk_buff *skb) +static int wfx_hif_receive_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf, struct sk_buff *skb) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_rx *body = buf; @@ -114,8 +115,8 @@ static int hif_receive_indication(struct wfx_dev *wdev, return 0; } -static int hif_event_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_event_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_event *body = buf; @@ -149,9 +150,9 @@ static int hif_event_indication(struct wfx_dev *wdev, return 0; } -static int hif_pm_mode_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -164,9 +165,9 @@ static int hif_pm_mode_complete_indication(struct wfx_dev *wdev, return 0; } -static int hif_scan_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_scan_complete_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_scan_cmpl *body = buf; @@ -181,9 +182,9 @@ static int hif_scan_complete_indication(struct wfx_dev *wdev, return 0; } -static int hif_join_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_join_complete_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -196,9 +197,9 @@ static int hif_join_complete_indication(struct wfx_dev *wdev, return 0; } -static int hif_suspend_resume_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_suspend_resume_tx *body = buf; struct wfx_vif *wvif; @@ -225,8 +226,9 @@ static int hif_suspend_resume_indication(struct wfx_dev *wdev, return 0; } -static int hif_generic_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_generic_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_generic *body = buf; int type = le32_to_cpu(body->type); @@ -305,8 +307,8 @@ static const struct { "secure link params (nonce or tag) mismatch" }, }; -static int hif_error_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_error_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { const struct hif_ind_error *body = buf; int type = le32_to_cpu(body->type); @@ -332,8 +334,9 @@ static int hif_error_indication(struct wfx_dev *wdev, return 0; }; -static int hif_exception_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_exception_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_exception *body = buf; int type = le32_to_cpu(body->type); @@ -356,21 +359,21 @@ static const struct { const struct hif_msg *hif, const void *buf); } hif_handlers[] = { /* Confirmations */ - { HIF_CNF_ID_TX, hif_tx_confirm }, - { HIF_CNF_ID_MULTI_TRANSMIT, hif_multi_tx_confirm }, + { HIF_CNF_ID_TX, wfx_hif_tx_confirm }, + { HIF_CNF_ID_MULTI_TRANSMIT, wfx_hif_multi_tx_confirm }, /* Indications */ - { HIF_IND_ID_STARTUP, hif_startup_indication }, - { HIF_IND_ID_WAKEUP, hif_wakeup_indication }, - { HIF_IND_ID_JOIN_COMPLETE, hif_join_complete_indication }, - { HIF_IND_ID_SET_PM_MODE_CMPL, hif_pm_mode_complete_indication }, - { HIF_IND_ID_SCAN_CMPL, hif_scan_complete_indication }, - { HIF_IND_ID_SUSPEND_RESUME_TX, hif_suspend_resume_indication }, - { HIF_IND_ID_EVENT, hif_event_indication }, - { HIF_IND_ID_GENERIC, hif_generic_indication }, - { HIF_IND_ID_ERROR, hif_error_indication }, - { HIF_IND_ID_EXCEPTION, hif_exception_indication }, - /* FIXME: allocate skb_p from hif_receive_indication and make it generic */ - //{ HIF_IND_ID_RX, hif_receive_indication }, + { HIF_IND_ID_STARTUP, wfx_hif_startup_indication }, + { HIF_IND_ID_WAKEUP, wfx_hif_wakeup_indication }, + { HIF_IND_ID_JOIN_COMPLETE, wfx_hif_join_complete_indication }, + { HIF_IND_ID_SET_PM_MODE_CMPL, wfx_hif_pm_mode_complete_indication }, + { HIF_IND_ID_SCAN_CMPL, wfx_hif_scan_complete_indication }, + { HIF_IND_ID_SUSPEND_RESUME_TX, wfx_hif_suspend_resume_indication }, + { HIF_IND_ID_EVENT, wfx_hif_event_indication }, + { HIF_IND_ID_GENERIC, wfx_hif_generic_indication }, + { HIF_IND_ID_ERROR, wfx_hif_error_indication }, + { HIF_IND_ID_EXCEPTION, wfx_hif_exception_indication }, + /* FIXME: allocate skb_p from wfx_hif_receive_indication and make it generic */ + //{ HIF_IND_ID_RX, wfx_hif_receive_indication }, }; void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) @@ -380,8 +383,8 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) int hif_id = hif->id; if (hif_id == HIF_IND_ID_RX) { - /* hif_receive_indication take care of skb lifetime */ - hif_receive_indication(wdev, hif, hif->body, skb); + /* wfx_hif_receive_indication take care of skb lifetime */ + wfx_hif_receive_indication(wdev, hif, hif->body, skb); return; } /* Note: mutex_is_lock cause an implicit memory barrier that protect @@ -390,7 +393,7 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) if (mutex_is_locked(&wdev->hif_cmd.lock) && wdev->hif_cmd.buf_send && wdev->hif_cmd.buf_send->id == hif_id) { - hif_generic_confirm(wdev, hif, hif->body); + wfx_hif_generic_confirm(wdev, hif, hif->body); goto free; } for (i = 0; i < ARRAY_SIZE(hif_handlers); i++) { diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 2fd8bbd36e25..7c9d3d86c22e 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -122,7 +122,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, /* This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any * request anymore. Obviously, only call this function during device unregister. */ -int hif_shutdown(struct wfx_dev *wdev) +int wfx_hif_shutdown(struct wfx_dev *wdev) { int ret; struct hif_msg *hif; @@ -140,7 +140,7 @@ int hif_shutdown(struct wfx_dev *wdev) return ret; } -int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) +int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) { int ret; size_t buf_len = sizeof(struct hif_req_configuration) + len; @@ -157,7 +157,7 @@ int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) return ret; } -int hif_reset(struct wfx_vif *wvif, bool reset_stat) +int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat) { int ret; struct hif_msg *hif; @@ -172,8 +172,8 @@ int hif_reset(struct wfx_vif *wvif, bool reset_stat) return ret; } -int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *val, size_t val_len) +int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *val, size_t val_len) { int ret; struct hif_msg *hif; @@ -208,8 +208,8 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, return ret; } -int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *val, size_t val_len) +int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *val, size_t val_len) { int ret; struct hif_msg *hif; @@ -227,8 +227,8 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, return ret; } -int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, - int chan_start_idx, int chan_num) +int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, + int chan_start_idx, int chan_num) { int ret, i; struct hif_msg *hif; @@ -276,7 +276,7 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, return ret; } -int hif_stop_scan(struct wfx_vif *wvif) +int wfx_hif_stop_scan(struct wfx_vif *wvif) { int ret; struct hif_msg *hif; @@ -291,8 +291,8 @@ int hif_stop_scan(struct wfx_vif *wvif) return ret; } -int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - struct ieee80211_channel *channel, const u8 *ssid, int ssidlen) +int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + struct ieee80211_channel *channel, const u8 *ssid, int ssidlen) { int ret; struct hif_msg *hif; @@ -322,7 +322,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return ret; } -int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) +int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) { int ret; struct hif_msg *hif; @@ -340,7 +340,7 @@ int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) return ret; } -int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) +int wfx_hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) { int ret; struct hif_msg *hif; @@ -364,7 +364,7 @@ int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) return ret; } -int hif_remove_key(struct wfx_dev *wdev, int idx) +int wfx_hif_remove_key(struct wfx_dev *wdev, int idx) { int ret; struct hif_msg *hif; @@ -379,8 +379,8 @@ int hif_remove_key(struct wfx_dev *wdev, int idx) return ret; } -int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, - const struct ieee80211_tx_queue_params *arg) +int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, + const struct ieee80211_tx_queue_params *arg) { int ret; struct hif_msg *hif; @@ -410,7 +410,7 @@ int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, return ret; } -int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) +int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) { int ret; struct hif_msg *hif; @@ -434,8 +434,8 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) return ret; } -int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - const struct ieee80211_channel *channel) +int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + const struct ieee80211_channel *channel) { int ret; struct hif_msg *hif; @@ -458,7 +458,7 @@ int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return ret; } -int hif_beacon_transmit(struct wfx_vif *wvif, bool enable) +int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable) { int ret; struct hif_msg *hif; @@ -475,7 +475,8 @@ int hif_beacon_transmit(struct wfx_vif *wvif, bool enable) return ret; } -int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp) +int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, + bool mfp) { int ret; struct hif_msg *hif; @@ -494,7 +495,8 @@ int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, boo return ret; } -int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) +int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, + const u8 *ies, size_t ies_len) { int ret; struct hif_msg *hif; diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index f7895845686f..b28a2ee5350a 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -36,29 +36,29 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd); int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, size_t reply_len, bool async); -int hif_shutdown(struct wfx_dev *wdev); -int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len); -int hif_reset(struct wfx_vif *wvif, bool reset_stat); -int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *buf, size_t buf_size); -int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *buf, size_t buf_size); -int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211, - int chan_start, int chan_num); -int hif_stop_scan(struct wfx_vif *wvif); -int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); -int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout); -int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count); -int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg); -int hif_remove_key(struct wfx_dev *wdev, int idx); -int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, - const struct ieee80211_tx_queue_params *arg); -int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - const struct ieee80211_channel *channel); -int hif_beacon_transmit(struct wfx_vif *wvif, bool enable); -int hif_map_link(struct wfx_vif *wvif, - bool unmap, u8 *mac_addr, int sta_id, bool mfp); -int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len); +int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *buf, size_t buf_size); +int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *buf, size_t buf_size); +int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + const struct ieee80211_channel *channel); +int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat); +int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); +int wfx_hif_map_link(struct wfx_vif *wvif, + bool unmap, u8 *mac_addr, int sta_id, bool mfp); +int wfx_hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg); +int wfx_hif_remove_key(struct wfx_dev *wdev, int idx); +int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout); +int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count); +int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, + const struct ieee80211_tx_queue_params *arg); +int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable); +int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len); +int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211, + int chan_start, int chan_num); +int wfx_hif_stop_scan(struct wfx_vif *wvif); +int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len); +int wfx_hif_shutdown(struct wfx_dev *wdev); #endif diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 97e961e6bcf6..b79ffdf6fcd2 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -14,20 +14,20 @@ #include "hif_tx_mib.h" #include "hif_api_mib.h" -int hif_set_output_power(struct wfx_vif *wvif, int val) +int wfx_hif_set_output_power(struct wfx_vif *wvif, int val) { struct hif_mib_current_tx_power_level arg = { .power_level = cpu_to_le32(val * 10), }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_CURRENT_TX_POWER_LEVEL, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_CURRENT_TX_POWER_LEVEL, + &arg, sizeof(arg)); } -int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, - unsigned int dtim_interval, - unsigned int listen_interval) +int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, + unsigned int dtim_interval, + unsigned int listen_interval) { struct hif_mib_beacon_wake_up_period arg = { .wakeup_period_min = dtim_interval, @@ -37,13 +37,13 @@ int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, if (dtim_interval > 0xFF || listen_interval > 0xFFFF) return -EINVAL; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_WAKEUP_PERIOD, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BEACON_WAKEUP_PERIOD, + &arg, sizeof(arg)); } -int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, - int rssi_thold, int rssi_hyst) +int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, + int rssi_thold, int rssi_hyst) { struct hif_mib_rcpi_rssi_threshold arg = { .rolling_average_count = 8, @@ -60,37 +60,39 @@ int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, arg.lower_threshold = (arg.lower_threshold + 110) * 2; } - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_RCPI_RSSI_THRESHOLD, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_RCPI_RSSI_THRESHOLD, + &arg, sizeof(arg)); } -int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, - struct hif_mib_extended_count_table *arg) +int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id, + struct hif_mib_extended_count_table *arg) { if (wfx_api_older_than(wdev, 1, 3)) { /* extended_count_table is wider than count_table */ memset(arg, 0xFF, sizeof(*arg)); - return hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, + return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, arg, sizeof(struct hif_mib_count_table)); } else { - return hif_read_mib(wdev, vif_id, + return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_EXTENDED_COUNTERS_TABLE, arg, sizeof(struct hif_mib_extended_count_table)); } } -int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) +int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) { struct hif_mib_mac_address arg = { }; if (mac) ether_addr_copy(arg.mac_addr, mac); - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_MAC_ADDRESS, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_DOT11_MAC_ADDRESS, + &arg, sizeof(arg)); } -int hif_set_rx_filter(struct wfx_vif *wvif, - bool filter_bssid, bool filter_prbreq) +int wfx_hif_set_rx_filter(struct wfx_vif *wvif, + bool filter_bssid, bool filter_prbreq) { struct hif_mib_rx_filter arg = { }; @@ -98,12 +100,12 @@ int hif_set_rx_filter(struct wfx_vif *wvif, arg.bssid_filter = 1; if (!filter_prbreq) arg.fwd_probe_req = 1; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, + &arg, sizeof(arg)); } -int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, - const struct hif_ie_table_entry *tbl) +int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, + const struct hif_ie_table_entry *tbl) { int ret; struct hif_mib_bcn_filter_table *arg; @@ -114,37 +116,38 @@ int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, return -ENOMEM; arg->num_of_info_elmts = cpu_to_le32(tbl_len); memcpy(arg->ie_table, tbl, flex_array_size(arg, ie_table, tbl_len)); - ret = hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len); + ret = wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len); kfree(arg); return ret; } -int hif_beacon_filter_control(struct wfx_vif *wvif, - int enable, int beacon_count) +int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, + int enable, int beacon_count) { struct hif_mib_bcn_filter_enable arg = { .enable = cpu_to_le32(enable), .bcn_count = cpu_to_le32(beacon_count), }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_ENABLE, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BEACON_FILTER_ENABLE, + &arg, sizeof(arg)); } -int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode) +int wfx_hif_set_operational_mode(struct wfx_dev *wdev, + enum hif_op_power_mode mode) { struct hif_mib_gl_operational_power_mode arg = { .power_mode = mode, .wup_ind_activation = 1, }; - return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE, + &arg, sizeof(arg)); } -int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, - u8 frame_type, int init_rate) +int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, + u8 frame_type, int init_rate) { struct hif_mib_template_frame *arg; @@ -155,11 +158,11 @@ int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, arg->init_rate = init_rate; arg->frame_type = frame_type; arg->frame_length = cpu_to_le16(skb->len); - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_TEMPLATE_FRAME, - arg, sizeof(*arg) + skb->len); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_TEMPLATE_FRAME, + arg, sizeof(*arg) + skb->len); } -int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) +int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) { struct hif_mib_protected_mgmt_policy arg = { }; @@ -170,25 +173,26 @@ int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) } if (!required) arg.unpmf_allowed = 1; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_PROTECTED_MGMT_POLICY, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_PROTECTED_MGMT_POLICY, + &arg, sizeof(arg)); } -int hif_set_block_ack_policy(struct wfx_vif *wvif, - u8 tx_tid_policy, u8 rx_tid_policy) +int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, + u8 tx_tid_policy, u8 rx_tid_policy) { struct hif_mib_block_ack_policy arg = { .block_ack_tx_tid_policy = tx_tid_policy, .block_ack_rx_tid_policy = rx_tid_policy, }; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BLOCK_ACK_POLICY, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BLOCK_ACK_POLICY, + &arg, sizeof(arg)); } -int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, - bool greenfield, bool short_preamble) +int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, + bool greenfield, bool short_preamble) { struct hif_mib_set_association_mode arg = { .preambtype_use = 1, @@ -199,12 +203,13 @@ int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, .mpdu_start_spacing = ampdu_density, }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_ASSOCIATION_MODE, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_SET_ASSOCIATION_MODE, + &arg, sizeof(arg)); } -int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, u8 *rates) +int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, + int policy_index, u8 *rates) { struct hif_mib_set_tx_rate_retry_policy *arg; size_t size = struct_size(arg, tx_rate_retry_policy, 1); @@ -222,23 +227,25 @@ int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, arg->tx_rate_retry_policy[0].count_init = 1; memcpy(&arg->tx_rate_retry_policy[0].rates, rates, sizeof(arg->tx_rate_retry_policy[0].rates)); - ret = hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, arg, size); + ret = wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, + arg, size); kfree(arg); return ret; } -int hif_keep_alive_period(struct wfx_vif *wvif, int period) +int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period) { struct hif_mib_keep_alive_period arg = { .keep_alive_period = cpu_to_le16(period), }; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_KEEP_ALIVE_PERIOD, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_KEEP_ALIVE_PERIOD, + &arg, sizeof(arg)); }; -int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) +int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) { struct hif_mib_arp_ip_addr_table arg = { .condition_idx = idx, @@ -250,22 +257,22 @@ int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) memcpy(arg.ipv4_address, addr, sizeof(arg.ipv4_address)); arg.arp_enable = HIF_ARP_NS_FILTERING_ENABLE; } - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE, + &arg, sizeof(arg)); } -int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable) +int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable) { struct hif_mib_gl_set_multi_msg arg = { .enable_multi_tx_conf = enable, }; - return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG, + &arg, sizeof(arg)); } -int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) +int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) { struct hif_mib_set_uapsd_information arg = { }; @@ -277,48 +284,50 @@ int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) arg.trig_be = 1; if (val & BIT(IEEE80211_AC_BK)) arg.trig_bckgrnd = 1; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_UAPSD_INFORMATION, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_SET_UAPSD_INFORMATION, + &arg, sizeof(arg)); } -int hif_erp_use_protection(struct wfx_vif *wvif, bool enable) +int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable) { struct hif_mib_non_erp_protection arg = { .use_cts_to_self = enable, }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_NON_ERP_PROTECTION, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_NON_ERP_PROTECTION, + &arg, sizeof(arg)); } -int hif_slot_time(struct wfx_vif *wvif, int val) +int wfx_hif_slot_time(struct wfx_vif *wvif, int val) { struct hif_mib_slot_time arg = { .slot_time = cpu_to_le32(val), }; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME, + &arg, sizeof(arg)); } -int hif_wep_default_key_id(struct wfx_vif *wvif, int val) +int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val) { struct hif_mib_wep_default_key_id arg = { .wep_default_key_id = val, }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID, + &arg, sizeof(arg)); } -int hif_rts_threshold(struct wfx_vif *wvif, int val) +int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val) { struct hif_mib_dot11_rts_threshold arg = { .threshold = cpu_to_le32(val >= 0 ? val : 0xFFFF), }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_RTS_THRESHOLD, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_DOT11_RTS_THRESHOLD, + &arg, sizeof(arg)); } diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index fe08a69412ab..9b4c16ad5ecf 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -17,38 +17,39 @@ struct wfx_dev; struct hif_ie_table_entry; struct hif_mib_extended_count_table; -int hif_set_output_power(struct wfx_vif *wvif, int val); -int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, - unsigned int dtim_interval, - unsigned int listen_interval); -int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, - int rssi_thold, int rssi_hyst); -int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, - struct hif_mib_extended_count_table *arg); -int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac); -int hif_set_rx_filter(struct wfx_vif *wvif, - bool filter_bssid, bool fwd_probe_req); -int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, - const struct hif_ie_table_entry *tbl); -int hif_beacon_filter_control(struct wfx_vif *wvif, - int enable, int beacon_count); -int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode); -int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, - u8 frame_type, int init_rate); -int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required); -int hif_set_block_ack_policy(struct wfx_vif *wvif, - u8 tx_tid_policy, u8 rx_tid_policy); -int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, - bool greenfield, bool short_preamble); -int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, u8 *rates); -int hif_keep_alive_period(struct wfx_vif *wvif, int period); -int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); -int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); -int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val); -int hif_erp_use_protection(struct wfx_vif *wvif, bool enable); -int hif_slot_time(struct wfx_vif *wvif, int val); -int hif_wep_default_key_id(struct wfx_vif *wvif, int val); -int hif_rts_threshold(struct wfx_vif *wvif, int val); +int wfx_hif_set_output_power(struct wfx_vif *wvif, int val); +int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, + unsigned int dtim_interval, + unsigned int listen_interval); +int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, + int rssi_thold, int rssi_hyst); +int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id, + struct hif_mib_extended_count_table *arg); +int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac); +int wfx_hif_set_rx_filter(struct wfx_vif *wvif, + bool filter_bssid, bool fwd_probe_req); +int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, + const struct hif_ie_table_entry *tbl); +int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, + int enable, int beacon_count); +int wfx_hif_set_operational_mode(struct wfx_dev *wdev, + enum hif_op_power_mode mode); +int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, + u8 frame_type, int init_rate); +int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required); +int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, + u8 tx_tid_policy, u8 rx_tid_policy); +int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, + bool greenfield, bool short_preamble); +int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, + int policy_index, u8 *rates); +int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period); +int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); +int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); +int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val); +int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable); +int wfx_hif_slot_time(struct wfx_vif *wvif, int val); +int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val); +int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val); #endif diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index 65134a174683..6069be161154 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -205,7 +205,7 @@ static int wfx_add_key(struct wfx_vif *wvif, struct ieee80211_sta *sta, wfx_free_key(wdev, idx); return -EOPNOTSUPP; } - ret = hif_add_key(wdev, &k); + ret = wfx_hif_add_key(wdev, &k); if (ret) { wfx_free_key(wdev, idx); return -EOPNOTSUPP; @@ -220,7 +220,7 @@ static int wfx_remove_key(struct wfx_vif *wvif, struct ieee80211_key_conf *key) { WARN(key->hw_key_idx >= MAX_KEY_ENTRIES, "corrupted hw_key_idx"); wfx_free_key(wvif->wdev, key->hw_key_idx); - return hif_remove_key(wvif->wdev, key->hw_key_idx); + return wfx_hif_remove_key(wvif->wdev, key->hw_key_idx); } int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index ddc95ea16b6d..abc1a6d43300 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -201,8 +201,8 @@ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) buf[i] = 0; dev_dbg(wdev->dev, "send PDS '%s}'\n", buf + start); buf[i] = '}'; - ret = hif_configuration(wdev, buf + start, - i - start + 1); + ret = wfx_hif_configuration(wdev, buf + start, + i - start + 1); if (ret > 0) { dev_err(wdev->dev, "PDS bytes %d to %d: invalid data (unsupported options?)\n", start, i); @@ -418,7 +418,7 @@ int wfx_probe(struct wfx_dev *wdev) if (err) goto err0; - err = hif_use_multi_tx_conf(wdev, true); + err = wfx_hif_use_multi_tx_conf(wdev, true); if (err) dev_err(wdev->dev, "misconfigured IRQ?\n"); @@ -429,9 +429,9 @@ int wfx_probe(struct wfx_dev *wdev) wdev->pdata.file_pds); gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 1); control_reg_write(wdev, 0); - hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT); + wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT); } else { - hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE); + wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE); } for (i = 0; i < ARRAY_SIZE(wdev->addresses); i++) { @@ -478,7 +478,7 @@ int wfx_probe(struct wfx_dev *wdev) void wfx_release(struct wfx_dev *wdev) { ieee80211_unregister_hw(wdev->hw); - hif_shutdown(wdev); + wfx_hif_shutdown(wdev); wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv); wfx_bh_unregister(wdev); } diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index a1fd0f850481..f61c6b2db352 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -33,7 +33,7 @@ static int update_probe_tmpl(struct wfx_vif *wvif, return -ENOMEM; skb_put_data(skb, req->ie, req->ie_len); - hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBREQ, 0); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBREQ, 0); dev_kfree_skb(skb); return 0; } @@ -56,14 +56,14 @@ static int send_scan_req(struct wfx_vif *wvif, wfx_tx_lock_flush(wvif->wdev); wvif->scan_abort = false; reinit_completion(&wvif->scan_complete); - ret = hif_scan(wvif, req, start_idx, i - start_idx); + ret = wfx_hif_scan(wvif, req, start_idx, i - start_idx); if (ret) { wfx_tx_unlock(wvif->wdev); return -EIO; } ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); if (!ret) { - hif_stop_scan(wvif); + wfx_hif_stop_scan(wvif); ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); dev_dbg(wvif->wdev->dev, "scan timeout (%d channels done)\n", wvif->scan_nb_chan_done); @@ -80,7 +80,7 @@ static int send_scan_req(struct wfx_vif *wvif, ret = wvif->scan_nb_chan_done; } if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) - hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); + wfx_hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); wfx_tx_unlock(wvif->wdev); return ret; } @@ -139,7 +139,7 @@ void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; wvif->scan_abort = true; - hif_stop_scan(wvif); + wfx_hif_stop_scan(wvif); } void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 23c0425e3929..d384f2df329c 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -89,10 +89,12 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) }; if (!filter_beacon) { - hif_beacon_filter_control(wvif, 0, 1); + wfx_hif_beacon_filter_control(wvif, 0, 1); } else { - hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), filter_ies); - hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0); + wfx_hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), + filter_ies); + wfx_hif_beacon_filter_control(wvif, + HIF_BEACON_FILTER_ENABLE, 0); } } @@ -143,7 +145,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, filter_prbreq = false; else filter_prbreq = true; - hif_set_rx_filter(wvif, filter_bssid, filter_prbreq); + wfx_hif_set_rx_filter(wvif, filter_bssid, filter_prbreq); mutex_unlock(&wvif->scan_lock); } @@ -210,7 +212,7 @@ int wfx_update_pm(struct wfx_vif *wvif) TU_TO_JIFFIES(512))) dev_warn(wvif->wdev->dev, "timeout while waiting of set_pm_mode_complete\n"); - return hif_set_pm(wvif, ps, ps_timeout); + return wfx_hif_set_pm(wvif, ps, ps_timeout); } int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -224,10 +226,10 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&wdev->conf_mutex); assign_bit(queue, &wvif->uapsd_mask, params->uapsd); - hif_set_edca_queue_params(wvif, queue, params); + wfx_hif_set_edca_queue_params(wvif, queue, params); if (wvif->vif->type == NL80211_IFTYPE_STATION && old_uapsd != wvif->uapsd_mask) { - hif_set_uapsd_info(wvif, wvif->uapsd_mask); + wfx_hif_set_uapsd_info(wvif, wvif->uapsd_mask); wfx_update_pm(wvif); } mutex_unlock(&wdev->conf_mutex); @@ -240,7 +242,7 @@ int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value) struct wfx_vif *wvif = NULL; while ((wvif = wvif_iterate(wdev, wvif)) != NULL) - hif_rts_threshold(wvif, value); + wfx_hif_rts_threshold(wvif, value); return 0; } @@ -276,7 +278,7 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw, { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; - hif_wep_default_key_id(wvif, idx); + wfx_hif_wep_default_key_id(wvif, idx); } void wfx_reset(struct wfx_vif *wvif) @@ -284,10 +286,10 @@ void wfx_reset(struct wfx_vif *wvif) struct wfx_dev *wdev = wvif->wdev; wfx_tx_lock_flush(wdev); - hif_reset(wvif, false); + wfx_hif_reset(wvif, false); wfx_tx_policy_init(wvif); if (wvif_count(wdev) <= 1) - hif_set_block_ack_policy(wvif, 0xFF, 0xFF); + wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF); wfx_tx_unlock(wdev); wvif->join_in_progress = false; cancel_delayed_work_sync(&wvif->beacon_loss_work); @@ -305,7 +307,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, sta_priv->vif_id = wvif->id; if (vif->type == NL80211_IFTYPE_STATION) - hif_set_mfp(wvif, sta->mfp, sta->mfp); + wfx_hif_set_mfp(wvif, sta->mfp, sta->mfp); /* In station mode, the firmware interprets new link-id as a TDLS peer */ if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) @@ -314,7 +316,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wvif->link_id_map |= BIT(sta_priv->link_id); WARN_ON(!sta_priv->link_id); WARN_ON(sta_priv->link_id >= HIF_LINK_ID_MAX); - hif_map_link(wvif, false, sta->addr, sta_priv->link_id, sta->mfp); + wfx_hif_map_link(wvif, false, sta->addr, sta_priv->link_id, sta->mfp); return 0; } @@ -329,7 +331,7 @@ int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (!sta_priv->link_id) return 0; /* FIXME add a mutex? */ - hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false); + wfx_hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false); wvif->link_id_map &= ~BIT(sta_priv->link_id); return 0; } @@ -341,15 +343,15 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; - hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, - API_RATE_INDEX_B_1MBPS); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, + API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb); skb = ieee80211_proberesp_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; - hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, - API_RATE_INDEX_B_1MBPS); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, + API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb); return 0; } @@ -375,7 +377,7 @@ static void wfx_set_mfp_ap(struct wfx_vif *wvif) ptr += 1 + akm_suite_size * *ptr; if (WARN_ON(ptr > (u16 *)skb_tail_pointer(skb))) return; - hif_set_mfp(wvif, *ptr & BIT(7), *ptr & BIT(6)); + wfx_hif_set_mfp(wvif, *ptr & BIT(7), *ptr & BIT(6)); } } @@ -390,7 +392,7 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wfx_update_pm(wvif); wvif = (struct wfx_vif *)vif->drv_priv; wfx_upload_ap_templates(wvif); - ret = hif_start(wvif, &vif->bss_conf, wvif->channel); + ret = wfx_hif_start(wvif, &vif->bss_conf, wvif->channel); if (ret > 0) return -EIO; wfx_set_mfp_ap(wvif); @@ -437,7 +439,7 @@ static void wfx_join(struct wfx_vif *wvif) cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); wvif->join_in_progress = true; - ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); + ret = wfx_hif_join(wvif, conf, wvif->channel, ssid, ssidlen); if (ret) { ieee80211_connection_loss(wvif->vif); wfx_reset(wvif); @@ -470,14 +472,14 @@ static void wfx_join_finalize(struct wfx_vif *wvif, rcu_read_unlock(); wvif->join_in_progress = false; - hif_set_association_mode(wvif, ampdu_density, greenfield, - info->use_short_preamble); - hif_keep_alive_period(wvif, 0); + wfx_hif_set_association_mode(wvif, ampdu_density, greenfield, + info->use_short_preamble); + wfx_hif_keep_alive_period(wvif, 0); /* beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use * the same value. */ - hif_set_bss_params(wvif, info->aid, 7); - hif_set_beacon_wakeup_period(wvif, 1, 1); + wfx_hif_set_bss_params(wvif, info->aid, 7); + wfx_hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); } @@ -508,7 +510,7 @@ static void wfx_enable_beacon(struct wfx_vif *wvif, bool enable) wvif->after_dtim_tx_allowed = true; wfx_bh_request_tx(wvif->wdev); } - hif_beacon_transmit(wvif, enable); + wfx_hif_beacon_transmit(wvif, enable); } void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -541,8 +543,8 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (vif->type != NL80211_IFTYPE_STATION) dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n", __func__); - hif_set_beacon_wakeup_period(wvif, info->dtim_period, - info->dtim_period); + wfx_hif_set_beacon_wakeup_period(wvif, info->dtim_period, + info->dtim_period); /* We temporary forwarded beacon for join process. It is now no * more necessary. */ @@ -557,7 +559,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, arp_addr = NULL; if (i >= info->arp_addr_cnt) arp_addr = NULL; - hif_set_arp_ipv4_filter(wvif, i, arp_addr); + wfx_hif_set_arp_ipv4_filter(wvif, i, arp_addr); } } @@ -569,21 +571,21 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wfx_enable_beacon(wvif, info->enable_beacon); if (changed & BSS_CHANGED_KEEP_ALIVE) - hif_keep_alive_period(wvif, info->max_idle_period * - USEC_PER_TU / USEC_PER_MSEC); + wfx_hif_keep_alive_period(wvif, info->max_idle_period * + USEC_PER_TU / USEC_PER_MSEC); if (changed & BSS_CHANGED_ERP_CTS_PROT) - hif_erp_use_protection(wvif, info->use_cts_prot); + wfx_hif_erp_use_protection(wvif, info->use_cts_prot); if (changed & BSS_CHANGED_ERP_SLOT) - hif_slot_time(wvif, info->use_short_slot ? 9 : 20); + wfx_hif_slot_time(wvif, info->use_short_slot ? 9 : 20); if (changed & BSS_CHANGED_CQM) - hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, - info->cqm_rssi_hyst); + wfx_hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, + info->cqm_rssi_hyst); if (changed & BSS_CHANGED_TXPOWER) - hif_set_output_power(wvif, info->txpower); + wfx_hif_set_output_power(wvif, info->txpower); if (changed & BSS_CHANGED_PS) wfx_update_pm(wvif); @@ -614,7 +616,7 @@ static int wfx_update_tim(struct wfx_vif *wvif) tim_ptr[4] &= ~1; } - hif_update_ie_beacon(wvif, tim_ptr, tim_length); + wfx_hif_update_ie_beacon(wvif, tim_ptr, tim_length); dev_kfree_skb(skb); return 0; @@ -774,7 +776,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) } WARN(i == ARRAY_SIZE(wdev->vif), "try to instantiate more vif than supported"); - hif_set_macaddr(wvif, vif->addr); + wfx_hif_set_macaddr(wvif, vif->addr); mutex_unlock(&wdev->conf_mutex); @@ -782,9 +784,9 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { /* Combo mode does not support Block Acks. We can re-enable them */ if (wvif_count(wdev) == 1) - hif_set_block_ack_policy(wvif, 0xFF, 0xFF); + wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF); else - hif_set_block_ack_policy(wvif, 0x00, 0x00); + wfx_hif_set_block_ack_policy(wvif, 0x00, 0x00); } return ret; } @@ -800,8 +802,8 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mutex_lock(&wdev->conf_mutex); WARN(wvif->link_id_map != 1, "corrupted state"); - hif_reset(wvif, false); - hif_set_macaddr(wvif, NULL); + wfx_hif_reset(wvif, false); + wfx_hif_set_macaddr(wvif, NULL); wfx_tx_policy_init(wvif); cancel_delayed_work_sync(&wvif->beacon_loss_work); @@ -814,9 +816,9 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { /* Combo mode does not support Block Acks. We can re-enable them */ if (wvif_count(wdev) == 1) - hif_set_block_ack_policy(wvif, 0xFF, 0xFF); + wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF); else - hif_set_block_ack_policy(wvif, 0x00, 0x00); + wfx_hif_set_block_ack_policy(wvif, 0x00, 0x00); } }