From patchwork Fri Sep 10 16:04:39 2021 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: 12485405 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 X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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=unavailable 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 B0A4FC433FE for ; Fri, 10 Sep 2021 16:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95C4B610A3 for ; Fri, 10 Sep 2021 16:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbhIJQHs (ORCPT ); Fri, 10 Sep 2021 12:07:48 -0400 Received: from mail-mw2nam10on2058.outbound.protection.outlook.com ([40.107.94.58]:8641 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230203AbhIJQG4 (ORCPT ); Fri, 10 Sep 2021 12:06:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzzVYukbVN/2rBYqYlLyn/ks/3faYlLhVOedJZEYSsm1uw937lPIPfIwYjH9wS2kAqK0tJ8C4N6Txl4Pdcp+tkbF2HDldQ0I1d4hO/1TgAMPChL+uXazBbyOqV1OW6YULRpPzCtZ3qaxCmLrZEeW/DzGfIRCcsXNMyOvIIwQ2bcF7csuNGf61NFGAbvPW0vQyMpx2pYxryLt8DXd1VPRTG4Bbbb6KRZ2owlTVmbhEQRkzWId0ftK8Am8PS4d+FnL+6803/S/SyETlR+6Aa+YDqfiEvyybxjZnOXnrRFMCN6DXgVq53T9Z3CLW0xBIyEAqvazXMZtIew01v67oElpPw== 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; bh=Ltkb34xn1l2676USN4kZ+ng0WW2jWxAd1JTkXQJO7zI=; b=cTR1+fc3OrisickXG7jSk5j0I0pSpWOySFoiiy0jwr1UaXPsDNyT6XFDGkLH/tO4Jw+Td/kZjMKaoFrOFls099ofjydaeBN2gmPTf/+KbWLd/tyCplko55xHWOzxRwkFDmg+QD+Fp4Ne94A5M58llIn4a1f2dBJcqbc2VpEBWMe/WFN0lR0jHUvr8mJ1sDBr6APugxc4U7tSP+1BaYcJyErDTS2Gv7besdzad6hcUxzv8qw53vF7J5X8tzOdO8uF1wH1wB4+6ZUTdIcPLYQjU9BEthBIBSMgQdj5xwmd21GDvVihZ/JdOOnReSV5esOPRf3BHymEnMImw1jzsr+eRA== 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=Ltkb34xn1l2676USN4kZ+ng0WW2jWxAd1JTkXQJO7zI=; b=k+qliVhOpRyMG1xFuTQWqe5S7JLici5ji+tU1CxnCw0fVpBP1G1hF6tVxhyUxmcZ/8b5pUGM2926Wry9LHiHERnJYU3h4Bsewxw2rcba+fSZD4RD+hfIXcNro66DgEo3kVx0oqNKuOE2g/fklAnVzUFOPHKEkwqQjWwqYq1RkTg= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3118.namprd11.prod.outlook.com (2603:10b6:805:dc::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Fri, 10 Sep 2021 16:05:44 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Fri, 10 Sep 2021 16:05:44 +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 06/31] staging: wfx: drop unused argument from hif_scan() Date: Fri, 10 Sep 2021 18:04:39 +0200 Message-Id: <20210910160504.1794332-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> References: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN4PR0601CA0006.namprd06.prod.outlook.com (2603:10b6:803:2f::16) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (2a01:e34:ecb5:66a0:9876:e1d7:65be:d294) by SN4PR0601CA0006.namprd06.prod.outlook.com (2603:10b6:803:2f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Fri, 10 Sep 2021 16:05:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d1a2caa7-721d-4872-0a4d-08d97474d7e3 X-MS-TrafficTypeDiagnostic: SN6PR11MB3118: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hviVh2ntmZ/dg0iWO4aOYdDpTThrQnGQy5cspf4Xhx6izd625n8DopES0ovZrFZrHKq82JkKy4YsjbCpSxJ00GoFhmSZQ93BnnAJVLfNPQmbWdz6tt5D93oCczGvRjU+e+zj0me2YfpOWEeh/26lcaJ69EP5upyR76nshN/HSRveaaqGWEPWx5tUWCwRcrW2OMVRiNuE5CSqLKfRZZ6E+C2xw2xem5C4XljWj9M3wlzdxyq5tag6y1sdKoJ8g2d8X/ylSj0rrkOBgkwOkYGe45mGoE3BVKzVlqE+sfj8pufw8Rgb7VkiMuSgNPeJsN0vnITlcyjMb9v5QZmj0bOzQzSlJ6FjBiNImojiiVgeyOTulZ19mgnwMqW5EDgkJnHuRMYtWv2pXXJC5G3jfLFMcZsW4cdaH8qJyLqbHrIUMD8Ind2uR/rUmX21JZwQxKHEkUJiMHzIRF7KGjJishm6HeIoqYzULPiqYmVSEegmWPLl3UitMXhELRVAIrRU76GfeYYt6mXXJyJJipozrJVgUisIx2i6+EBAAhKrHqVeLTtgNdAV6bVlMIpVKa/lk0PetGiygckNdNtgYw8Ag0lElPUgcD06361I1W5T7cLK2GLdc+93zni4VVlYJViPPhUcpyYXsUlr7lCtaV/v3pLq7A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(366004)(376002)(346002)(39850400004)(396003)(4326008)(66476007)(107886003)(36756003)(186003)(316002)(6486002)(66556008)(8676002)(6666004)(86362001)(2906002)(54906003)(38100700002)(83380400001)(8936002)(66574015)(5660300002)(66946007)(1076003)(2616005)(52116002)(7696005)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/HraOtHdAfFPKbtoeqt2aFJzaeOS?= =?utf-8?q?DuqO98FFqU6JhXFMxvWwtcw8wtBQg6pSyAGqtz+CFfdffPVodZ3wcwep/WW/mFBcl?= =?utf-8?q?At9RScOy4b3m+lnLtC5iGaUDCq1Xl3BNDT0drhAM61VISCUHSC+ukSnYDAeFyBX2R?= =?utf-8?q?SmaJ4a/KmH/WI1lM6lykzo8j9qSBIFY1kS0W1KJD8t0iYpcRIZlB3+TMjQF/06T1X?= =?utf-8?q?gT4NpkcT0UVCed8af6PWzjNpfL6b/5k2z1Cm9pHmfXD5AOAQU3WRLdyDhEHXF+gai?= =?utf-8?q?t3xDSkjVxt7W6e2eDX6WPM5cTg0miMpZ1nxOhBjXr/KMek7nKozhQ80LRYRMjSRhm?= =?utf-8?q?bqGiajFcn0oluugCRdB72k3hEbY2o57BvSgZVlByGeSvdkQJ4dy5SjYVKPAj7HaXX?= =?utf-8?q?D/yUzwmT2i0TnHiscdokxqMGSnkb0sPaNCdHOhBdOugbOI2jGf2tbVUg/F1taW4su?= =?utf-8?q?i6mQ+bXBr/kLncwimk6gTlCVe8whqZ43pY/GVHGRQpDUrCeT26EhQDLNOGQyVwi3n?= =?utf-8?q?bfBfhL7UAjRl6oFWuS2WsArUiatS8wzxI30mfVt55BRD8+dXW4MQZf/c5w2K9yQUN?= =?utf-8?q?v2hJ3KlBOh3UvjAfJPhgQoCYKnE3rALTQBtrEMecZEOHRjgO/+dflFW1uZDDe700j?= =?utf-8?q?vl70e9OVBzllHGZp03F0MD3qKgxyevfFy+8LvwGVrTMej7OM68MbN7XWIwSsNRfB9?= =?utf-8?q?lE4aiVzogrQuK0ul3V1+HV5kLl2f80SMuRlAQa4wwTF70RVHZwEeq+sF1HO2cdaiJ?= =?utf-8?q?SyzMVFkvRGAGsFN3k9dgzQKCXkSBOK5Usa58TkiICchqUOHMtuCfmuqjg93FTeL2s?= =?utf-8?q?56dg3uRwBWxgnSaW6wMp4qDAOs22yyh4QeASUihabk/6ASpkYAHEn8hLHzK1fSFIe?= =?utf-8?q?7AbdUpmHzaUaVI0urLLmFS4QWMyi7NuVRWvUT02zqa52VfND79f5z5egCeHeSBN+d?= =?utf-8?q?Gq+eXXVVctqsQDWTA7CKPbOrCpvIElefYwhJy8aRWvl9eB7pOB9NRQnXPvKk8DN7s?= =?utf-8?q?zZR54fe4uF43URBsS10bUeoT38SBd+NfUCOARO48OUA5aQSWdXTBf1uR7zxg6+QdV?= =?utf-8?q?ZQISMgz7E1H+XXxkosLX7yt+lkRlC+OfZvIGkfr2n7G228XyUuV/xeDSFzmRV51Qc?= =?utf-8?q?ryBcqR5gTQTes9VeYgxCFJb+YGVk94Awlw8BIUrW6WY21/vIdeIwAiS+V7OUNvP66?= =?utf-8?q?OgLWcZzUReVOPlROamv47ZUKsQ7X70BebfONBY8Etpx8WdCDMCPRDicU/S8ZCaVX5?= =?utf-8?q?1e+YU9NF/A/vNTWMt2FH4MQvyXSsmXdcxBL5vcfRC5WbGrHdtNe0OyyfPxQF4ae16?= =?utf-8?q?1CI/m4BgTaPNi2W?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1a2caa7-721d-4872-0a4d-08d97474d7e3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2021 16:05:43.9983 (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: uGsgiK2SxAmiMJNQebAOnl+vjuk9/kaoERBLaov9NbOg/0FBrsuuxpYL6TsxWtNFWkNzDNGRJalmsQ5i1thYMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3118 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It is no more necessary to compute the expected duration of the scan request. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 9 +-------- drivers/staging/wfx/hif_tx.h | 2 +- drivers/staging/wfx/scan.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 63b437261eb7..14b7e047916e 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -227,14 +227,13 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, } int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, - int chan_start_idx, int chan_num, int *timeout) + int chan_start_idx, int chan_num) { int ret, i; struct hif_msg *hif; size_t buf_len = sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8); struct hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif); - int tmo_chan_fg, tmo_chan_bg, tmo; WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params"); WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params"); @@ -269,12 +268,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, body->num_of_probe_requests = 2; body->probe_delay = 100; } - tmo_chan_bg = le32_to_cpu(body->max_channel_time) * USEC_PER_TU; - tmo_chan_fg = 512 * USEC_PER_TU + body->probe_delay; - tmo_chan_fg *= body->num_of_probe_requests; - tmo = chan_num * max(tmo_chan_bg, tmo_chan_fg) + 512 * USEC_PER_TU; - if (timeout) - *timeout = usecs_to_jiffies(tmo); wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START_SCAN, buf_len); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index 3521c545ae6b..46eed6cfa247 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -40,7 +40,7 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, 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 *timeout); + 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); diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 695b06974194..9e2d08317c9e 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -56,7 +56,7 @@ 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, NULL); + ret = hif_scan(wvif, req, start_idx, i - start_idx); if (ret) { wfx_tx_unlock(wvif->wdev); return -EIO;