From patchwork Mon Sep 13 08:30:18 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: 12488177 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,URIBL_BLOCKED, 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 CD952C433F5 for ; Mon, 13 Sep 2021 08:32:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B233E60F3A for ; Mon, 13 Sep 2021 08:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238181AbhIMIdP (ORCPT ); Mon, 13 Sep 2021 04:33:15 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237987AbhIMIdD (ORCPT ); Mon, 13 Sep 2021 04:33:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZxwIF+rfakbS7YtFTAT2czKoh89pWjykWr/O4COSBzoeRN6i/YC5/mY1zvJZyH2MNI/tESwlndOX+xg1kPmR91FH/SLxgi4odGH+Ril7anxAH1YLhpMbw6vvIkNTiZkcYTYvqVQjIIExwPXSZ7Pdg7bagSDf6ny6Yl1YB305OeuiL61t8f6Fk79V2yk867euvsP22p3U5p92xhiJsGLwaJOKz4jKE35kSDsv5iJQhH+rqvbMujy4m2+6thTJ8f3nuFazU+yFibqY6w9qCXKFpw1oZiWWv5UEXAKiI1p6nDYXoU1bKwPZtOZRsiq4Sn1x0u9rPHMU3ZgzjYplLkZREg== 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=fSlIysBZhJey7R4RlEDXiIS/Nfae7fAVBSYaRe9hQU4Y13SbMjnqR4He3pou2OJBoc+auNNoz1l3lKw56x5/d6S8d7xm61rHFg7f7jvSPZGH6z3wxphmPQyNRdNPwHBQr1TaM+p59jnkALyrRF2Z4O3j/vu3K6x4T8AKmVKeYArzYb41kWQuKAmmv1M3Whwl/hRbBWpIOjlxhlqBgt8yeJc2tuMWUBPuHgNi/iOn/U7jOh0CRriYrMSmvJyot11m4kEYBcsP4/pLL68mEszh8LdEy8moKAlfDfV5QBsfFudNKVrOE6JrHaZSTl28tTDptpNeGhKMncELFrX3qC4V7g== 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=otPHp+/HdcuH5t96RGhUhD7WAtIz5a3g+TVysddxfiDcDq/R3Zwl1TXJ6EOhSfyzmIGxhlfgOSJuQDp//ImhxSb3jcr/vVTfMmF2fCSfDo/rrmSZ8P9wLxwIfayRLQ+j1rMOjuVtP9DUs1EQpk0Ak5tN7gaPmRcWil3AdyJOcWc= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:45 +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; Mon, 13 Sep 2021 08:31:45 +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 v2 06/33] staging: wfx: drop unused argument from hif_scan() Date: Mon, 13 Sep 2021 10:30:18 +0200 Message-Id: <20210913083045.1881321-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 08:31:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c685d950-0724-41ad-4ccd-08d97690d988 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: GOJ7vKga3LRfEM6OAiHDIFKdgtegPXB7RDaFjVFL0HtWtTRN529kK4Js8pozI34np6pnRsc7qa9nn0iZTVfZC0+aLsAhjGSzT/6UFODNevHj6SBVpZJfqMV6v3ywawb2OqDTzESlgAcEk+XY5l0pdbNMInvjRFcQhEqTMdNPPwRrgja2CTuX9og4a4Xrs3rqpimk4zXVJfyKT03niFeixzG8c/rxVpe1aWlgST9VtUu5o8qZtTpurZkuxwF6MLKbtRnfodaMRHjTsr4ueDEUe9BWTsqrRv/r0xQ6WtgUtqF6kuuJklZeSzfTmc6XVnvU6Tr1reRyCdEtCRT5xFX8kLT58ajpCxZijyZ+rUb5ma0s0UvEFqueJXwqGHdsUI8ReB43wvLSKFuVsmDnStEXPiEqDzgCIJ8MavsWpgWcirsEy9sPgMr+H+uYOUfbsMwtm2VwIfT1hsgfGZ+yEIMLs4CiPqqttG3NkGmjF5mSSzrR2OWlQ8E25AQGbCTZOfmYm4lH2YtWx1xJEgct4ee+r3KNldyiPIaKVeHMqN2ztmHV/ZuzfHW4taS69BMwJQlkgYCa8ZgdQdycn+K3h9E4sc2rWlNVXtJEw1T5NC3b/wfCSRZrTpMn10ytBBsO3qEDJjhIF77qvVPrftbBku7Q1PjeTYTGaJF/wQ9SGHU84DXgjLSXFRCVxleTCDthXPZdJQARZ3D3pSvJgwr9mhjkkg== 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:(366004)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lU9e+mmMfggldw+Z1HjUnEpH/5jB?= =?utf-8?q?UZn/acxHUvMaGhni2IZ3KDCoqzM4weLqX/WhzyUOZR1u+YWyGl0+Es2XLrKZPhMm3?= =?utf-8?q?XLUROMnD8wOzSr8uUu2Iwcm7C3MEcgVXLRkckEB8P1kLGG16ifn76E/G2Y8oSbhYz?= =?utf-8?q?6vA2Nj3JAFNy7Hd1Y6A0pANHnJ8QlmMxc7GZ8y+BXMVcnIBjDXBN9nLBbK6AXGamP?= =?utf-8?q?3GCymy1lrlcz7Da3rCpTPMwBbeSD+3S9JRPttGMnMO1HkRwkKF1V8N3ULqT+ftwEt?= =?utf-8?q?T/fj274BC/sk+S2RXXx/YQMTCeHIrWfd/Rm8YYwNC27o09L5LZzVwadX21CEpAWBW?= =?utf-8?q?BC6pR9EGDTuFjUxbO18vbHANYxiuvXMxCDU+72fkrKVbE7DhGfxNb0LfUrvJa62Og?= =?utf-8?q?cR/+zhTzEHUTMKMs7nM7TpCNo9v0tMRMGe3aVB5AiQtTQZy8e1MlD63H6k0oHBcQd?= =?utf-8?q?gNWJpDDl29221gysK7mnrcmEfwXosk/HWB3Qf5NkTW9KxGxzz6tWkVL0qUEt5UJSa?= =?utf-8?q?dUgvPBOdcaVnCfYHT9JKAARjZDeoXjh0Xx8jFuAm80aLnjuqOAX1/HsOVfOLhMlS1?= =?utf-8?q?PzoV3wgAO7CR6sei2+3QOWpFh+c4nhK5R0xaJ9XpEEWccwbPZ5gStGn3+1XhdeEX/?= =?utf-8?q?+D3+ka3VBKE88UIj+La0kuf/3VU20Qw7Aw7TfE/Wiv3TM8FACcmYxsXHgsqk0YsPR?= =?utf-8?q?Ee1XQzi0ZpJpnrmPBiuN0MGi78BaIO4pcez0zMf1tF/39XPcHu7hAkphg7Ew1Oafe?= =?utf-8?q?rUSoRSENzuh9mn1DUM4R3RbefXH0LzKbX+9qsuanxhED/ugLM4bWgt64/svFkkbJy?= =?utf-8?q?0dfYQwHCOjqxG2Xw7bgXa2pRnbrE90H2PkwPvBC2GXlsWqNtJbzJvFgeBj7EBNJv+?= =?utf-8?q?p9RsD9cyTnWUc5aMifCasgDdkunNAkLeo/orC7v/ubcWPznmdhceuYQm5NNPeBX9w?= =?utf-8?q?2J27Zbs9QVWOkkXLeZVTWiEYps5gtCHz0ISB1kjLgzclaC/SMOYA4jY1Tio6JeaDP?= =?utf-8?q?rdoD4Cqg8JBZXgFKbHlcdaQDyzKub3tnaVciAMtUu12iKSEx2xN4cH0i3YMoD9uiH?= =?utf-8?q?yJGOhv/byzizyPDIv4X2iaNeaF69DVC1lB7Ps+Wp9ASiUU7kyIDCjnYU213TD8X8F?= =?utf-8?q?EfVTrboSeNGU5VW0nqPDxlpFvWk0JRbTxzGU/i3MSehbiVxQvVxw1OOAVLY5vjLEP?= =?utf-8?q?+OD7symeuDDAn5sQtOlL4OWyNI97vqJ2Nkipq59lAJGveeMuSsouDKKHJo271VH+/?= =?utf-8?q?xm9jOH6vvOcvo9MO?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c685d950-0724-41ad-4ccd-08d97690d988 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:14.8351 (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: JVHHfrKHcLkhGDZaE2mwukBVBOKvv7KKUQZSMAX4wJFgm9A7KI/pXs18bhq/m4SU7Q8zkE5bOxVEeaTb1iYlBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 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;